0
Systems Integrationin the Cloud Erawith Apache CamelKai Wähner (Twitter: @KaiWaehner)MaibornWolff et al GmbH
Kai Wähner (MaibornWolff et al GmbH)                                      Main Tasks                         Evaluation of...
What is the Problem?                       Growth                       •  Applications                       •  Interface...
A new Era: Cloud Computing
Solution: Systems Integration                       All Roads lead                         to Rome ...
Wishes         •  Standardized Modeling         •  Efficient Realization         •  Automatic Testing
Systems Integration in the Cloud Era
What is the Key Message?
Key MessagesThe Cloud already arrived, and must be integrated!
Key MessagesThe Cloud already arrived, and must be integrated!Cloud Integration is already possible!
Key MessagesThe Cloud already arrived, and must be integrated!Cloud Integration is already possible!Apache Camel helps a l...
Agenda 1) Introduction to Cloud Computing 2) Introduction to Apache Camel 3) IaaS Integration (Amazon Web Services) 4) Paa...
Agenda 1) Introduction to Cloud Computing 2) Introduction to Apache Camel 3) IaaS Integration (Amazon Web Services) 4) Paa...
Cloud Computing                             Infrastructure    Platform       Software                On Premise On Premise...
Every Vendor offers Cloud Products
Agenda 1) Introduction to Cloud Computing 2) Introduction to Apache Camel 3) IaaS Integration (Amazon Web Services) 4) Paa...
Alternatives for Systems Integration                          Enterprise Service Bus            Integration            (ES...
Alternatives for Systems Integration                                                                       Enterprise Serv...
Enterprise Integration Patterns (EIP)                            Apache Camel                          Implements the EIPs
Enterprise Integration Patterns (EIP)
Enterprise Integration Patterns (EIP)
Apache Camel               http://java.dzone.com/articles/apache-camel-integration
Choose your favorite DSL                           XML                             (not production-ready yet)
Choose your required Components                 TCPSQL                                                 SMTP               ...
Deploy it wherever you needStandalone             Application Server         Web Container                         Spring ...
Enterprise-ready
Live Demo            Apache Camel in Action
Agenda 1) Introduction to Cloud Computing 2) Introduction to Apache Camel 3) IaaS Integration (Amazon Web Services) 4) Paa...
Cloud Computing                             Infrastructure    Platform       Software                On Premise On Premise...
IaaS Overview
IaaS Concepts                Compute                Amazon Elastic Compute Cloud (EC2)                Amazon Elastic MapRe...
Code Example - AWS S3 (Java API)     AmazonS3 s3 = new AmazonS3Client(new PropertiesCredentials(        S3Sample.class.get...
Code Example - Camel AWS Component// Producerfrom("direct:startToS3")   .setHeader(S3Constants.KEY, simple(“order.txt"))  ...
Live Demo            IaaS Integration in Action
Agenda 1) Introduction to Cloud Computing 2) Introduction to Apache Camel 3) IaaS Integration (Amazon Web Services) 4) Paa...
Cloud Computing                             Infrastructure    Platform       Software                On Premise On Premise...
PaaS Overview Elastic Beanstalk
PaaS Concepts                Application Deployment                Easy Deployment                Automatic Scaling       ...
Hint       Google App Engine       is a complex scenario for Apache       Camel due to its many restrictions!       Other ...
Code Example - Google App Engine (Java API)   public class GAEJCreateTaskServlet extends HttpServlet {                publ...
Code Example – Camel GAE Component
Code Example – Camel GAE Component
Live Demo            PaaS Integration in Action
Agenda 1) Introduction to Cloud Computing 2) Introduction to Apache Camel 3) IaaS Integration (Amazon Web Services) 4) Paa...
Cloud Computing                             Infrastructure    Platform       Software                On Premise On Premise...
SaaS Overview
SaaS Concepts                            Software (CRM)                            Sales                            Servic...
Code Example – Salesforce (Java API)        ConnectorConfig config = new ConnectorConfig();           config.setUsername(u...
Code Example – Camel Salesforce Component  // Producer   from("direct:toSalesforce“)   .to("salesforce://Article__c?user=m...
Live Demo            SaaS Integration in Action
Agenda 1) Introduction to Cloud Computing 2) Introduction to Apache Camel 3) IaaS Integration (Amazon Web Services) 4) Paa...
Custom Cloud Components                                Component                                     Creates              ...
Live Demo            Custom Cloud Component in Action
Alternative for Custom Cloud Components                                          •  SOAP                                  ...
Code Example – Salesforce REST (HTTP)// Salesforce Query (SOQL) via REST APIfrom("direct:salesforceViaHttpLIST")     .setH...
Live Demo            Cloud Integration via REST in Action
Did you get the Key Message?
Key MessagesThe Cloud already arrived, and must be integrated!Cloud Integration is already possible!Apache Camel helps a l...
Did you get the Key Message?
Whet your Appetite?
Become a Part of the Open Source Community
Kai Wähner                www.mwea.deMaibornWolff et al GmbH   www.kai-waehner.de                          kai.waehner@mwe...
Upcoming SlideShare
Loading in...5
×

