building a messaging framework on the salesforce1 platform

31
Building a Messaging Framework on the Salesforce1 Platform Anup Jadhav Manager of Mobility / Technical Architect @anup

Upload: anup-jadhav

Post on 20-Jun-2015

265 views

Category:

Technology


3 download

DESCRIPTION

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

TRANSCRIPT

Page 1: Building a Messaging Framework on the Salesforce1 Platform

Building a Messaging Framework on the Salesforce1 PlatformAnup Jadhav

Manager of Mobility / Technical Architect

@anup

Page 2: Building a Messaging Framework on the Salesforce1 Platform

Anup JadhavManager of Mobility / Technical Architect

@anup

Page 3: Building a Messaging Framework on the Salesforce1 Platform

OVERVIEW

Page 4: Building a Messaging Framework on the Salesforce1 Platform

OVERVIEW

Describe an architecture to make Asynchronous Outbound Webservice Callouts using a native custom built message queue

Page 5: Building a Messaging Framework on the Salesforce1 Platform

OVERVIEW

Describe an architecture to make Asynchronous Outbound Webservice Callouts using a native custom built message queue

Page 6: Building a Messaging Framework on the Salesforce1 Platform

OVERVIEW

Describe an architecture to make Asynchronous Outbound Webservice Callouts using a native custom built message queue

Page 7: Building a Messaging Framework on the Salesforce1 Platform

OVERVIEW

Describe an architecture to make Asynchronous Outbound Webservice Callouts using a native custom built message queue

Page 8: Building a Messaging Framework on the Salesforce1 Platform

OVERVIEW

Describe an architecture to make Asynchronous Outbound Webservice Callouts using a native custom built message queue

Page 9: Building a Messaging Framework on the Salesforce1 Platform

OVERVIEWMessage Queue Pattern

Page 10: Building a Messaging Framework on the Salesforce1 Platform

OVERVIEWMessage Queue Pattern

Page 11: Building a Messaging Framework on the Salesforce1 Platform

OVERVIEWMessage Queue Pattern

Page 12: Building a Messaging Framework on the Salesforce1 Platform

OVERVIEWMessage Queue Pattern

Page 13: Building a Messaging Framework on the Salesforce1 Platform

REQUIREMENTS

Page 14: Building a Messaging Framework on the Salesforce1 Platform

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

Page 15: Building a Messaging Framework on the Salesforce1 Platform

ARCHITECTURE

Page 16: Building a Messaging Framework on the Salesforce1 Platform

ARCHITECTUREUsing a middleware (MQ system not ETL)

• Complex to implement• Expensive• In-House skillset

Page 17: Building a Messaging Framework on the Salesforce1 Platform

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

Page 18: Building a Messaging Framework on the Salesforce1 Platform

ARCHITECTUREBespoke solution

Build 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

Page 19: Building a Messaging Framework on the Salesforce1 Platform

ARCHITECTURE

Page 20: Building a Messaging Framework on the Salesforce1 Platform
Page 21: Building a Messaging Framework on the Salesforce1 Platform

ARCHITECTUREMessage Queue

Used to hold web service messages Each message can be retried

automatically/manually Messages contain service handler

information Contains Request and Response

payload content

Page 22: Building a Messaging Framework on the Salesforce1 Platform

ARCHITECTUREBatch Job

Apex batch class : responsible for processing messages from Message Queue

Can process one message at a time Invokes the Service Handler

Page 23: Building a Messaging Framework on the Salesforce1 Platform

ARCHITECTUREScheduler

Acts like a Batch Job manager Is responsible for scheduling batch jobs

in a round robin fashion

Page 24: Building a Messaging Framework on the Salesforce1 Platform

ARCHITECTUREService Handler

Does the actual Webservice callout Updates the message and also updates

other sObjects if required

Page 25: Building a Messaging Framework on the Salesforce1 Platform

ARCHITECTUREWebservice Log

Log webservice requests and response in this table

Can be used in reports/dashboards Determine num of success, failures,

average response time

Page 26: Building a Messaging Framework on the Salesforce1 Platform

LIMITATIONS

Page 27: Building a Messaging Framework on the Salesforce1 Platform

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

Page 28: Building a Messaging Framework on the Salesforce1 Platform

Demo

Page 29: Building a Messaging Framework on the Salesforce1 Platform

Questions

Page 30: Building a Messaging Framework on the Salesforce1 Platform
Page 31: Building a Messaging Framework on the Salesforce1 Platform

Join us for Pre Gala Drinks: cloudsherpas.com/df14UK Happy Hour Tuesday 14th October5pm - 7pm

540 Howard Street,San Fran, CA, 94105

Grab your FREE Entry Postcard here!