|« Tornado Web Server CORS||How develop and deploy an application in the cloud. A referencial architecture (Part 1) »|
This is an example of the functioning and utility of Apache Camel and Framework for the implementation of routes, automation and integration of technologies under a Service Oriented Architecture (SOA).
The example is the development of an automated process that consumes a REST API data with financial indicators. The process triggered by a timer every 12 hours, generating a JSON message with the name of the indicator and the current date; with these values the indicator value is rescued from the Internet (consuming a REST API), incorporating the retrieved value to the original message (the message enriches JSON) value, gives a format tweet (140 characters), publishes a tweet Twitter account (@ClDatos) and finally the message (resulting JSON) is stored in a NoSQL database (MongoDB).
The defined route, integrates several actors and components (and related technologies). On the way to enrich an original message, it consumes a Internet REST API (www.mindicador.cl), where the value of a financial indicator for the current date are consulted; after transforms the JSON in a tweet to be posted on twitter (@ClDatos account) and finally, the resulting JSON is stored in a database MongoDB.
To development of this route, we use:
- Apache - Camel 2.15.2
- Spring to configure the CamelContext and the route .
- Camel - Timer.
- Camel - Twitter.
- Camel - MongoDB.
To deploy the route (war) on the cloud, we use Openshift with Tomcat 7 (JBoss EWS 2.0) and MongoDB 2.4 cartridges.
See in riute un http://indicadores-devcon.rhcloud.com/
Finally, you can see the results on @ClDatos (the end of the route).