- What is a pipeline ?
A pipeline represents a set of n connections to a server. The pipeline class offers some simple 'management' APIs to work with containing 'pipe' objects. Basically it allows you to add or remove new connections to the pipeline.
- What is a pipe ?
A pipe represents one connection to a server. The pipe API is basically an abstraction layer for any server side connection, which all allows you to simply 'read' from, or 'write' to a server connection. However, technical details like RESTful APIs (e.g. HTTP PUT or HTTT GET) are not exposed on the pipeline and pipe APIs. In the future you can have different type of pipe objects (-> connections). The default (and CURRENTLY only supported) type is a REST connection.
Below is an example from our JavaScript lib:
// create an empty pipeline:
var myPipeline = aerogear.pipeline();
// Add a connection/pipe object which is named 'myprojects' and points to a given server (RESTful) endpoint:
myPipeline.add({name: "myprojects", settings: {url: "https://todo-aerogear.rhcloud.com/todo-server/projects"}})
// Reading data from the 'myprojects' connection:
myPipeline.pipes['myprojects'].read();
In the above snippet the read will issue a HTTP GET request, but that fact is hidden to the user of the API. The user basically reads data from the server connection.