Tables ,
and provide a useful quick guide to help
you decide what plugins to look in depending what you want to do.
The rest of this chapter fills in the details.
Table:
Actions associated with managers.
What do you want to do?
Where to look/how to do it
Application start and stop
Cold-start the application.
IManagerLifeCycle
Warm-start (after failure).
IManagerLifeCycle
Act when this netlet is a new
manager joining the existing
ones.
IManagerLifeCycle
React when the leader changes.
IManagerLifeCycle
Controlling warm-start and
join parameters.
ILeaderSupport
Set the number of managers.
ILeaderSupport
Close down the application.
IManagerLifeCycle
Leadership
Check if I'm the leader
ILeaderSupport
Find the current leader
IPeerSupport
Comms between managers
Use a storage space visible to all
managers.
Use the management MIB, with IManagementState.
Write to the management MIB.
Use IManagementState,
but only the leader
can do this. For complex changes use the applyChange() method.
Read the management MIB.
Use IManagementState;
any manager can do
this.
Table:
Worker-related actions.
What do you want to do?
Where to look/how to do it
Organise workers
Create a group of workers to
perform a type of service.
Use a worker pool, managed from a manager
netlet.
Create a worker pool.
Add a WorkerPool
plugin to a manager and set
the worker pool's parameters.
Set what resources are required
for workers.
Add an IWorkerResourceRequester plugin to a worker pool.
Respond to workers starting
and stopping.
Add an IWorkerLifeCycle
plugin to a
worker pool
Start a worker.
You don't. Workers are started automatically
by
the worker pool plugin. However, you can
increase the number of workers generally by
setting the worker redundancy range with
IWorkerPool.
Stop a worker.
You don't. Workers are stopped automatically
by the worker pool plugin. However, you can
deccrease the number of workers generally by
setting the worker redundancy range with
IWorkerPool.
Make a worker functional.
Given a basic default Worker
(1) get its
IRemotePluginManager, (2) add
plugins as
needed.
Let a manager find workers,
possibly just those who offer a
specific service type.
IManagerSupport
Table:
General Beatrix actions.
What do you want to do?
Where to look/how to do it
Comms within the application
Get handles to other netlets in
the same application.
IPeerSupport
Set a status message
IPeerSupport
Talk to another netlet in
the same application.
Make an interface available as an internal
facet.
(1) Implement IInternalFacetProvider,
(2) plug in the implementation, (3) get it
remotely using a netlet handle.
Use internal facets more
efficiently
IInternalFacetCache
Listen for when a connection to
a client is cut.
Implement ICommunicationServer.
Services
Make a simple service available.
(1) Plug in a ServiceManager,
(2) implement an
ISimpleServiceProvider, (3) plug
the
service provider into the service manager.
Make a more complex service
available.
As above, but implement an
IServiceProvider.
Create a client service session.
IPeerSupport
Create a warrant for anyone: the
administrator or a consumer.
IManagerSupport
Sign a warrant.
Provide a key pair when you make the application.
All warrants will automatically be signed.
Tell workers how to load
balance themselves for different
services.