Slide 1

Slide 1 text

Serverless Concept Krishantha Dinesh Msc, MIEEE, MBCS Software Architect www.krishantha.com www.youtube.com/krish @krishantha

Slide 2

Slide 2 text

* http://www.krishantha.com * https://www.youtube.com/krish * https://www.linkedin.com/in/krish-din/ What is serverless • Serverless does not mean there is no server. • What it mean is we do not server which manage our self • cloud provider runs the server, and dynamically manages the allocation of machine resources. • It can be anything.. It can be use to facilitate UI to talk to database or it can be use to do some utility task such as inspect document or image

Slide 3

Slide 3 text

* http://www.krishantha.com * https://www.youtube.com/krish * https://www.linkedin.com/in/krish-din/ • Serverless is the native architecture of the cloud that enables you to shift more of your operational responsibilities to cloud, increasing your agility and innovation. • Serverless allows you to build and run applications and services without thinking about servers. • It eliminates infrastructure management tasks such as server or cluster provisioning, patching, operating system maintenance, and capacity provisioning. You can build them for nearly any type of application or backend service, and everything required to run and scale your application with high availability is handled for you.

Slide 4

Slide 4 text

* http://www.krishantha.com * https://www.youtube.com/krish * https://www.linkedin.com/in/krish-din/ Why it is good • We do not need to maintain servers • Easy to scale up when need • You do not need to maintain infrastructure or component • It enables you to build modern applications with increased agility and lower total cost of ownership. • Building serverless applications means that your developers can focus on their core product instead of worrying about managing and operating servers or runtimes, either in the cloud or on-premises. • This reduced overhead lets developers reclaim time and energy that can be spent on developing great products which scale and that are reliable.

Slide 5

Slide 5 text

* http://www.krishantha.com * https://www.youtube.com/krish * https://www.linkedin.com/in/krish-din/ Evolution • Each stage in human evolution was accompanied by an increase in productivity. Likewise, the history of IT computing also tells a story of gradual increases in productivity.

Slide 6

Slide 6 text

* http://www.krishantha.com * https://www.youtube.com/krish * https://www.linkedin.com/in/krish-din/ Traditional vs serverless https://www.gocd.org/2017/06/26/serverless-architecture-continuous-delivery/

Slide 7

Slide 7 text

* http://www.krishantha.com * https://www.youtube.com/krish * https://www.linkedin.com/in/krish-din/ Serverless On prem Maintainability 1.Sandbox execution environment requires no configuration 2.Automatic scaling and load balancing 1.Requires configuration of runtime environments 2.Requires independent construction of scaling mechanisms and load balancers Reliability Code and configurations are stored in OSS with automatic, multi-level redundant backup 1.Restricted by specific hardware reliability 2.Manual data recovery is complex and time- consuming Cost 1.Billed based on usage 2.Free uplink traffic 3.No maintenance staff or hosting fees 4.Free internal transmission between Alibaba Cloud products 1.Requires constant resizing of resources to cope with business request peaks 2.Requires designated personnel maintain runtime environments and hardware resources 3.Communication between products over the Internet may result in additional traffic fees Security 1.Sandbox runs in Alibaba Cloud's enterprise-grade security environment 2.Server-level isolation separates different users 3.Various service authorizations for primary account and sub-accounts 1.Requires separate purchase of traffic cleansing and black hole equipment 2.Access security mechanisms must be implemented independently

Slide 8

Slide 8 text

* http://www.krishantha.com * https://www.youtube.com/krish * https://www.linkedin.com/in/krish-din/ Advantages • Cost • Serverless can be more cost-effective than renting or purchasing a fixed quantity of servers. • Elasticity versus scalability • In addition, a serverless architecture means that developers and operators do not need to spend time setting up and tuning autoscaling policies or systems; the cloud provider is responsible for scaling the capacity to the demand. ‘from prototype to production to planet-scale.’- Google • Productivity • With function as a service, the units of code exposed to the outside world are simple functions. This means that typically, the programmer does not have to worry about multithreading or directly handling HTTP requests in their code, simplifying the task of back-end software development.

Slide 9

Slide 9 text

* http://www.krishantha.com * https://www.youtube.com/krish * https://www.linkedin.com/in/krish-din/ Disadvantages • Resource limits • Serverless computing is not suited to some computing workloads, such as high-performance computing, because of the resource limits imposed by cloud providers. • Security • Serverless is sometimes mistakenly considered as more secure than traditional architectures. In perspective of OS vulnerabilities are taken care of by the cloud provider so its true, but the total attack surface is significantly larger as there are many more components to the application compared to traditional architectures and each component is an entry point to the serverless application. Moreover, the security solutions customers used to have to protect their cloud workloads become irrelevant as customers cannot control and install anything on the endpoint and network level such as an intrusion detection/prevention system (IDS/IPS).

Slide 10

Slide 10 text

