anticorrupting the enterprise

31
Anticorrupting the Enterprise or How I Learned to Stop Worrying and Love the Serverless Steven Ringo Yun Zhi Lin

Upload: yun-zhi-lin

Post on 28-Jan-2018

29 views

Category:

Technology


0 download

TRANSCRIPT

Anticorrupting the Enterprise or How I Learned to Stop Worrying and Love the Serverless

Steven RingoYun Zhi Lin

Come visit us in Australia

About amaysim

We make things amazingly simple

Mobile plans and devices Broadband internet Electricity and gas

We use Serverless

We use ServerlessIn Anger

We use ServerlessIn Anger

In Production

Can it be done Serverless?

Go for it

Serverless first

Rethink

yes

no

Enrich transactional communications to customers from legacy systems

Case study 1

no visibility into customer behaviour

customer

SMTP email

business

Original

?

system

CRM

rich insights

customer

email sms push

business

Improved

REST HTTPsystem

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

Rebuild?Refactor?Buy new? Augment?

Where to?

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

Case study 2

Unify interfaces to legacy back-end systems for consistency and reusability Case study 2

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