Open Source FAAS
https://blog.back4app.com/open-source-serverless-platform/

Open Source FAAS


Serverless architectures have been rapidly gaining popularity. The main advantage of this technology is the ability to create and run applications without infrastructure management. Every CSP (Cloud service provider) has serverless FAAS (function as a service) like?AWS Lambda, Azure functions, Google's cloud function, etc.?

However, many open-source options are also available, like?Apache OpenWhisk, IronFunctions, Fn from Oracle, OpenFaaS, Kubeless, Knative, Project Riff, etc.

Some of the prime benefits of open source FAAS-?

1.?Open Source, Availability of Custom Features:?These are open-source solutions, unlike the other serverless solutions available in the industry. There is ample opportunity to build custom features.

2. On-prem, Data Security:?One can deploy these on-prem if the business is not Ok with data flowing to a third-party network & want to run things on its private network. It is good for specific compliance requirements.

3. No Vendor Lock-In:?Another massive advantage of using an open-source solution is?the no-vendor lock-in. In the case of multi-cloud, it is an essential point of consideration.

Open-source?FAAS General Architecture?is based on a cloud-native standard. It includes the following main components: API Gateway, Function Watchdog, and the container orchestrators Kubernetes, Docker Swarm, Prometheus, and Docker. Following high-level architecture is for OpenFAAS.

No alt text provided for this image


Apache OpenWhisk -?

One of the excellent and popular solutions in this category is Apache OpenWhisk. It is a serverless, open source cloud platform that allows you to execute code in response to events at any scale. It’s written in the Scala language. The framework processes the inputs from triggers like HTTP requests and later fires a snippet of code on either JavaScript or Swift.

How it works-

Backend functions are triggered via external events. The events can be triggered from datastores, message queues, mobile, web applications, sensors, chatbots, scheduled tasks, etc. These are also known as event sources.

No alt text provided for this image

The action box we see in the above diagram represents a function that holds the business logic. The function can be written in Go, Java, JavaScript, PHP, Python, Ruby, Swift. The functions encapsulating the business logic are stateless & can be triggered Via OpenWhisk REST-API, a command-line interface, user-created APIs, or scheduled automated triggers.

Underline technology-

It is powered by technologies such as?Apache Kafka, CouchDB, Docker & Nginx.?All these techs, all together, constitute an event-driven serverless programming service.

No alt text provided for this image

Function-Flow-

1.User Requests Hit OpenWhisk Platform

All the requests to OpenWhisk go through Nginx, an open-source web server. It also helps with several other functionalities such as load balancing, reverse proxy, caching, media streaming, etc.

2. Interception of user requests

Once the requests hit the platform, Nginx routes them to the Controller. The Controller is a Scala-based implementation of the REST API.

3.Authentication & Authorization-

The verification logic kicks in when the request moves from Nginx to the Controller. The Controller verifies if the request is valid & authentic. The requests are verified against the records stored in the subjects database in?CouchDB(An open-source NoSQL scalable, distributed database.).

4. Request Verification & invoke the Action

Once the user request is verified, the Controller figures out the type of web request & triggers an action. In other words, the requests execute the logic held in the functions from DB. Once the action is loaded from the database. The load balancer, which is a part of the Controller chooses one of the executors, also called the invokers.

5. Managing Heavy Load Scenarios & System Failure Contingencies with Kafka

OpenWhisk leverages Kafka, a distributed, high throughput messaging system to deal with triggering action like loss of invocation or execution . The invocations are buffered & persisted by Kafka until the action is invoked.

6. Invoking the Action with Docker

All the actions in OpenWhisk are invoked in the Docker containers. When an action is to be invoked, OpenWhisk spawns a Docker container, injects the action, passes the run parameters to the action & executes it. Once the action gets executed, Docker container is destroyed. All the results & the metadata of the invocation is stored in the activations database in CouchDB.

In the end, it is good to know that IBM Bluemix OpenWhisk(Now IBM cloud function) -?is a FaaS Functions platform of IBM based on the open-source serverless project Apache OpenWhisk.

Fn Project

It runs on container-native serverless approach. This is one of the most amazing serverless approaches which users can run anywhere, i.e., on-premises or on any cloud. This platform is super easy to use and can support any of your preferred programming languages.

Iron Functions

It is effective microservices platform . This is an effective serverless platform which is offering an innovative and cohesive microservices platform by integrating embracing Docker and its existing services. Go language can be used by the developers to write functions.

Serverless architecture is offering amazing benefits. There are various amazing serverless platforms one can choose from. All of these comes with their own features.

References -

https://openwhisk.apache.org/documentation.html#programming-model-triggers

https://www.cncf.io/blog/2020/04/13/serverless-open-source-frameworks-openfaas-knative-more/

https://www.redhat.com/sysadmin/get-started-serverless-computing

https://www.scaleyourapp.com/what-is-apache-openwhisk-why-use-it-everything-you-should-know-about-it/

https://opensource.com/article/18/11/open-source-serverless-platforms

https://blog.back4app.com/open-source-serverless-platform/

https://blog.logrocket.com/build-serverless-app-node-js-openwhisk/

Bikram Bhusan Sinha. MBA, PMP

Associate Director, Commerce Architecture Practice Lead and SAP as well as Salesforce Commerce Cloud Capability Lead at Accenture Song India

3 年

Good article, open-source will flourish in FaaS area also

要查看或添加评论,请登录

Alok Sharma的更多文章

  • Agentic AI :The Next Big Leap in Artificial Intelligence

    Agentic AI :The Next Big Leap in Artificial Intelligence

    The Rise of Agentic AI: Unpacking the Next Frontier in Intelligence In the ever-evolving world of AI, we’ve seen…

    1 条评论
  • Generative AI - Business and architectural considerations

    Generative AI - Business and architectural considerations

    In this article, I will explore the nuances of designing and implementing Generative AI projects, focusing on essential…

    2 条评论
  • Demystifying Generative AI : Generative AI Models(Part-3)

    Demystifying Generative AI : Generative AI Models(Part-3)

    After providing a brief overview of AI/ML fundamentals in Part 1 and delving into the fundamentals of Generative AI in…

  • Demystifying Generative AI : Generative AI Fundamentals(Part-2)

    Demystifying Generative AI : Generative AI Fundamentals(Part-2)

    Now that I have covered the fundamentals of AI/ML in part 1, it's time to demystify the Magical world of Generative AI.…

  • Demystifying Generative AI : Fundamentals of AI/ML (Part-1)

    Demystifying Generative AI : Fundamentals of AI/ML (Part-1)

    Driven by a thirst for knowledge, in the sleep-deprived hours of this Tuesday, I decided to delve into the fundamental…

    2 条评论
  • Azure Cognitive Services : Bridging the Gap

    Azure Cognitive Services : Bridging the Gap

    Azure Cognitive Services simplifies the process of integrating complex AI features into applications without requiring…

  • DevOps... Little more

    DevOps... Little more

    This article is in the continuation of my previous article(Fundamentals of DevOps), wherein I have covered some of the…

  • Fundamentals Of DevOps

    Fundamentals Of DevOps

    The DevOps journey is not merely technical; it also covers governance and metrics, tools and technology, people and…

  • DevSecOps: Establishing a culture

    DevSecOps: Establishing a culture

    Security is often seen as the biggest inhibitor to a cloud-first journey. If planed and imbibed into the culture…

    1 条评论
  • Cloud cost optimization -Part2

    Cloud cost optimization -Part2

    In the continuation of my previous article, here, I highlighted some of the crucial aspects of cloud cost optimization.…

社区洞察

其他会员也浏览了