Conventions, INetlet, INode, IService and IRemote

It is a Jtrix convention that interface names always start with the letter I, while facets tend to end with Facet. Hence our hello world service facet is called IHelloFacet, while the node's administration facet is called INodeAdminFacet.

Now we can talk about some of the key interfaces in use (Figure [*]). Note what follow are just interfaces, not facets--facets are extracted from these.

Figure: Netlets present INetlet interfaces to nodes. Nodes present INode interfaces to netlets. Netlets present IService interfaces to other netlets.
  \resizebox*{0.6\textwidth}{!}{\includegraphics{images/inetlet-etc-colour.eps}}

INode is used by netlets to talk to their hosting node. Primarily a netlet uses this to bind services using a warrant. But it is also used if the netlet wants to bind to node facets.

INetlet is the counterpart of INode. It lets the node talk to the netlet, and without implementing this interface a class is not a netlet. Methods it must implement are initialise() for when the node initially binds it; terminate(), a notification that the node is terminating it; bindService() for when another netlet wants to make use of it; getFacets() for the node to find out what netlet facets it provides; bindFacet() for the node to bind to one of these netlet facets.

IService allows netlets to communicate with each other. When a client netlet binds to a service each gets the other's IService interface in return. Through this interface either one can terminate the relationship or bind to the other's facets. Thus the IService interface includes the methods terminate(), getFacets() (to allow another netlet to find out what service facets are available) and bindFacet() (to allow another netlet to bind to one of them). IService is a good name for this interface because strictly speaking netlets don't bind with each other--they bind to their services. However, it's important to realise that IService represents a single connection to a service, it does not represent the entire service itself.

IRemote is the top level super-interface of all service interfaces. When a service is bound the bindService() method returns an IRemote object, and the client then casts this into whatever type is needed.

Nik Silver 2002-03-09