March 20, 2007

Echoes from the CLR

The work on the CLR hosting socket server example is going pretty well. I now have a server that can pass server notifications to managed code that either runs in an AppDomain per connection or within a single AppDomain (depending on how isolated you want the user code to be). I think I'm pretty much there as far as what I want to demonstrate is concerned; it works and the line between managed and unmanaged code is likely to vary depending on a client's particular requirements so there's little point in extending the example code any further. Hopefully I'll get a chance to clean things up a little more and then do some performance comparisons between a pure unmanaged server, a pure managed server and a hybrid...


Share this entry: Email it! | bookmark it! | digg it! | reddit!

Posted by Len at March 20, 2007 12:51 PM | Comments (4) | Categories : .Net , CLR Hosting , Socket Servers
Comments

Just curious...
What are the advantages of this approach when comparing to the opposite scenario:

.net app is hosting TCP server(s) that are exposed via
managed wrappers...

Posted by: Srdjan at March 21, 2007 08:09 PM

I'll let you know when I've done the performance numbers...

It's an alternative option; depending on what your requirements are and where the bulk of any legacy business logic code lives it may be a valid way to hook some .net into the mix...

Posted by: Len at March 21, 2007 10:27 PM

Maybe a smart idea for high-demanding server system, those running for months without restart,might actually put business logic inside dotnet CLR to get advantage of its garbage collection routines, and reduce memory fragments or other annoying problem in win32. I was thinking of the same when doing a MMOG front-end server, the obvious worry is C++/CLR interface overhead.....

Posted by: Mandi Zu at March 25, 2007 06:03 AM

Actually, I've done enough pure C++ servers that have to do all of that (and that do it well) for that reason to not be one of the reasons (for me at least ;)). I've yet to know if there really is a point to this example but I have had a few clients want to do things this way, so thought I'd give it a go. Personally I'd only go this way if there was a compelling performance advantage to doing a pure .net server and there was a compelling requirement for using .net in the business logic area for the server...

Posted by: Len Holgate at March 26, 2007 09:46 AM
Post a comment









Remember personal info?




Enter this code in the box below to prove that you're not some kind of automated spam robot...