AwBus Update: Containers, Pubsub and Admin Service

When I last left the container service, all nodes were loading the same containers. That’s no longer the case; they each get exactly what they’re supposed to.

Currently, the admin utility gets all its information at startup, and that’s about it. I can easily add a refresh function to get the latest info, but to get it to keep up with all the on-goings, I need the pubsub.

Also, when a packages starts up, it loads components. We need to be able to see those components. Currently, they’re not exposed. Once again, the best solution for this will be the pubsub. In this case, it will just be a local admin topic.

I’ve started work on the pubsub; designing the objects, etc. The initial implementation will be very simple just to get the design right. Later, I’ll do a more robust multi-threaded implementation. One thing at a time.

Creating an Wcf Service on top of the bus service

Each node hosts one or more services. Those services run locally to the bus; they are not automatically exposed via Wcf.

To expose it via Wcf, you write a service contract and implementation, then associate it to the bus service.

I’ll use pubsub as an example since that’s what I just did. The pubsub service runs in the node. Everything in the node can use it directly. But, for outside publishers and subscribers, we need to expose the functionality externally.

Here’s how you do the association.

 [RemoteAdminService(typeof(IPubsub), typeof(Pubsub))] public class PubsubService : BusServiceBase { ...} 

The names are overlapping. I keep having that problem. Anyway: PubsubService is the service that runs in the node. The RemoteAdminService attribute is used to associate it to one or more Wcf services. IPubsub is the service contract. Pubsub is the service implementation. That’s all you need… The Wcf service fires up immediately.

I need to change the attribute name. Until I created the pubsub, this was only used for admin purposes. Since that’s no longer the case, the word ADMIN in the attribute name is no longer appropriate.



Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: