On 9/14/07, Dusty Candland - eonBusiness <[EMAIL PROTECTED]>
wrote:
>
> I agree, there is some cost to doing the hashing, but MD5 should be fast
> enough. Doing a local file system copy is really fast, I don't think we
> should worry about that too much. Anyway, we have to do the copy to
> avoid locking issues when a new version is sent out, or more then one
> AppDomain using the dll is started up, or there is more then one version
> of a dll.
MD5 is pretty quick, in my experience. A couple code samples of stuff I've
been working with recently...
public static string GetMd5SumAsHexString( string source )
{
HashAlgorithm md5 = MD5.Create();
byte[] hashBytes = md5.ComputeHash( Encoding.UTF8.GetBytes(
source ) );
// convert to hex string
StringBuilder sb = new StringBuilder();
for( int i = 0; i < hashBytes.Length; i++ )
{
sb.Append( hashBytes[i].ToString( "X2" ) );
}
return sb.ToString();
}
And
public static string ComputeSha384HashAsBase64String( string source
)
{
HashAlgorithm hash = SHA384Managed.Create();
byte[] hashBytes = hash.ComputeHash( Encoding.UTF8.GetBytes(
source ) );
// convert to base64-encoded string
string hashValue = Convert.ToBase64String( hashBytes );
return hashValue;
}
You need System.Security.Cryptography.
So, I feel somewhat left out of the recent activity (entirely my fault, I
know.)
It's nice to hear some work being done on this DLL Caching idea; Matt and I
had talked about it some time ago, with a distributed GAC-like concept,
possibly using a bittorent-like protocol for assembly distribution.
Basically, so we don't end up with network bottlenecks trying to get
assemblies to their respective Executors.
I think it'd be a good idea to take a look at some of the distributed
computing literature (I know of two really good books but don't have copies
of either) to pull an algorithm from, instead of simply hacking one
together. I think, in part, plenty of the existing reliability issues stem
from retrofitting ideas on top of existing code without looking at it from
the Computer Science/Distributed Computing approach, and consulting the
literature.
Anyway, it'll take me a bit to catch up with the last few weeks, but I'm
happy to see stuff going on.
Jonathan
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Alchemi-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alchemi-developers