Skip to content

Instantly share code, notes, and snippets.

@cvasilak
Forked from matzew/gist:3838816
Created October 8, 2012 08:04
Show Gist options
  • Save cvasilak/3851304 to your computer and use it in GitHub Desktop.
Save cvasilak/3851304 to your computer and use it in GitHub Desktop.
FAQ or Wiki or ...
  • 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: {baseURL: "https://todo-aerogear.rhcloud.com/todo-server/", endPoint: "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.

  • What is a datamanager ?

A datamanager represents a set of n 'data store' implementations. The datamanager class offers some simple 'management' APIs to work with containing 'store' objects. Basically it allows you to add or remove new stores to the datamanager.

  • What is a store ?

A store represents one concrete data store. The store API is basically a mechanism for connecting to and moving data in and out of different types of client side storage. The default implementation in all client platforms is an 'in memory' storage system. Similar to the pipe API technical details of the underlying storage system are not exposed.

// JS code... TO BE ADDED
  • What is a authentication manager ?

A authentication manager represents a set of n authentication modules. The authentication manager class offers some simple 'management' APIs to work with containing 'auth modules'. Basically it allows you to add or remove new modules to the authentication manager.

  • What is a authentication module ?

The API represents one concrete authentication module. The API is basically an abstraction layer for 'login', 'logoff' and 'signup. The default implementation uses REST as the auth transport. Similar to the pipe API technical details of the underlying system are not exposed.

// JS code... TO BE ADDED
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment