The goal we have is to make it as simple as possible for mobile clients to connect to backend services.
We know the incoming transport protocol which will be HTTP. So we need something that takes these HTTP requests, pass them along to the backend service and returns the result (if any).
Using Apache Camel
Camel has a Servlet component that allows for configuring routes from a specified path. The following image will be used to explain the idea here:
The deployment in this case would be a web application archive (war) with the CamelServlet as the reciever of all requests. The path determines which route gets invoked. Even though the diagram above shows a
Database system as the backend service, this is only because that is the Camel component used in the example, and that box could be replaced by any Camel component.
For the configuration of routes, the diagram above shows two of Camel's available DSLs.
To try out this idea the following projects have been created:
Contains some classes that were required to get this working on AS7 and also contains a dummy route to demonstrate how provided routes could be added.
Has a dependency to aerogear-camel and adds two routes that use Camel's SQL Component to retrieve data from a database.
There have been request for a
no-code configuration, or as little code as possible, to create the integrations. The XML DSL example is an example of a just providing a xml file to configure a route. This xml file could be generated in any manner and deployed with the war. For example, one could imagine that the xml is generated by a web based GUI and then the deployment assembled and deployed to a server. Though this might look nice in a demo I would hardly think any developers would really use this for anything but just a demo or getting started (but we have scaffolding for getting started).
Currently, Camel has support for Shiro and Spring Security. Security is implemented using a security policy and added to routes using the
policy method. To provide a security policy for PicketLink should be possible but we would have to investigate this further.