Hello Everyone !
"Salesforce Apex Hours" is a recurring event to talk about salesforce ! Some times we'd like to meet on one location and some time online. This time we are planning one online session on "Microservices" job with Don Robins (Salesforce MVP).
Agenda:-
1) Microservices –WHAT, WHY, HOW
2) My Microservice – PDFParser a practical mitigation use case
3) Sample Microservice demo and code walk thru
4) Take-aways and Links
Thanks
Amit Chaudhary
@amit_sfdc
Salesforce Apex Hours:-Mitigate with Mono-Purpose Microservices
1. Farmington Hills Salesforce Developer User
Group
Salesforce Apex Hours :-
Mitigate with Mono-Purpose Microservices
#SalesforceApexHours
#FarmingtonHillsSFDCDug
Speaker :- Don Robins (Salesforce MVP), Amit Chaudhary
Date :- Saturday, OCT 28, 2017 11:00 AM EST
Venue/Link :- Online
2. Who am I ?
Amit Chaudhary (Salesforce MVP)
• Active on Salesforce Developer Community
• Blogging at http://amitsalesforce.blogspot.in/
• Co-Organizer of :- FarmingtonHillsSFDCDug
3. Our Speaker
Don Robins
5x Salesforce MVP
Certified Instructor/PDII
Salesforce Training Partner
Training Team Lead
Pluralsight.com Author
Books, Posts, Articles
@donrobins
LinkedIn/In/DonaldRobins
4. Microservices
Agenda
▶ Microservices –WHAT, WHY, HOW
▶ My Microservice – PDFParser a practical mitigation use case
▶ Sample Microservice demo and code walk thru
▶ Take-aways and Links
5. Microservices
A typical perspective of Microservices in the enterprise:
▶ WHAT: an architectural approach allowing for the decoupling and dissolution of
monolithic application stacks
▶ WHY: promote scalable implementation, maintenance, and performance across
an application or suite of applications
▶ HOW: application functionality is broken up into stand-alone discreet services,
each doing one thing very well
6. Microservices
A Salesforce perspective of Microservices:
▶ WHAT: discreet service that does one thing only -- and does it very well!
▶ WHY: to perform a single specific function not available in Force.com
(ie. mitigation of unavailable capability)
▶ HOW: implemented service is deployed to and called from an isolated instance
on Heroku
7. Microservices
Perspectives on how the Force.com
platform provides a variety of built in
mechanisms that can ‘act’ as
Microservices.
https://developer.salesforce
.com/page/Wiki/Microservices
-And-The-Salesforce1-
Platform
In the Salesforce Technical Library:
“Microservices and The Salesforce1 Platform“
8. Microservices
When you can’t do something
that you need to do in
the environment that you’re in,
implement it somewhere else
and call it as a Microservice.
9. Microservices
Target Characteristics:
1. Should fulfill a single function
2. Should be light weight and independent of middleware
3. Should be accessed using consistent patterns
4. Should be written in the most efficient language for the task
11. Microservices
Synchronous vs Asynchronous:
▶ For Synchronous (<120 seconds) use REST (or SOAP)
which follows a standard http request/response pattern
▶ For Asynchronous (>120 seconds) use Platform Events (or other message
queue) which follows a pub/sub eventing pattern
▶ Use what’s easiest for YOU!
▶ Don’t confuse Sync/Async Service with Sync/Async Apex callout
12. My Problem: How to use a Microservice to Parse Data From a PDF
13. My Microservice
The overall solution will contain multiple moving parts:
1. Gmail email forwarding
2. Named Credential for the Service URL and authentication (if any)
3. Salesforce Email Service
4. Apex Email Handler Class
5. Apex Email Manager Class
6. Apex Remittance Manager Class with Inner Queueable Class
7. Apex Remittance Processor Classes
8. PDFParser Heroku RESTful Microservice
22. My Microservice: DEMO
LET’S DIG INTO THE CODE!
▶ Demo the PDFParser Microservice with Postman
▶ Show the GO service code in the Github repo
▶ Walk through and run a simple example in Salesforce
24. MORE TAKE-AWAYS…
Salesforce Learning Resources:
▶ Explore the Dreamhouse App
http://www.dreamhouseapp.io
▶ Explore the Dreamhouse Github Repo
https://github.com/dreamhouseapp
▶ Tackle the Trailhead Data Integration Superbadge!
https://trailhead.salesforce.com/en/super_badges/superbadge_in
tegration
25. EVEN MORE TAKE-AWAYS…
Video eLearning Content:
▶ Microservice-Based Architecture in the App Cloud (DF15)
Paul Battison MVP and Sean Harrison of Mavens Consulting
https://www.youtube.com/watch?v=9s05kWJC6mk
▶ Beyond the Monolith: Architecting Microservices Applications on Heroku
Scott Classen of Heroku
https://www.youtube.com/watch?v=anGekx48Y8s
▶ Pluralsight.com
Multiple courses on Microservices and supporting architecture and technology
Expanding Salesforce Library and the new “Play by Play” Series with MVPs and CTAs
(Free Trials Available)
https://www.pluralsight.com