• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Camel as a_glue
 

Camel as a_glue

on

  • 2,123 views

 

Statistics

Views

Total Views
2,123
Views on SlideShare
790
Embed Views
1,333

Actions

Likes
1
Downloads
6
Comments
0

17 Embeds 1,333

http://jug-lviv.blogspot.com 1114
http://normama.ru 187
http://jug-lviv.blogspot.de 8
http://www.jug-lviv.blogspot.com 3
http://jug-lviv.blogspot.nl 3
http://jug-lviv.blogspot.co.uk 2
http://jug-lviv.blogspot.ie 2
http://jug-lviv.blogspot.in 2
http://jug-lviv.blogspot.se 2
http://xss.yandex.net 2
http://jug-lviv.blogspot.cz 2
http://jug-lviv.blogspot.it 1
http://jug-lviv.blogspot.fr 1
http://1709025170792884896_dacaa92860e94ec4e147c65051e253e203d8fa0c.blogspot.in 1
http://jug-lviv.blogspot.dk 1
http://www.normama.ru 1
http://translate.yandex.net 1
More...

Accessibility

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Camel as a_glue Camel as a_glue Presentation Transcript

    • Camelas a Glue
    • Project. How we planned it
    • Project. How we imagine it.
    • Project. In practice.
    • Integration project. In practice.
    • How to handle it?
    • RTFM.Enterprise Integration Patterns: Designing, Building, and Deploying Messaging Solutions
    • Specific tool• Apache Camel• Spring Integration• Enterprise Service Bus (Mule ESB) Read article
    • Apache Camel. Pros.Pros• Lighweight• A lot components• Support many Data Formats• Good community• DSL(XML, Java, Scala, Groovy)• Spring integration
    • Apache Camel. Cons.• Messy documentations
    • Basic example. XML DSLcamel-config.xml<camelContext>…………………………………………………. <route> <from uri="servlet:///my_url" /> <bean ref=“urlHandler” method=“handle" /> <transform> <constant>DONE</constant> </transform> </route>………………………………………………….</camelContext>
    • Basic example. JAVA DSL public class MyRouteBuilder extends RouteBuilder{ public void configure() { from(" servlet:///my_url "). process(new UrlHandler()).to("direct:b"); }};Orpublic class MyRouteBuilder extends RouteBuilder{ public void configure() { from(" servlet:///my_url "). processRef(“urlHandler”).to("direct:b"); }};
    • Processor@Component(“urlHandler”)public class UrlHandler{ public void handle(Exchange ex){ ex.getIn(); //handle input }}
    • More complex example<route> <from uri="activemq:queue:queueName" /> <unmarshal ref="xstream-utf8" /> <bean ref=“firstProcessor" method="process" /> <bean ref=“secondProcessor" method="process" />……………………………………………………………………………………. <bean ref=“lastProcessor" method="process" /> <to uri="direct:anotherRoute" /></route>
    • Components• Amazon stack• Apache stack(service miz, fop, cxf,)• DBs(jdbc, jpa, ibatis)• EJB• File(ftp, ftps, file, hdfs)• Google stack(gae, guice, gmail, gtask)• Hazelcast• JMS• JMX• Mail (IMAP, POP)• Queues• Twitter• Many others
    • Components exampleTo poll, every 5 sec., all statuses on your home timeline and send to gmail:Java DSLfrom("twitter://timeline/home?type=polling&delay=5&consumerKey=[s]&co nsumerSecret=[s]&accessToken=[s]&accessTokenSecret=[s]").to("gmail://a ccount1@gmail.com")XML DSL<route> <from uri="twitter://timeline/home?type=polling&delay=5&consumerKey=[s]&c onsumerSecret=[s]&accessToken=[s]&accessTokenSecret=[s]"/> <to uri=" gmail://account1@gmail.com "/></route>
    • Data Formats• Standard java serialization• Object marshalling (json, protobuf)• Object xml marshalling (xstream, jaxb, jixb, castor, xmlbeans• Object/XML/Webservice marshalling (SOAP)• Direct JSON / XML marshalling• Flat data structure marshalling (BeanIO, bindy, csv, edi, flatpack dataformat)• Domain specific marshalling (HL7)• Compression (gzip, zip)• Security (Crypto, PGP, XMLsecurity)• Misc (custom dataformat, rss, syslog, tidymarkup)• Dozer Type Conversion
    • Marshalling example<route> <from uri="direct:start"/> <marshal ref="myJaxb"/> <to uri="direct:marshalled"/></route><route> <from uri="direct:marshalled"/> <unmarshal ref="myJaxb"/> <to uri="mock:result"/></route>
    • EIP• Dynamic Router• Recipient List• Message Filter• Wire Tap• Throttler• Load Balancer• Multicast• Others
    • Summary
    • Questions?