Introduction

First read the Elevator pitch and One Minute Introduction.

Plastic Architecture

PLASTIC is based on a very simple publish-subscribe architecture. Applications register themselves with a locally running "Plastic Hub" using one of the supported communication protocols. The Hub is then responsible for routing messages to one or more recipients.

About Plastic Messages

Instructions are sent to other applications by means of messages, which may include a number of arguments and may also return a value. Although a set of core messages has been defined, application developers are free to extend PLASTIC by defining new messages. Contact the developer mailing list first to see if anyone has already defined a suitable message.

Plastic message strings are URIs, and all current messages have been chosen to be IVORNs of the form ivo://authId/key, to allow their future registration in IVOA-standard registries. This would bring the following benefits:

  • Guaranteeing uniqueness
  • A central reference where the meaning of a message can be stored
  • Facilitating the automatic discovery of applications with particular capabilities

Communication Protocols

Communication with the Hub can be via XML-RPC or Java-RMI. Other protocols may be added if there is demand.

Java-RMI

Java-RMI will probably be the first choice of developers working in Java since it is strongly typed and involves very little work on the developer's part.

The client must create an object implementing the PlasticListener interface to receive incoming messages. This object is passed to the Hub at registration time.

xml-rpc

The xml-rpc interface is suitable for other high-level languages that are blessed with an xml-rpc library such as Python or Perl. The xml-rpc interface is less strongly typed and involves a little more work on the client developer's part since their application must include an xml-rpc server through which they can receive messages from the Hub. The URL of this server is passed to the Hub at registration time.

Getting started

Full details on the use of PLASTIC can be found in the Plastic Specification. A summary of the steps involved in using PLASTIC is:

  • User or client application starts a Plastic Hub
  • Client application reads a "well-known" file to obtain the location of the Plastic Hub
  • Client application registers with the Hub and obtains an ID
  • Client routes messages to other registered applications through the Hub
  • Before terminating, client application unregisters from the Hub
Although the Plastic Specification includes Javadocs for the Plastic interfaces they are also linked here for convenience: here (Java 1.5) and here (Java 1.4) . Even if you are not using Java, these docs are a good reference guide for the available methods. Guidance on using these Javadocs when working in xml-rpc is available. For examples of using Plastic in various languages, consult the Plastic in... pages.

SourceForge.net Logo