Upgrade to Pro — share decks privately, control downloads, hide ads and more …

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

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

A talk presented at Serverlessconf NYC October 2017 (https://nyc.serverlessconf.io/), with my colleague Yun Zhi Lin.

With apologies to Dr Strangelove…

At amaysim we grew organically from startup to a listed enterprise. On our journey we have developed in-house software, purchased third-party solutions and inherited acquired companies' tech stacks. In many cases its been either unfeasible or just not possible to enhance or improve these systems directly. In addition, we integrate with providers that have unfriendly and inflexible “APIs” (scare quotes indeed!)

In many cases its expensive, time-consuming, error-prone and boring to maintain and operate these systems. Or they simply do not belong to us.

In this talk I show how the use of smart gateways, interceptors and transformers developed and choreographed using serverless technologies have allowed us to rapidly, easily and cheaply provide a protective shield from the legacy forces of evil.

To be able to divert development and operational efforts to modern environments and ecosystems together with the goodness of a mature SDLC with source control, CI/CD, environments, modern APIs and cloud.

A world where our virtual “anticorruption layer” protects us mortals from the horrors that are SMTP, FTP, SOAP, RPCs and other unsavoury protocols.

The talk will show some examples and case studies of how we have achieved this. And in the process keeping developers, marketing, accountants, testers, managers (“stakeholders”) and of course our customers, happy.

Steven Ringo

October 11, 2017
Tweet

More Decks by Steven Ringo

Other Decks in Technology

Transcript

  1. Anticorrupting the Enterprise 

    or How I Learned to Stop Worrying and Love the Serverless
    Steven Ringo

    Yun Zhi Lin

    View Slide

  2. Come visit us in Australia

    View Slide

  3. About amaysim
    We make things amazingly simple
    Mobile plans and devices
    Broadband internet
    Electricity and gas

    View Slide

  4. We use Serverless.
    In Anger.
    In Production.

    View Slide

  5. Can it be done
    Serverless?
    Go for it
    Serverless first
    Rethink
    yes
    no

    View Slide

  6. Enrich transactional
    communications to customers
    from legacy systems
    Case study 1

    View Slide

  7. no visibility into customer behaviour
    customer
    SMTP email
    business
    Original
    ?
    system

    View Slide

  8. CRM
    rich
    insights
    customer
    email
    sms
    push
    business
    Improved
    REST
    HTTP
    system

    View Slide

  9. CRM
    customer
    SMTP != HTTP
    SMTP email
    sms
    push
    REST
    HTTP
    business
    rich
    insights
    Impedance mismatch
    legacy
    system

    View Slide

  10. Old / outdated, but still in use
    Developer 404 not found
    Not the new hotness
    Antique hardware
    No unit tests
    Don’t touch
    Cloud alien
    SOAP
    ESB
    FTP
    What is legacy?

    View Slide

  11. Hard to maintain, improve, and expand
    Hard to integrate
    Hard to find developers
    High maintenance costs
    No documentation
    No security patches
    Impact of legacy

    View Slide

  12. Rebuild?

    Refactor?

    Buy new?
    Augment?
    Where to?

    View Slide

  13. Enter the anticorruption force
    Translate a “corrupt” legacy
    interface to an “honest” one
    applicable to your environment.

    View Slide

  14. CRM
    customer
    email
    sms
    push
    REST
    HTTP
    business
    rich
    insights
    SMTP
    Serverless SMTP to REST adapter
    legacy
    system

    View Slide

  15. 1. Embed metadata in email body


    Nothing to see here
    style="display: none !important;">




    View Slide



  16. Nothing to see here
    style="display: none !important;">




    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

    View Slide

  17. SES
    CRM

    gateway
    Future

    gateway
    Other
    API
    Mail parser
    Raw email
    SNS
    Parameterised
    metadata
    SaaS CRM
    RESTful API
    Legacy
    Services
    SMTP
    Implementation

    View Slide

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

    View Slide

  19. 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

    View Slide

  20. 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

    View Slide

  21. 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

    View Slide