anticorrupting the enterprise
TRANSCRIPT
Anticorrupting the Enterprise or How I Learned to Stop Worrying and Love the Serverless
Steven RingoYun Zhi Lin
About amaysim
We make things amazingly simple
Mobile plans and devices Broadband internet Electricity and gas
CRM
customer
SMTP != HTTPSMTP email sms push
REST HTTP
business
rich insights
Impedance mismatch
legacy system
Old / outdated, but still in useDeveloper 404 not foundNot the new hotnessAntique hardware No unit tests Don’t touch Cloud alienSOAPESB FTP
What is legacy?
Hard to maintain, improve, and expand Hard to integrate Hard to find developers High maintenance costs No documentation No security patches
Impact of legacy
Enter the anticorruption force
Translate a “corrupt” legacy interface to an “honest” one applicable to your environment.
CRM
customer
email sms push
REST HTTP
business
rich insights
SMTP
Serverless SMTP to REST adapter
legacy system
1. Embed metadata in email body
<html><body><div>Nothing to see here</div><div class="metadata" style="display: none !important;"><!--template_id: foovariation: barreference: 38128323first_name: Stevenlast_name: Ringoinception_date: unknown--></div></body></html>
<html><body><div>Nothing to see here</div><div class="metadata" style="display: none !important;"><!--template_id: foovariation: barreference: 38128323first_name: Stevenlast_name: Ringoinception_date: unknown--></div></body></html>
POST https://my.crm.com/journey/new
{ "template_id": "foo", "variation": "bar", "reference": 38128323, "first_name": "Steven", "last_name": "Ringo", "inception_date": "unknown"}
2. Send through the adapter
SES
CRMgateway
Futuregateway
Other API
Mail parser
Raw email
SNS
Parameterised metadata
SaaS CRM RESTful API
Legacy Services
SMTP
Implementation
Different protocols
Different formats
Bespoke integrations
XML
Different logins
Mobile Number
Internet Email
Energy ID
Store ID
CSV
CDATA
JSON
SOAP
Webhooks
FTP
REST
Legacy Customer
Different protocols
Different formats
Bespoke integrations
XML
Different logins
Mobile Number
Internet Email
Energy ID
Store ID
CSV
CDATA
JSON
SOAP
Webhooks
FTP
REST
Legacy
corruption zone!
Customer
Product platform gateways
Events Format
Customer creation and updates
Legacy Anticorruption zone Customer
Unified Domain Model
Single Customer
View
Customer service details
Login
Gateway A
Gateway B
Gateway C
Gateway D
Product platform gateways
Events Format
Customer creation and updates
Legacy Anticorruption zone Customer
Unified Domain Model
Single Customer
View
Customer service details
Login
Gateway A
Gateway B
Gateway C
Gateway D
Product platform gateways
Events Format
Customer creation and updates
Legacy Anticorruption zone Customer
Unified Domain Model
Single Customer
View
Customer service details
Login
Gateway A
Gateway B
Gateway C
Gateway D
Asynchronous, ordered writes
Product platform gateways
Events Format
Customer creation and updates
Legacy Anticorruption zone Customer
Unified Domain Model
Single Customer
View
Customer service details
Login
Customer Data Stream
Gateway A
Gateway B
Gateway C
Gateway D
Asynchronous, ordered writes
Product platform gateways
Events Format
Customer creation and updates
Legacy Anticorruption zone Customer
Unified Domain Model
Single Customer
View
Customer service details
Login
Customer Data Stream
Internal APIs
Gateway A
Gateway B
Gateway C
Gateway D
Asynchronous, ordered writes
Product platform gateways
Events Format
Customer creation and updates
Legacy Anticorruption zone Customer
Unified Domain Model
Single Customer
View
Customer service details
Login
Customer Data Stream
Internal APIs
Gateway A
Gateway B
Gateway C
Gateway D
Asynchronous, ordered writes
Synchronous reads
Shameless plug! :-)
Python-based shim for fast cold starts
Uses idiomatic Go
Powerful goroutines
Easy dependency management
github.com/yunspace/serverless-golang
Serverless Go Sauce