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

The Real Value of Serverless

The Real Value of Serverless

Avatar for Simon Martinelli

Simon Martinelli

October 01, 2021
Tweet

More Decks by Simon Martinelli

Other Decks in Programming

Transcript

  1. ABOUT ME @simas_ch 2 2019 2000 1995 Java COBOL 2009

    2007 2012 2011 JSR-352 Java Batch 2013 JSR-354 Money/Currency
  2. 4

  3. IBM IMS • Designed 1966 for the Apollo program to

    inventory the very large bill of materials for the Saturn V moon rocket and Apollo space vehicle 5
  4. FAAS (FUNCTIONS AS A SERVICE) • Focus more on code,

    not infrastructure • Pay only for the resources you use, when you use them • Scale up or down automatically • Get all the benefits of robust cloud infrastructure 10 Serverless does not mean NO SERVER!
  5. WHAT ABOUT MICRO? • Functions are small • Functions only

    have one purpose • Functions are modules • A module is a self-contained component of a system, interchangeable, which has a well-defined interface 12
  6. WHAT ABOUT SERVICES? • Service-Oriented Architecture (SOA) is an architectural

    style that supports service-orientation • Service-orientation is a way of thinking in terms of services and service-based development and the outcomes of services • Service • Is a logical representation of a repeatable business activity that has a specified outcome (e.g., check customer credit, provide weather data) • Is self-contained • May be composed of other services • Is a black box to consumers of the service 13 Source: http://www.opengroup.org/soa/source-book/soa/p1.htm
  7. SERVERLESS ARCHITECTURE • Serverless applications are event-driven, cloud-based systems where

    application development rely solely on a combination of third-party services, client-side logic and cloud-hosted remote procedure calls • Key Properties • Independent, server-side, logical functions • Stateless • Short-lived • Event-triggered • Scalable by default • Fully managed in the cloud 14
  8. PROS CONS • Pay for what you use • Faster

    delivery due to smaller units • Zero system administration • Easier operations • Monitoring out of the box • Faster setup • Scalable • Reduced control • Vendor lock-in • Architectural complexity • Disaster recovery • Local tests 15
  9. 16

  10. HOW TO ACHIEVE VENDOR INDEPENDENCE? • Serverless leads to vendor

    lock-in! • But there are alternatives 18
  11. HELLO WORLD function main() { return { payload: 'Hello world'

    }; } > wsk action create helloJS hello.js > wsk action invoke helloJS --blocking 23
  12. WEB ACTIONS function main({name}) { var msg = 'You did

    not tell me who you are!'; if (name) { msg = 'Hello ${name}!' } return {body: '<html><body><h3>${msg}</h3></body></html>'} } > wsk -i action create helloweb helloweb.js --web true > wsk –i action get helloweb --url 24
  13. TRIGGERS AND RULES • Triggers are named channels for classes

    or kinds of events sent from Event Sources. • Rules are used to associate one trigger with one action • What are Event Sources? • Messages arriving on Message Queues • Changes in Databases • Website or Web Application interactions • Service APIs being invoked • IoT Frameworks forwarding device sensor data • OpenWhisk is based on an event-driven architecture 25
  14. THE REAL VALUES • Zero operations but risk of vendor-lock-in

    • Enforces modularity • No one-size-fits-all 28