Hi Today I am going to introduce . Quebic provides way to write server-less functions to run on Kubernetes. It supports for Java, Python, runtimes. Quebic - FaaS Framework NodeJS The key difference between Quebic and existing FaaS is, With Quebic you can develop highly available back-ends to serve real-time and also supports to execute on-demand tasks. Most of the existing FaaS frameworks are most suitable only for executing on-demand tasks. frameworks Main Topics Prerequisites High Level Overview of Quebic Setup Quebic API Gateway Functions 1. Prerequisites Before start Qubic you need to setup Kubernetes cluster. There are several ways. you can find more details. Here You can easily setup on your local machine that will gives single node Kubernetes cluster. Minikube Or you can use such as Google Kubernetes Engine, Azure Kubernetes Service, Amazon Elastic Container Service for Kubernetes, etc. hosted solution 2. High Level Overview of Quebic Quebic Manager Main controller and responsible for deploying and managing functions and other components. Function Container The user provided source code is running inside function container. The Function container are deploying by quebic-manager into kubernetes. Event Bus Delivering events from publishers to consumers. Powered by RabbitMQ. API Gateway Transforming HTTP payloads into event payloads. Nginx Ingress Front door for outside clients. Used as a proxy for API. Quebic CLI Command-line Interface (CLI) is a tool to that provides a interface to communicate with quebic-manager. 3. Setup Quebic Download binaries Download binaries from . Save and extract it into preferred location. here Run quebic manager Jump into Quebic binaries location. Then run this command quebic manager start This command deploy and start the quebic-manager inside Kubernetes cluster. It takes time to setup Ingress. If you are using in MiniKube cluster it will take few seconds. But for Hosted cluster like GKE, it will take few minutes. Connect cli with manager This command will config quebic-cli to connect with quebic-manager. quebic manager connect All the configurations related to quebic-cli are located in $HOME/.quebic-faas/cli-config.yml file. Above command will change the quebic-manager connection string. Check status of quebic-manager To check status of the manager run this command. quebic manager status Fetch quebic-manager logs You can fetch quebic-manager’s logs by running this command. quebic manager logs 4. API Gateway As I mentioned all incoming traffic coming to the API Gateway through the nginx-ingress. To get ingress details run this command. quebic ingress describe It will display IP address of the Ingress. You can reach out API Gateway by setting Host headers as Sample curl command. api.quebic.io curl http://<ingress-ip>/<resource-path> -h "Host: api.quebic.io" 5. Functions For this demo i will create two functions. One is and other one is user-validate function user-create function. user-validate function Inside this function, it receives a user object as an input then it get email attribute from user object. Finally it checks the email is valid one or not then response back. This is the source code for it. Before create the function you have to provide specification of your function. According to that spec quebic-manager deploys it into Kubernetes. This is the spec file of user-validation function. Under section, you can define function’s run-time configurations. function : Name of the function line 2 : Source location of the function. Supports for single source file or packaged tar.gz file when NodeJS run-time. line 3 : Exported handler of the function. line 4 <handler file>.<exported handler> : Run-time of the function line 5 : Number of replicas you needs to keep for the function line 6 Event list. Function can listen to mulitiple events. line 7–8 : Environment variables line 9–11 : Under section, you can define how to config HTTP routing to access the function through the API Gateway. route : HTTP method line 14 : Resource path to access function line 15 : Mapping between HTTP request parameters and event payload attributes line 16–18 : HTTP headers needs to pass into function line 19–20 Lets create this function. Set file path of function spec file to --file parameter. Run this command. quebic function create --file <user-validate-function-spec>.yml After create the function you can test it using Quebic CLI. Run this command. quebic function test --name <function name> --payload '{"message":"hello"}' This is how to execute function through the API Gateway. Sample curl command. curl -H "Host: api.quebic.io" http://<ingress-address>/users/validate?q=t1@gmail.com user-create function This function receive user object. Then it publish event which listening by user-validate function. Then user-create function waits until response receive from user-validate function. UserValidate If responses is success one, then it create a new user and return id of created user. Otherwise return error response. This is the spec file of user-validation function. This is the source code for it. This is the spec file of user-create function. I have already covered most of the stuffs in previous section. Source location of the function. Supports for jar file when Java run-time. line 3 : Class path of the handler. line 4 : As I mention earlier Quebic is most suitable for highly available back-ends also supports to execute on-demand tasks. line 8–12 : With Quebic you can config wake up method of the function-container according to your requirements. That means developers can config function to start its container by requests and also can config ideal-timeout of the container. Or developer can config function to run its containers continuously. Here I configured this function to spin-up by a request. Async invocation_._ With that configuration API Gateway is not going to wait until task complete. It immediately response back r_equest-id_ to API caller. Then API caller can check the response for its request using that . Eventually caller get response for his request. line 17 : request-id Create the function using this command. quebic function create --file <user-create-function-spec>.yml This is how to execute function through the API Gateway. Sample curl command. curl -v --request POST -H "Content-Type: application/json" --data '{"email":" ", "name":"quebic"}' -H "Host: api.quebic.io" t1@gmail.com http://<ingress-address>/users It response request-id to get response of the request. This is a curl command to get response by passing request-id. curl > -H “Host: api.quebic.io” http://<ingress-address>/request-tracker/<request-id I have covered most of the key functionalities of the Quebic. You can find related source code for this in . If you want to know how Quebic can be used for Microservices based development refer this article . I really expecting your feedbacks. If you have any concerns leave a comment below. Thank you. here Event-driven Microservices with Quebic