Echoes from the CLR

| 4 Comments
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...

4 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...

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...

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.....

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...

Leave a comment

About this Entry

Socket Server that hosts the CLR was the previous entry in this blog.

Taking my own advice is the next entry in this blog.

I usually write about C++ development on Windows platforms, but I often ramble on about other less technical stuff...

Find recent content on the main index or look in the archives to find all content.

I have other blogs...

Subscribe to feed The Server Framework - high performance server development
Subscribe to feed Lock Explorer - deadlock detection and multi-threaded performance tools
Subscribe to feed l'Hexapod - embedded electronics and robotics
Subscribe to feed MegèveSki - skiing