Nanoservices: Open Source Serverless Technologies (3/4)
Chenthill Palanisamy
Senior Software Architect (Cloud | MicroServices | AWS | Distributed Systems | Kafka | Scalability | ElasticSearch | MongoDB)
There are several opensource technologies that can be used to create a nanoservices platform. As these technologies require high performance and low latency, they are implemented in languages known for performance such as c++, golang,? rust etc.? In this article, let us go through some of them,
Firecracker
Firecracker is an open source virtualization technology that is purpose built for creating and managing secure, multitenant function-based services that provide serverless operation models. Firecracker runs workloads in lightweight virtual machines called microVM’s which combine the security and isolation properties provided by the hardware virtualization technology with the speed and flexibility of containers.
Why Firecracker ?
Firecracker golang sdk allows one to programmatically manage firecracker microVM’s using GoLang and allow running nanoservices inside them. I have created a POC using the same and is available in the following repositories.
As the connectors were written in JavaScript, POC involved running a nodejs app inside a firecracker microVM and allowing multiple microVM’s to communicate with each other. I was preferring Golang based POC here, as some other teams in the Organization used the same and it is also easier to learn compared to that of Rust which requires a C++ background.
The following white paper provides a comprehensive understanding on Firecracker. There are various organisations who have already built several solutions on top Firecracker which are in production,
Maintained by: Amazon
Authored language: Rust
Orchestrating firecracker microVM’s: To be presented in next article
GitHub repository: https://github.com/firecracker-microvm/firecracker
Workerd
Workerd is an open source JavaScript/Wasm server runtime based on the same code that powers the CloudFlare workers. Workerd was originally designed to self-host applications that one would otherwise run on cloudflare workers. It is intended to be a production-ready web server for this purpose.
If the connectors are JavaScript functions, it should be possible to run connectors with security, isolation and high performance using workerd. Workerd is based on V8 isolates. It promises the ability to run all connectors from a single host.
The following are some salient features of workerd,
领英推荐
I did POC’s with workerd and had discussion with the Founder, Kenton Varda from Cloudflare along with our team.
Challenges faced with workerd
Due to the above challenges, Firecracker was more preferable. Having said that, workerd is still promising if some organisations start contributing and adapting it. The following talk from Kenton Varda talks about workerd and it’s features.
Maintained by: Cloudflare
Authored Language: C++
Orchestrating workerd: Kubernetes
GitHub repository: https://github.com/cloudflare/workerd
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.
As OpenWhisk uses Kafka as a messaging layer and could consume longer timeframe for executing a function, had to avoid venturing more into it. As we saw the previous article, we wanted to avoid the messaging layer.
Maintained by: Apache Foundation
Authored Language: Scala
GitHub repository: https://github.com/apache/openwhisk?
While there many more technologies that can be evaluated such as the following,
In the next article we will look at solutions to orchestrate Firecracker.