0

Let's assume there are number of clients that asynchronously send messages for processing to Azure Cloud. The messages are pushed to a queue and processed relatively quickly (few seconds for each). What I want is to send the processing result BACK to the client server.

I need to achieve significant performance and great fault tolerance.

What direction should I look to? Long polling, keep alive connetcions, singleR. Any other options? Thank you for help.

ohavryl
  • 397
  • 1
  • 5
  • 17
  • by client you mean a browser client or lets say a mobile app? – Leonardo Apr 30 '13 at 14:19
  • client is a webserver in this case – ohavryl Apr 30 '13 at 14:24
  • Do you have a large number of clients or a small number? Service Bus is your likely candidate for the return information. Any queueing mechanism is likely sufficient for the initial queueing mechanism. Read up some here in the meantime: http://www.windowsazure.com/en-us/develop/net/how-to-guides/service-bus-topics/ – Jaxidian Apr 30 '13 at 14:25
  • Yes, I have large number of clients. I will use Service Bus. The question is rather about postback to client than about queues. I will push and pull message from queue, process it, and I need to send callback to a client which does not have separate webservice for this purpose. I am looking for best practices for doing so. Looks like I can use singleR but I have not used it before so I am not sure whether it is the best choice. – ohavryl Apr 30 '13 at 15:03
  • If you are communicating between servers then use Servicebus Topics&Subscription http://www.windowsazure.com/en-us/develop/net/how-to-guides/service-bus-topics/ – NavaRajan May 01 '13 at 04:59
  • Yes, thanks, that's really what I'm using. – ohavryl May 01 '13 at 08:53

1 Answers1

0

Well your problem is quite simple, and can be defined as "How can the client be aware of the progress of a operation?"... and there are 2 methods:

  1. The cliente can either check constantly the server based on a operation ID (something like "hey server! did the operation XHJHFB finished?") which can be done via simple javascript... or
  2. You can use SignalR to have the server notify the client when a operation...

My recommendation is the SignalR approach...

ps: sorry I cant provide a code example now... but you can find it without major efforts...

Leonardo
  • 10,737
  • 10
  • 62
  • 155