2

We are developing an web application which will talk to a Windows service (both will be developed in .Net). These calls could be simple CRUD operations or Subscription operations. Could you please different alternate to set communication between these two applications. I can think of following options. Please suggest me best among them.

a) We can expose WCF service end point. For subscriptions, we can use duplex WCF.

b) We can use some kind of broker queue (like RabbitMQ). RabbitMQ provides us facility to add callbacks/subscription.

c) Use socket programming to set communication between two.

It would be great if you can let me know in which scenario which option should be preferred over other.

Thanks In Advance

reto
  • 9,995
  • 5
  • 53
  • 52
Pragmatic
  • 3,093
  • 4
  • 33
  • 62
  • I would suggest you read this article to crystalise your architecture on this as you seem to be describing a queued pub/sub pattern (most Service Buses are based on this pattern) http://msdn.microsoft.com/en-us/magazine/cc163537.aspx#S5 – MetalLemon Mar 20 '14 at 06:28

1 Answers1

3

(a) and (b) options are seems better.In fact you can use RabbitMQ binding in WCF.It seems your communication data is central DB . RabbitMQ is using AMQP protocol while WCF's Duplex binding is using MSMQ. RabbitMQ is from third party but stable. WCF has a good history of stability with some new concept of WCF LOB Adapters. Both are scalable and efficient.Both are supporting publisher/subscriber pattern.

But If you are writing first time WCF duplex then it can very complex in development & deployement, As WCF is more about configuration. I would like to suggest you SignalR which is built on top of winsock and related communication channels.SignalR can be deployed on ASP.Net & MVC Site. Currently I am building a massive communication system using SignalR.

Just look at ZeroMQ .It has better performance than RabbitMQ.Use NetMQ a 100% C# Port of ZeroMQ.

Hope it helps

  • Thanks Malkeet. This was really helpful. BTW What do you mean by "Your communication data is central DB" – Pragmatic Mar 20 '14 at 05:21
  • Means if your DB strategy is at application level (like Viber is doing, they are using MongoDB at backed for storing bulk communications ) or at client side (like whatsapp is doing - storing data at clients end on mobiles using sqlite) – Malkeet Sarwara Mar 20 '14 at 11:53
  • Currently, we are not planning to store data about communication. For CRUD operation it is not required and for subscription, It would be in memory. Yes, Publisher would have a backed db, from where it would be serving the subscriber request. – Pragmatic Mar 20 '14 at 13:59