My business is suitable for using the Shuttle or not

Aug 21, 2014 at 10:33 AM
Hi,
sorry to bother you again.

Please give me a little hint about how to use the Shuttle.

Let's see a demo first:
Client A ,Server A, Client1,Client2,Client 3

I need that:If ever ClientA 's message changed,ClientA need to send a message to Server A, then the ServerA can send the message to Client1 ,Client2 and Client3.

If ever Client A make sure it received the message,then it will told Client2 and Client 3 than it has already changed.
And so do Client2 and Client3.

Here is my thought:
ServerA can send a message ,then Client1,Client2 and Client3 can receive the message.But how can I let Client1 let the other two clients know it, when the Client1 changed.
Coordinator
Aug 21, 2014 at 1:19 PM
Hello,

Whenever you want an arbitrary number of endpoints (1 or more) to be able to pick up on changes it would probably be an event that you need to publish.

Perhaps if you think about clients and servers more in terms of producers and consumers, or even publishers and subscribers, things may make more sense.

Since you are not using anything concrete in your example I'll try to answer as best I can and I'll use your names.

Client A sends a command to Server A for processing. Let's call this StartEngineCommand.

Server A handles the StartEngineCommand and publishes the EngineStartedEvent.

Client 1, Client 2, and Client 3 subcribe to event EngineStartedEvent so they can handle it.

Now let's assume Client 1 does something like changing the engine's RPM to 2000. Client 1 could publish event EngineRPMChangedEvent.

Client 2 and Client 3 could subscribe to EngineRPMChangedEvent and handle the event by implementing some relevant functionality.

I hope that helps.

Shuttle, like any service bus, will be highly useful (and valuable) in a distributed, decoupled, cross-process communication architecture.

Regards,
Eben
Aug 25, 2014 at 7:12 AM
Hi,

As you said,I've already know your meaning.
But I don't know how to deal with the "App.config",and I don't know how to write the serviceBus configuration.Such as the Client2.

Server A publishes the EngineStartedEvent.
Client 1, Client 2, and Client 3 subcribe to event EngineStartedEvent so they can handle it.

What if Client2 changed,or Client2 and Client3 changed at the same time,what should I do in the "App.config"?

And should I create a new ServerBus?
Coordinator
Aug 25, 2014 at 9:38 AM
Hello,

Each endpoint must have its own service bus instance. Each must have its own inbox queue. So each one will have its own application configuration file.

The application configuration (by default) is used to define the inbox and the message routing. The subscriptions, however, require an implementation instance of the ISubscriptionManager interface and, typically, the subscribers will all point to the same subscription store. The subscribers will need to subscribe to the relevant events either at startup (at least to test that the subscription exists) or manually using the management shell.

I don't quite understand what you mean by the endpoints changing at the same time.

Regards,
Eben