* http://www.krishantha.com * https://www.youtube.com/krish * https://www.linkedin.com/in/krish-din/ • Privacy • Many serverless function environments are based on proprietary public cloud environments. Here, some privacy implications have to be considered, such as shared resources and access by external employees. However, serverless computing can also be done on private cloud environment or even on-premises, using for example the Kubernetes platform. This gives companies full control over privacy mechanisms, just as with hosting in traditional server setups. • Vendor lock-in • Serverless computing is provided as a third-party service. Applications and software that run in the serverless environment are by default locked to a specific cloud vendor. Therefore, serverless can cause multiple issues during migration.

Slide 11

Slide 11 text

* http://www.krishantha.com * https://www.youtube.com/krish * https://www.linkedin.com/in/krish-din/ AWS Lambda

Slide 12

Slide 12 text

* http://www.krishantha.com * https://www.youtube.com/krish * https://www.linkedin.com/in/krish-din/ Google Firebase • Google Firebase is a Google-backed application development software that enables developers to develop iOS, Android and Web apps. • Firebase offers a number of services, including: • Analytics • Authentication • Cloud messaging • Crashlytics • Performance • Realtime database

Slide 13

Slide 13 text

* http://www.krishantha.com * https://www.youtube.com/krish * https://www.linkedin.com/in/krish-din/ AWS API Gateway • Amazon API Gateway is an AWS service for creating, publishing, maintaining, monitoring, and securing REST and WebSocket APIs at any scale. API developers can create APIs that access AWS or other web services as well as data stored in the AWS Cloud. As an API Gateway API developer, you can create APIs for use in your own client applications (apps). Or you can make your APIs available to third-party app developers. For more information

Slide 14

Slide 14 text

* http://www.krishantha.com * https://www.youtube.com/krish * https://www.linkedin.com/in/krish-din/ Azure Functions • Azure Functions is the serverless computing service hosted on the Microsoft Azure public cloud. Azure Functions, and serverless computing, in general, is designed to accelerate and simplify application development.

Slide 15

Slide 15 text

* http://www.krishantha.com * https://www.youtube.com/krish * https://www.linkedin.com/in/krish-din/ IBM Bluemix • IBM Bluemix is a cloud Platform as a service by IBM. It supports several programming languages and services as well as integrated DevOps to build, run, deploy and manage applications on the cloud. Bluemix is based on Cloud Foundry open technology and runs on SoftLayer infrastructure. Bluemix supports several programming languages including Java, Node.js, Go, PHP, Swift, Python, Ruby Sinatra, Ruby on Rails and can be extended to support other languages such as Scala[4] through the use of buildpacks.

Slide 16

Slide 16 text

* http://www.krishantha.com * https://www.youtube.com/krish * https://www.linkedin.com/in/krish-din/ Apache OpenWhisk • Apache OpenWhisk is an open source, distributed Serverless platform that executes functions in response to events at any scale. OpenWhisk manages the infrastructure, servers and scaling using Docker containers so you can focus on building applications. • The OpenWhisk platform supports a programming model in which developers write functional logic (called Actions), in any supported programming language, that can be dynamically scheduled and run in response to associated events (via Triggers) from external sources (Feeds) or from HTTP requests. The project includes a REST API-based Command Line Interface (CLI) along with other tooling to support packaging, catalog services and many popular container deployment options.

Slide 17

Slide 17 text

* http://www.krishantha.com * https://www.youtube.com/krish * https://www.linkedin.com/in/krish-din/ Use cases • serverless computing enables an as-needed workflow to spin up out of a continuous process, and the event-based trigger pulls in an AI service: Images are captured and analyzed on a standard IaaS environment, with events triggering the use of Amazon Rekognition or a similar service to carry out facial recognition when needed. The New York Times used such an approach to create its facial recognition system that used public cameras around New York's Bryant Park.

Slide 18

Slide 18 text

* http://www.krishantha.com * https://www.youtube.com/krish * https://www.linkedin.com/in/krish-din/ 02 • The broadcasting room client collects audio and video streams from host and audience members with connected microphones and sends them to Function Compute for multiplexing. Function Compute sends the collected data to the multiplexing service for synthesis and pushes the synthesized video stream to CDN. Viewers pull the livestream in real time to view the multiplexed and synthesized video live. • In some live video scenarios, multiple audience members interact using connected microphones, so the host is simultaneously connected to multiple microphones. The host can connect multiple audience members or friends to the screen and synthesize the picture into a single scenario, which is then provided to the livestream viewers.

Slide 19

Slide 19 text

* http://www.krishantha.com * https://www.youtube.com/krish * https://www.linkedin.com/in/krish-din/ 03 • Customers can use a dispatch platform to choose from the services provided by various sellers, such as ordering food or buying products. The dispatch platform then notifies the nearest delivery staff to pick up the relevant product from the nearest seller and deliver the product to the customer.