Binding in Tuscany

yjlin's picture

Tuscany is aiming to create a robust and easy to use infrastructure that simplifies the development of service-based application networks and addresses real business problems posed in SOA.

It is an infrastructure which is very similar to Eclipse in terms of extension mechanism. The core is tightly written, and lots of other functionalities are implemented as extensions. Binding is one of them, Tuscany has already incorporated a few binding extensions such as Atom, RSS even http.

First of all, we need to understand what is binding in Tuscany. References use bindings to describe the access mechanism used to call a service. Services use bindings to describe the access mechanism that clients have to use to call the service.

Here are two parts, references and services.
Services are basically components in Tuscany providing certain functionalities. One service may depend on other services, Tuscany use references to describe this kind of dependency relationship.

Bindings determine how a component communicates with the world outside its domain; bindings can be assigned to both services and to references

That's to say, bindings are used to describe access mechanism, what goes on the “Wire”. What goes on the “Wire” includes the data format and communication protocol, like RSS is one of bindings in Tuscany. That means the composition will talk to remote services using RSS protocol. The data sent to remote services should be RSS request, and the data received from remote services will be RSS feed.

One might say, if two components are connected with the "Wire", and communication takes places over the "Wire", then they have to agree on the data format and communication protocol, the agreement should be binding, right?
Exactly, this is the binding among services, so called references.

yjlin's picture

add a new binding in Tuscany

Generally, there are six steps for a new binding in Tuscany, as follows:

1. Define the model extension for reference and service binding;

2. Define interfaces/classes to represent the model for the binding ;

3. Implement the StAXArtifactProcessor to read/resolve/write the models;

4. Add the runtime logic by implementing the BindingProviderFactory, ReferenceBindingProvider, ServiceBindingProvider SPIs;

5. Implement the ModuleActivator interface to hook up the StAXArtifactProcessor and BindingProviderFactory with respective extension points;

6. Contribute an extension module to Tuscany

yjlin's picture

GDate for idSpace

Google Data APIs (GData for short) provide a simple standard protocol for reading and writing data on the web. GData uses either of two standard XML-based syndication formats: Atom or RSS. It also has a feed-publishing system that consists of the Atom publishing protocol plus some extensions (using Atom's standard extension model) for handling queries.

Google uses GData to provide services. If we want to use google's services, then we should conform GData. There are two aspects of GData:
(1) the syndicate format: Atom/RSS
(2) communication protocal: Atom Publishing Protocol

However, tuscany has not incorporated GData binding yet. If we can integrate Gdata with Tuscany, then we may base our integration of different creativity tools/techniques on this platform. That should be a powerful platform.

Peter Dolog's picture

GData is for indexing by google

GData is not yet neccessary for the idSpace as we do not work on indexing the creativity techniques by Google yet.