Building a Messaging Framework on the Salesforce1 Platform

  • View
    261

  • Download
    3

Embed Size (px)

DESCRIPTION

This presentation describes an architecture to make asynchronous outbound webservice callouts using the Message Queue design pattern

Text of Building a Messaging Framework on the Salesforce1 Platform

  • 1. Building a Messaging Framework onthe Salesforce1 PlatformAnup JadhavManager of Mobility / Technical Architect@anup

2. Anup JadhavManager of Mobility / Technical Architect@anup 3. OVERVIEW 4. OVERVIEWDescribe an architecture to makeAsynchronous Outbound WebserviceCallouts using a native custom builtmessage queue 5. OVERVIEWDescribe an architecture to makeAsynchronous Outbound WebserviceCallouts using a native custom builtmessage queue 6. OVERVIEWDescribe an architecture to makeAsynchronous Outbound WebserviceCallouts using a native custom builtmessage queue 7. OVERVIEWDescribe an architecture to makeAsynchronous Outbound WebserviceCallouts using a native custom builtmessage queue 8. OVERVIEWDescribe an architecture to makeAsynchronous Outbound WebserviceCallouts using a native custom builtmessage queue 9. OVERVIEWMessage Queue Pattern 10. OVERVIEWMessage Queue Pattern 11. OVERVIEWMessage Queue Pattern 12. OVERVIEWMessage Queue Pattern 13. REQUIREMENTS 14. REQUIREMENTS Automated Retry Capability Allow SF Admin to Re-Submit Failed Request Ability to view Webservice Request/Response Payload content Ability to proactively alert Sys Admins if large no of Webservice Callouts are failing Turn off particular type of Interface on-demand Define Operation Hours Metrics response time, no.of failures, message volume per day etc 15. ARCHITECTURE 16. ARCHITECTUREUsing a middleware (MQ system not ETL) Complex to implement Expensive In-House skillset 17. ARCHITECTUREOutbound Messaging Supports single sObjects only Enforce interface contract that the receiver should adhere to Remote listener (end point) would need to handle request in an idempotent fashion Can only be used with Workflow rules You cannot build an audit trail using OM 18. ARCHITECTUREBespoke solutionBuild something native on Force.com platform that Can retry webservice callouts Allows manual re-submission of callouts Stores request and response payload Alerts sys admins if an interface is down Provides analytics around webservice callouts 19. ARCHITECTURE 20. ARCHITECTUREMessage Queue Used to hold web service messages Each message can be retriedautomatically/manually Messages contain service handlerinformation Contains Request and Responsepayload content 21. ARCHITECTUREBatch Job Apex batch class : responsible forprocessing messages from MessageQueue Can process one message at a time Invokes the Service Handler 22. ARCHITECTUREScheduler Acts like a Batch Job manager Is responsible for scheduling batch jobsin a round robin fashion 23. ARCHITECTUREService Handler Does the actual Webservice callout Updates the message and also updatesother sObjects if required 24. ARCHITECTUREWebservice Log Log webservice requests and responsein this table Can be used in reports/dashboards Determine num of success, failures,average response time 25. LIMITATIONS 26. LIMITATIONS Complex to implement Only supports asynchronous webservice callouts Be wary of callout, batch job and scheduler limitations Does not guarantee order or sequence of callouts Testing can be tricky 27. Demo 28. Questions 29. Join us for Pre Gala Drinks: cloudsherpas.com/df14UK Happy HourTuesday 14th October5pm - 7pm540 Howard Street,San Fran, CA, 94105Grab your FREE Entry Postcard here!