Jazoon 2012 - Systems Integration in the Cloud Era with Apache Camel

1,420

Published on

Talk at Jazoon 2012 in Zurich about Systems Integration in the Cloud Era with Apache Camel.

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,420
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
36
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "Jazoon 2012 - Systems Integration in the Cloud Era with Apache Camel"

  1. 1. Systems Integrationin the Cloud Erawith Apache CamelKai Wähner (Twitter: @KaiWaehner)MaibornWolff et al GmbH
  2. 2. Kai Wähner (MaibornWolff et al GmbH) Main Tasks Evaluation of Technologies and Products Requirements Engineering Enterprise Architecture Management Business Process Management Architecture and Development of Applications Planning and Introduction of SOA Integration of Legacy Applications Cloud Computing Consulting Contact Developing Email: kai.waehner@mwea.de Speaking Blog: www.kai-waehner.de/blog Coaching Twitter: @KaiWaehner Writing Social Networks: Xing, LinkedIn
  3. 3. What is the Problem? Growth •  Applications •  Interfaces •  Technologies •  Products
  4. 4. A new Era: Cloud Computing
  5. 5. Solution: Systems Integration All Roads lead to Rome ...
  6. 6. Wishes •  Standardized Modeling •  Efficient Realization •  Automatic Testing
  7. 7. Systems Integration in the Cloud Era
  8. 8. What is the Key Message?
  9. 9. Key MessagesThe Cloud already arrived, and must be integrated!
  10. 10. Key MessagesThe Cloud already arrived, and must be integrated!Cloud Integration is already possible!
  11. 11. Key MessagesThe Cloud already arrived, and must be integrated!Cloud Integration is already possible!Apache Camel helps a lot!
  12. 12. Agenda 1) Introduction to Cloud Computing 2) Introduction to Apache Camel 3) IaaS Integration (Amazon Web Services) 4) PaaS Integration (Google App Engine) 5) SaaS Integration (Salesforce) 6) Custom Cloud Components
  13. 13. Agenda 1) Introduction to Cloud Computing 2) Introduction to Apache Camel 3) IaaS Integration (Amazon Web Services) 4) PaaS Integration (Google App Engine) 5) SaaS Integration (Salesforce) 6) Custom Cloud Components
  14. 14. Cloud Computing Infrastructure Platform Software On Premise On Premise as a Service as a Service as a Service hosted (IaaS) (PaaS) (SaaS) App App App App App VM VM VM VM VM Server Server Server Server Server Storage Storage Storage Storage Storage Network Network Network Network Network Organisation Control Vendor has control is shared has control
  15. 15. Every Vendor offers Cloud Products
  16. 16. Agenda 1) Introduction to Cloud Computing 2) Introduction to Apache Camel 3) IaaS Integration (Amazon Web Services) 4) PaaS Integration (Google App Engine) 5) SaaS Integration (Salesforce) 6) Custom Cloud Components
  17. 17. Alternatives for Systems Integration Enterprise Service Bus Integration (ESB) No Tool Framework Complexity of IntegrationLow High
  18. 18. Alternatives for Systems Integration Enterprise Service Bus Integration (ESB) No Tool Framework Complexity of Integration Low High Apache Camel vs. Spring Integration vs. Mule ESBhttp://www.kai-waehner.de/blog/2012/01/10/spoilt-for-choice-which-integration-framework-to-use-spring-integration-mule-esb-or-apache-camel/
  19. 19. Enterprise Integration Patterns (EIP) Apache Camel Implements the EIPs
  20. 20. Enterprise Integration Patterns (EIP)
  21. 21. Enterprise Integration Patterns (EIP)
  22. 22. Apache Camel http://java.dzone.com/articles/apache-camel-integration
  23. 23. Choose your favorite DSL XML (not production-ready yet)
  24. 24. Choose your required Components TCPSQL SMTP JMS Netty Jetty RMI FTP Lucene JDBC EJB Bean-Validation MQ IRC JMX Quartz RSS AMQP Atom Log AWS-S3 HTTP XSLT LDAPFile Akka Many many more CXF Custom Components
  25. 25. Deploy it wherever you needStandalone Application Server Web Container Spring Container OSGi Cloud
  26. 26. Enterprise-ready
  27. 27. Live Demo Apache Camel in Action
  28. 28. Agenda 1) Introduction to Cloud Computing 2) Introduction to Apache Camel 3) IaaS Integration (Amazon Web Services) 4) PaaS Integration (Google App Engine) 5) SaaS Integration (Salesforce) 6) Custom Cloud Components
  29. 29. Cloud Computing Infrastructure Platform Software On Premise On Premise as a Service as a Service as a Service hosted (IaaS) (PaaS) (SaaS) App App App App App VM VM VM VM VM Server Server Server Server Server Storage Storage Storage Storage Storage Network Network Network Network Network Organisation Control Vendor has control is shared has control
  30. 30. IaaS Overview
  31. 31. IaaS Concepts Compute Amazon Elastic Compute Cloud (EC2) Amazon Elastic MapReduce (EMR) Storage Amazon Simple Storage Service (S3) Amazon Elastic Block Store (EBS) SimpleDB (SDB) Database Amazon Relational Database Service (RDS) Amazon DynamoDB (DDB) Amazon ElastiCache Application Services Amazon Simple Workflow Service (SWF) Amazon Simple Queue Service (SQS) Amazon Simple Notification Service (SNS) Amazon Simple Email Service (SES) Many more ...
  32. 32. Code Example - AWS S3 (Java API) AmazonS3 s3 = new AmazonS3Client(new PropertiesCredentials( S3Sample.class.getResourceAsStream("AwsCredentials.properties"))); String bucketName = "my-first-s3-bucket-" + UUID.randomUUID(); String key = "MyObjectKey"; try { s3.createBucket(bucketName); s3.putObject(new PutObjectRequest(bucketName, key, createSampleFile())); S3Object object = s3.getObject(new GetObjectRequest(bucketName, key)); ObjectListing objectListing = s3.listObjects(new ListObjectsRequest() .withBucketName(bucketName) .withPrefix("My")); s3.deleteObject(bucketName, key); s3.deleteBucket(bucketName); } catch (AmazonServiceException ase) { // error handling... } catch (AmazonClientException ace) { // error handling... }
  33. 33. Code Example - Camel AWS Component// Producerfrom("direct:startToS3") .setHeader(S3Constants.KEY, simple(“order.txt")) .to("aws-s3://myBucket?accessKey=" + myAccessKey + "&secretKey= " + mySecretKey)// Consumerfrom("aws-s3://myBucket?accessKey=“myAccessKey + "&secretKey=" + mySecretKey) .to("log:S3logging")
  34. 34. Live Demo IaaS Integration in Action
  35. 35. Agenda 1) Introduction to Cloud Computing 2) Introduction to Apache Camel 3) IaaS Integration (Amazon Web Services) 4) PaaS Integration (Google App Engine) 5) SaaS Integration (Salesforce) 6) Custom Cloud Components
  36. 36. Cloud Computing Infrastructure Platform Software On Premise On Premise as a Service as a Service as a Service hosted (IaaS) (PaaS) (SaaS) App App App App App VM VM VM VM VM Server Server Server Server Server Storage Storage Storage Storage Storage Network Network Network Network Network Organisation Control Vendor has control is shared has control
  37. 37. PaaS Overview Elastic Beanstalk
  38. 38. PaaS Concepts Application Deployment Easy Deployment Automatic Scaling Development Restrictions JRE Class White List Workarounds for Frameworks No „naked“ Domains No „write once run everywhere“ Quotas and Limits Services Push Queue Pull Queue URL Fetch Accounts Mail Memcache XMPP Images Datastore Cloud Storage Cloud SQL
  39. 39. Hint Google App Engine is a complex scenario for Apache Camel due to its many restrictions! Other „more open“ PaaS solutions such as OpenShift or Heroku are easier to use ...
  40. 40. Code Example - Google App Engine (Java API) public class GAEJCreateTaskServlet extends HttpServlet { public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException { String strCallResult = ""; resp.setContentType("text/plain"); try { String strEmailId = req.getParameter("emailid"); if (strEmailId == null) throw new Exception ("Email Id field cannot be empty."); strEmailId = strEmailId.trim(); if (strEmailId.length() == 0) throw new Exception("Email Id field cannot be empty."); Queue queue = QueueFactory.getQueue("subscription-queue"); queue.add(TaskOptions.Builder.url(“signupsubscriber“) .param("emailid",strEmailId)); strCallResult = "Successfully created a Task in the Queue"; resp.getWriter().println(strCallResult); } catch (Exception ex) { strCallResult = "Fail: " + ex.getMessage(); resp.getWriter().println(strCallResult); } }}
  41. 41. Code Example – Camel GAE Component
  42. 42. Code Example – Camel GAE Component
  43. 43. Live Demo PaaS Integration in Action
  44. 44. Agenda 1) Introduction to Cloud Computing 2) Introduction to Apache Camel 3) IaaS Integration (Amazon Web Services) 4) PaaS Integration (Google App Engine) 5) SaaS Integration (Salesforce) 6) Custom Cloud Components
  45. 45. Cloud Computing Infrastructure Platform Software On Premise On Premise as a Service as a Service as a Service hosted (IaaS) (PaaS) (SaaS) App App App App App VM VM VM VM VM Server Server Server Server Server Storage Storage Storage Storage Storage Network Network Network Network Network Organisation Control Vendor has control is shared has control
  46. 46. SaaS Overview
  47. 47. SaaS Concepts Software (CRM) Sales Service Social Data.com AppExchange ... more ... Development Online-Development (even the Compiler is in the Cloud!) Own Addons  Force.com (PaaS) Apex Integration of Interfaces Visualforce REST SOAP Client APIs (Java, etc.)
  48. 48. Code Example – Salesforce (Java API) ConnectorConfig config = new ConnectorConfig(); config.setUsername(userId); config.setPassword(passwd); config.setAuthEndpoint(authEndPoint); connection = new EnterpriseConnection(config); GetUserInfoResult userInfo = connection.getUserInfo(); System.out.println("User Full Name: " + userInfo.getUserFullName()); QueryResult qResult = null; String soqlQuery = "SELECT FirstName, LastName FROM Contact"; // SOQL qResult = connection.query(soqlQuery); boolean done = false; if (qResult.getSize() > 0) { System.out.println("Logged-in user can see " + qResult.getRecords().length + " contact records." ); while (! done) { SObject[] records = qResult.getRecords(); for ( int i = 0; i < records.length; ++i ) { Contact con = (Contact) records[i]; String fName = con.getFirstName(); String lName = con.getLastName(); // ... more stuff here ...
  49. 49. Code Example – Camel Salesforce Component // Producer from("direct:toSalesforce“) .to("salesforce://Article__c?user=myUser&password=myPasswordj&item=myItem"); // Consumer from("salesforce://Article__c?user=myUser&password=myPassword") .to("mock:fromSalesforce");
  50. 50. Live Demo SaaS Integration in Action
  51. 51. Agenda 1) Introduction to Cloud Computing 2) Introduction to Apache Camel 3) IaaS Integration (Amazon Web Services) 4) PaaS Integration (Google App Engine) 5) SaaS Integration (Salesforce) 6) Custom Cloud Components
  52. 52. Custom Cloud Components Component Creates Endpoint Consumer Producer
  53. 53. Live Demo Custom Cloud Component in Action
  54. 54. Alternative for Custom Cloud Components •  SOAP •  REST
  55. 55. Code Example – Salesforce REST (HTTP)// Salesforce Query (SOQL) via REST APIfrom("direct:salesforceViaHttpLIST") .setHeader("X-PrettyPrint", 1) .setHeader("Authorization", accessToken) .setHeader(Exchange.CONTENT_TYPE, "application/json").to("https://na14.salesforce.com/services/data/v20.0/query?q=SELECT+name+from +Article__c")// Salesforce CREATE via REST APIfrom("direct:salesforceViaHttpCREATE") .setHeader("X-PrettyPrint", 1) .setHeader("Authorization", accessToken) .setHeader(Exchange.CONTENT_TYPE, "application/json“).to("https://na14.salesforce.com/services/data/v20.0/sobjects/Article__c")
  56. 56. Live Demo Cloud Integration via REST in Action
  57. 57. Did you get the Key Message?
  58. 58. Key MessagesThe Cloud already arrived, and must be integrated!Cloud Integration is already possible!Apache Camel helps a lot!
  59. 59. Did you get the Key Message?
  60. 60. Whet your Appetite?
  61. 61. Become a Part of the Open Source Community
  62. 62. Kai Wähner www.mwea.deMaibornWolff et al GmbH www.kai-waehner.de kai.waehner@mwea.de @KaiWaehner
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×