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

SAP Cloud Platform Functions: The Big Picture

Vadim Klimov
November 17, 2018
12

SAP Cloud Platform Functions: The Big Picture

Event: SAP Inside Track Copenhagen 2018
Date: November 17, 2018
Speaker: Vadim Klimov
Session: SAP Cloud Platform Functions - The big picture

Vadim Klimov

November 17, 2018
Tweet

More Decks by Vadim Klimov

Transcript

  1. Cloud computing models in SAP Cloud Platform 2 2018 Application

    Platform (PaaS / aPaaS) Container Platform (CaaS) Function Platform (FaaS) ▪ Container runtime and orchestration are provided by the platform ▪ High level of application and its environment customization ▪ Higher development and maintenance efforts ▪ Gardener and Kubernetes ▪ Application runtime is provided by the platform ▪ High level of application customization ▪ Limited capabilities of application runtime customization ▪ Neo, Cloud Foundry, ABAP environment ▪ Serverless runtime is provided by the platform ▪ Concentrate attention on specific function, not its execution context ▪ Limited capabilities of application runtime or application customization ▪ Lower development and maintenance efforts ▪ Functions service NEO
  2. Cloud computing models in SAP Cloud Platform 3 2018 Function

    platform Application platform Container platform Application environment and application configuration, tuning and monitoring capabilities Development, deployment and maintenance efforts
  3. Function in SAP Cloud Platform Extension Factory (SAP CP XF)

    / Project Kyma 4 2018 Source of illustration: The next evolution for extensions – the SAP Cloud Platform Extension Factory by Rui Nogueira
  4. Function in SAP Cloud Platform Extension Factory (SAP CP XF)

    / Project Kyma 5 2018 ▪ Based on Open Service Broker API ▪ Service catalog advertisement and service discovery ▪ Service lifecycle management Service Catalog Service Broker Event Bus ▪ Catalog of integrated and reusable services ▪ Publish/subscribe messaging pattern ▪ Based on NATS streaming server Serverless / Function ▪ Function as a Service cloud computing model ▪ Uses Node.js application runtime ▪ Serverless implementation is based on Kubeless Application Connector ▪ Connection with external solutions Service Mesh ▪ Service to service communication
  5. SCP Functions Runtime components 6 2018 Node.js | application runtime

    Kubeless | serverless framework Express | web framework Prometheus | metering Morgan | HTTP logging Monitoring and logging middleware and routes Function route Function | function handler module
  6. Integration architectures with Functions 7 2018 API-led integration architecture Event-driven

    integration architecture ▪ Function is Web API ▪ HTTP trigger type ▪ Can be exposed as managed API ▪ Can be used in conjunction with API Management service ▪ Relevant for real-time API based integrations – lightweight managed API provisioning ▪ Function is Event Handler ▪ Subscription techniques: o Pull based model (queue subscription): using function’s event trigger type o Push based model (webhook subscription): using webhook (HTTP callback / event notification callback) and function’s HTTP trigger type ▪ Can be used in conjunction with Enterprise Messaging service and Open Connectors service. ▪ Relevant for event based integrations – event subscription, consumption and reaction; event stream processing
  7. When to use Functions 8 2018 ▪Short-lived process ▪Lightweight and

    not composite function logic ▪Requirement for low start up latency ▪No requirements for specific application packaging and deployment ▪No requirements for advanced or specific runtime tuning ▪Stateless architecture
  8. When not to use Functions 9 2018 ▪Long running process

    ▪Requirement for complex computation logic with high resource utilization (such as CPU and memory) ▪Requirement for fine tuning and optimization of application environment ▪Requirement for advanced tooling for development (such as debugger, profiler) and operational monitoring ▪Requirement for customization of application lifecycle management – primarily, start up (initialization) and shut down ▪Requirement for customization of application controlled resources lifecycle management – primarily, provisioning (allocation), pooling, and deprovisioning (disposal) of utilized resources
  9. SCP CF Functions Dashboard or Web IDE Full Stack SCP

    CF Cockpit or CF CLI Demo Develop a Function 12 2018 Create Functions service instance Create Function Implement handler Define dependencies Define additional settings Create secret Create trigger
  10. Demo Anatomy of a Function 13 2018 Function name Function

    handler – Node.js module name Function handler – Node.js function name Argument ‘event’ Source of the event – such as event ID, time, type, data, and access to HTTP request/response of the function Argument ‘context’ General information about the function – such as function name, runtime, timeout, memory limit Return value String that is to be returned to the caller in HTTP response body
  11. Demo Anatomy of a Trigger 14 2018 HTTP trigger •

    The function is invoked by HTTP request • Authentication method is not configurable in the trigger – has to be implemented in the function Event trigger • The function is invoked by the event received from Enterprise Messaging service Timer trigger • Schedule definition using cron expression • The function is invoked by HTTP GET request