April 2024 - This site, and Kamaelia are being updated. There is significant work needed, and PRs are welcome.

Kamaelia.Experimental.Services

Components to help build Services (EXPERIMENTAL)

These components make it easier to build and use public services, registered with the Coordinating Assistant Tracker.

Note: These components are EXPERIMENTAL and are likely to under go substantial change

Register Service

A function that registers specified inboxes on a component as named services with the Coordinating Assistant Tracker (CAT). Returns the component, so can be dropped in where you would ordinarily use a component.

Example Usage:

Create and activate MyComponent instance, registering its "inbox" inbox with the CAT as a service called "MyService":

RegisterService( MyComponent(), {"MyService":"inbox"} ).activate()

How does it work?

This method registers the component you provide with the CAT. It register the inboxes on it that you specify using the names that you specify.

Subscibe To Service

A component that connects to a public service and sends a fixed format message to it requesting to subscribe to a set of 'things' it provides.

Example Usage:

Subscribe to a (fictional) "TV Channels Service", asking for three channels. The tv channel data is then recorded:

pipeline(
    SubscribeTo( "TV Channels Service", ["BBC ONE", "BBC TWO", "ITV"] ),
    RecordChannels(),
    ).run()

The message sent to the "TV Channels Service" will be:

("ADD", ["BBC ONE", "BBC TWO", "ITV"], ( <theSubscribeToComponent>, "inbox" ) )

How does it work?

Describe more detail here

Connect To Service

A component that connects to a public service. Any data you send to its inbox gets sent to the service.

Example Usage

pipeline( MyComponentThatSendMessagesToService(),
        ConnectTo("Name of service"),
        ).run()

How does it work?

Describe in more detail here.


Kamaelia.Experimental.Services.RegisterService

prefab: RegisterService

Kamaelia.Experimental.Services.Subscribe

class Subscribe(Axon.Component.component)

Subscribes to a service, and forwards what it receives to its outbox. Also forwards anything that arrives at its inbox to its outbox.

Unsubscribes when shutdown.

Inboxes

Outboxes

  • outbox :
  • signal : shutdown signalling
  • _toService : request to service

Methods defined here

Warning!

You should be using the inbox/outbox interface, not these methods (except construction). This documentation is designed as a roadmap as to their functionalilty for maintainers and new component developers.

__init__(self, servicename, *requests)

Subscribe to the specified service, wiring to it, then sending the specified messages. Requests are of the form ("ADD", request, destination)

main(self)

shutdown(self)

Kamaelia.Experimental.Services.ToService

class ToService(Axon.Component.component)

Inboxes

Outboxes

Methods defined here

Warning!

You should be using the inbox/outbox interface, not these methods (except construction). This documentation is designed as a roadmap as to their functionalilty for maintainers and new component developers.

__init__(self, toService)

main(self)

shutdown(self)

Feedback

Got a problem with the documentation? Something unclear that could be clearer? Want to help improve it? Constructive criticism is very welcome - especially if you can suggest a better rewording!

Please leave you feedback here in reply to the documentation thread in the Kamaelia blog.

-- Automatic documentation generator, 05 Jun 2009 at 03:01:38 UTC/GMT