Integration     &         DSL  #TDC2011
@porcelli                                                                    Alexandre Porcelli                           ...
integration
THE reference
cloud
problems...
silos
3443
#facts✓   #1 OPEN SOURCE ESB✓   OVER 1.5 MILLION DOWNLOADS✓   2500+ PRODUCTION DEPLOYMENTS✓   PERFORMANCE: 10000 TPS✓   SC...
enterprise...                                Mule ESB    Mule ESB                                Community   Enterprise  H...
customers...
mule studio!
tech spec...
cloud connectors...
POJO! @Connector(namespacePrefix="my-push") public class MyPushCloudConnector {     /**         * Hostname of My Push Noti...
<flow name="Hello World">    <composite-source>        <!-- Incoming HTTP requests -->        <inbound-endpoint address="h...
xml?
so what?
MuleContex context = Mule.newMuleContext();Flow myFlow = new Flow();myFlow.setName("MyFlow");InboundEndpoint myIn = new Ge...
NO!
DSL!
goals... ➡ Expressive & Natural ➡ Easy to Use & Learn ➡ Hard to Misuse ➡ Extensible
Mule.newMuleContext(new AbstractModule() {    @Override    public void configure() {        flow("MyFlow")                ...
remember?MuleContex context = Mule.newMuleContext();Flow myFlow = new Flow();myFlow.setName("MyFlow");InboundEndpoint myIn...
feedback?
cloud...final TwitterConnector twitterConnector = new TwitterConnector();twitterConnector.setConsumerKey("key");twitterCon...
demo
questions?
Thanks!                    alexandre.porcelli@gmail.com                    github.com/porcelliabout.me/porcelli   linkedin...
Integration & DSL
Integration & DSL
Integration & DSL
Integration & DSL
Integration & DSL
Integration & DSL
Integration & DSL
Integration & DSL
Upcoming SlideShare
Loading in...5
×

Integration & DSL

1,383

Published on

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

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

No notes for slide

Integration & DSL

  1. 1. Integration & DSL #TDC2011
  2. 2. @porcelli Alexandre Porcelli FounderAlexandre PorcelliWriter Alexandre Porcelli Organizer Alexandre Porcelli Commiter / Parser Developer Alexandre Porcelli API Designer / Developer
  3. 3. integration
  4. 4. THE reference
  5. 5. cloud
  6. 6. problems...
  7. 7. silos
  8. 8. 3443
  9. 9. #facts✓ #1 OPEN SOURCE ESB✓ OVER 1.5 MILLION DOWNLOADS✓ 2500+ PRODUCTION DEPLOYMENTS✓ PERFORMANCE: 10000 TPS✓ SCALABLE: 13000 DEPLOYED SERVERS✓ 100+ CONNECTORS APPS & PROTOCOLS✓ CLOUD CONNECTORS
  10. 10. enterprise... Mule ESB Mule ESB Community Enterprise High-performance ESB   Access to source code   Community extensions   Management Console  High availability  Premium Connectors  Self-healing connections  Technical Support  Knowledge Base  Service packs / hot patches  QA  Enterprise documentation  Enterprise license 
  11. 11. customers...
  12. 12. mule studio!
  13. 13. tech spec...
  14. 14. cloud connectors...
  15. 15. POJO! @Connector(namespacePrefix="my-push") public class MyPushCloudConnector { /** * Hostname of My Push Notification Gateway */ @Property private String host; @Operation public void send(String deviceToken, @Parameter(optional=true) String alert, @Parameter(optional=true) String sound, @Parameter (optional=true, defaultValue="-1") int badge, @Parameter (optional=true) Map<String,String> fields) { ... } }
  16. 16. <flow name="Hello World"> <composite-source> <!-- Incoming HTTP requests --> <inbound-endpoint address="http://localhost:8888" transformer-refs="HttpRequestToNameString" exchange-pattern="request-response" <not-filter> <wildcard-filter pattern="/favicon.ico"/> </not-filter> </inbound-endpoint> <!-- Incoming Servlet requests --> <inbound-endpoint address="servlet://name" transformer-refs="HttpRequestToNameString" exchange-pattern="request-response"> <not-filter> <wildcard-filter pattern="/favicon.ico"/> </not-filter> </inbound-endpoint> <!-- Incoming VM requests --> <vm:inbound-endpoint path="greeter" transformer-refs="StringToNameString" exchange-pattern="request-response"/> </composite-source> <component class="org.mule.example.hello.Greeter"/> <choice> <when expression="payload instanceof org.mule.example.hello.NameString" evaluator="groovy"> <vm:outbound-endpoint path="chitchatter" exchange-pattern="request-response"/> </when> <when expression="payload instanceof java.lang.Exception" evaluator="groovy"> <vm:outbound-endpoint path="userErrorHandler" exchange-pattern="request-response"/> </when> </choice> <!-- Route unexpected errors to separate error handler --> <default-exception-strategy> <vm:outbound-endpoint path="systemErrorHandler" exchange-pattern="one-way"/> </default-exception-strategy></flow>
  17. 17. xml?
  18. 18. so what?
  19. 19. MuleContex context = Mule.newMuleContext();Flow myFlow = new Flow();myFlow.setName("MyFlow");InboundEndpoint myIn = new GenericInboundEndpoint();myIn.setURL("file:///Users/porcelli/in");OutboundEndpoint myOut = new GenericOutboundEndpoint();myIn.setURL("file:///Users/porcelli/out");myFlow.setInbound(myIn);myFlow.addMessageProcessor(myOut);context.addFlow(myFlow); ok?muleContext.start();
  20. 20. NO!
  21. 21. DSL!
  22. 22. goals... ➡ Expressive & Natural ➡ Easy to Use & Learn ➡ Hard to Misuse ➡ Extensible
  23. 23. Mule.newMuleContext(new AbstractModule() { @Override public void configure() { flow("MyFlow") .from("file:///Users/porcelli/in") .send("file:///Users/porcelli/out"); }}).start();
  24. 24. remember?MuleContex context = Mule.newMuleContext();Flow myFlow = new Flow();myFlow.setName("MyFlow");InboundEndpoint myIn = new GenericInboundEndpoint();myIn.setURL("file:///Users/porcelli/in");OutboundEndpoint myOut = new GenericOutboundEndpoint();myIn.setURL("file:///Users/porcelli/out");myFlow.setInbound(myIn);myFlow.addMessageProcessor(myOut);context.addFlow(myFlow);muleContext.start();
  25. 25. feedback?
  26. 26. cloud...final TwitterConnector twitterConnector = new TwitterConnector();twitterConnector.setConsumerKey("key");twitterConnector.setConsumerSecret("secret");twitterConnector.setOathToken("token");Mule.newMuleContext(new AbstractModule() { @Override public void configure() { flow("MyFlow") .from("file:///Users/porcelli/tweet") .transformTo(String.class) .process(twitterConnector.statusesUpdate(payload())); }}).start();
  27. 27. demo
  28. 28. questions?
  29. 29. Thanks! alexandre.porcelli@gmail.com github.com/porcelliabout.me/porcelli linkedin.com/in/alexandreporcelli @porcelli porcelli.com.br
  1. A particular slide catching your eye?

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

×