Question

I have been playing around with pubsub and so far it looks good for what I need (a basic game experiment).

From a Javascript perspective and mobile (via Appcelerator's Titanium) I can really see the value of using pubsub.

However, I need to write a server app in c#/.NET (although open to other ideas) to listen to the subscriber queue I have, and process the messages.. which involves some decision making etc, and then possibly writing another message to the publish queue for example.

So far I have played with RX (Reactive Extensions) for C# which listen on my subscribe channel. So far so good, I see the messages come in, although for now I just wrote a C# console app to test.

My question is would the best way to wait and listen for pubsub subscriber messages be to write a windows service app? or is there another technique more appropriate? obviously at some possible point I might have to scale the server to 2-3 servers, however given the nature of pubsub queue/messaging, I don't see a problem if I had some load-balancing etc.

Any ideas welcome!

Was it helpful?

Solution

Use Service Bus. When cloud is good for you, than Azure Service Bus. When not then nServiceBus. Take a look also for RabbitMQ, it's AMQP framework and is able to do more then pubsub. Also rabbit has multiple clients on multiple platorms. For example one of approaches purely for JavaScript is RabitMQ + Node.js + WebSockets.

All clients and devtools, and articles about RabbitMQ for different platforms and languages are here.

There is also special RabbitMQ binding for .NET, find it here.

NServiceBus PubSub explanation is here. It's .NET service bus, but is not such free as RabbitMQ. Anyway RabbitMQ is platform agnostic.

Any of service buses implementations already has PubSub, that is the reason they exist. Therefore there is no reason to implement, what is already implemented

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top