I’m looking into Windows Azure now and wondering if one can implement a TCP/IP server using Worker Roles – i.e, when a request comes in on a socket – a worker role (and not a web role) will accept it, treat it well and then return an answer on that same socket request.
Another question is – should I do it, or maybe just implement my own non-blocking server using .NET and put it in one worker role or a VM?
Thanks!
There’s a full worked example of a telnet server on Maaten Balliauw’s blog – see http://blog.maartenballiauw.be/post/2010/01/17/Creating-an-external-facing-Azure-Worker-Role-endpoint.aspx
On your second question, most answers seem to recommend using worker roles for code instead of using VMs – worker roles in general are “architecturally preferred” for Azure, and VMs are there mainly for when you need to support existing (legacy) code.