SlideShare a Scribd company logo
FABRIKAM
Adityo Pratomo
Mozilla Indonesia Rust
Meetup
FABRIKAMFABRIKAM
About Me
• CTO at Labtek Indie
• Technically, generalist
• Host of Rabu Rust
• Current interest: Kubernetes,
Microservice, Serverless, PWA and
Street Fighter V
FABRIKAM
Microservice
• An architecture pattern that divides
monolithic application into several
different services
• Each service is responsible for a smaller
amount context
• Each one is independent and can be
invoked separately also, required to
communicate between services
• In practice, each service is deployed in
different server and has its own
database and communication interface
Quick In tro ductio n
This Photo by Unknown Author is licensed under CC BY-SA
FABRIKAM
Serverless Application
• A server logic part of the application,
deployed inside a fully managed server,
normally in cloud -> BaaS (Backend as a
Service)
• A server logic part of the application,
deployed as an independent function that
can live only as long as it is being invoked
-> FaaS (Function as a Service)
• In both cases, application can be scaled
automatically, according to usage
• This frees up developer to fully
concentrate on developing application,
and not managing server
Some alternative definitions
4
FABRIKAM
Some Serverless Solutions
5
FABRIKAM
Serverless Solutions
• The aforementioned serverless solutions
are offered as a cloud-based
infrastructure offering
• Each has its own rule of what
environment they provide, what
languages they support and so forth
• Mostly accepted languages are:
• NodeJS
• Python
• Go
• PHP
Rule of the platform
6
FABRIKAM
How to get Rust
into Serverless
Platform?
7
FABRIKAM8
2 Main Solutions
embed into
Dockerize binary
FABRIKAM9
From Rust to Node in AWS Lambda
Function Handler
(NodeJS)
AWS API Gateway
Actual Function
(Rust)
• Implemented using Neon, a Rust crate that allows creation of
native Node modules from Rust code
• The Node code which implements the function handler, will call
this native module
• The Node code is called as usual JS script from the project root
(node .)
• Note that in order for Lambda function to work,it require a
function handler in Node
FABRIKAM10
From Rust to Node in AWS Lambda
// native/src/lib.rs
#[macro_use]
extern crate neon;
extern crate postgres;
use postgres::{Connection, TlsMode};
use neon::prelude::*;
fn hello(mut cx: FunctionContext) -> JsResult<JsString> {
Ok(cx.string("hello from Rust"))
}
register_module!(mut cx, {
cx.export_function("hello", hello)
});
// lib/index.js
const native = require('../native’);
exports.handler = (event, context, callback) =>
callback(null, native.hello());
FABRIKAM11
Deploy Rust Binary Inside Docker Container for Now Deployment
• Compile Rust into binary that fits Now’s requirement
• The easiest way is to build upon Now example and just deploy from that
• Deploy into Now network using the command now
• The serverless application will then live as an HTTP-based endpoint, ready to be used anytime
Rust binary Dockerized Now network
FABRIKAM
Demo
12
FABRIKAM
Reflection
Rust can be used to develop
serverless microservice with fast
response. However, it’s not yet
primed for production in leading
serverless platform. Docker-based
microservice is the most exciting
option for the time being
FABRIKAM
THANK YOU
A D I T YO P R ATO M O
+ 6 2 8 7 8 7 6 7 2 3 1 0 0
d i d i t @ l a b t e k i n d i e . c o m

More Related Content

What's hot

Java 8: Nashorn & avatar.js di Enrico Risa al JUG Roma
Java 8: Nashorn & avatar.js di Enrico Risa al JUG RomaJava 8: Nashorn & avatar.js di Enrico Risa al JUG Roma
Java 8: Nashorn & avatar.js di Enrico Risa al JUG Roma
Vitalij Zadneprovskij
 
Automated Deployment with Capistrano
Automated Deployment with CapistranoAutomated Deployment with Capistrano
Automated Deployment with Capistrano
Sumit Chhetri
 
Continuous Delivery and Infrastructure as Code
Continuous Delivery and Infrastructure as CodeContinuous Delivery and Infrastructure as Code
Continuous Delivery and Infrastructure as Code
Sascha Möllering
 
Containerization - The DevOps Revolution
Containerization - The DevOps RevolutionContainerization - The DevOps Revolution
Containerization - The DevOps Revolution
Yulian Slobodyan
 
Ansible E2E Testing
Ansible E2E TestingAnsible E2E Testing
Ansible E2E Testing
Roberto Perez-Rodriguez
 
Amazon Cloud Overview
Amazon Cloud OverviewAmazon Cloud Overview
Amazon Cloud Overview
Yulian Slobodyan
 
HashiCorp at Just Eat
HashiCorp at Just EatHashiCorp at Just Eat
HashiCorp at Just Eat
Andrew Brown
 
Service Discovery in OSGi: Beyond the JVM using Docker and Consul
Service Discovery in OSGi: Beyond the JVM using Docker and ConsulService Discovery in OSGi: Beyond the JVM using Docker and Consul
Service Discovery in OSGi: Beyond the JVM using Docker and Consul
Frank Lyaruu
 
ApacheCon Core: Service Discovery in OSGi: Beyond the JVM using Docker and Co...
ApacheCon Core: Service Discovery in OSGi: Beyond the JVM using Docker and Co...ApacheCon Core: Service Discovery in OSGi: Beyond the JVM using Docker and Co...
ApacheCon Core: Service Discovery in OSGi: Beyond the JVM using Docker and Co...
Frank Lyaruu
 
Node Architecture.pptx
Node Architecture.pptxNode Architecture.pptx
Node Architecture.pptx
Ahmed Hassan
 
Introduction to Microservices
Introduction to Microservices Introduction to Microservices
Introduction to Microservices
Weaveworks
 
DockerCon 2015: Docker Engine Breakout Session
DockerCon 2015: Docker Engine Breakout SessionDockerCon 2015: Docker Engine Breakout Session
DockerCon 2015: Docker Engine Breakout Session
Docker, Inc.
 
Scripting Languages in OSGi
Scripting Languages in OSGiScripting Languages in OSGi
Scripting Languages in OSGi
Frank Lyaruu
 
Hashicorp: Delivering the Tao of DevOps
Hashicorp: Delivering the Tao of DevOpsHashicorp: Delivering the Tao of DevOps
Hashicorp: Delivering the Tao of DevOps
Ramit Surana
 
Building Micro-Services with Scala
Building Micro-Services with ScalaBuilding Micro-Services with Scala
Building Micro-Services with Scala
Yardena Meymann
 
DockerCon SF 2015: Networking Breakout
DockerCon SF 2015: Networking BreakoutDockerCon SF 2015: Networking Breakout
DockerCon SF 2015: Networking Breakout
Docker, Inc.
 
Serverless Pune Meetup 1
Serverless Pune Meetup 1Serverless Pune Meetup 1
Serverless Pune Meetup 1
Vishal Biyani
 
Windows server and docker
Windows server and dockerWindows server and docker
Windows server and docker
girish goudar
 
PaaS options for .NET
PaaS options for .NETPaaS options for .NET
PaaS options for .NET
Slawomir Dorzak
 
Quick intro to armeria
Quick intro to armeriaQuick intro to armeria
Quick intro to armeria
LINE Corporation
 

What's hot (20)

Java 8: Nashorn & avatar.js di Enrico Risa al JUG Roma
Java 8: Nashorn & avatar.js di Enrico Risa al JUG RomaJava 8: Nashorn & avatar.js di Enrico Risa al JUG Roma
Java 8: Nashorn & avatar.js di Enrico Risa al JUG Roma
 
Automated Deployment with Capistrano
Automated Deployment with CapistranoAutomated Deployment with Capistrano
Automated Deployment with Capistrano
 
Continuous Delivery and Infrastructure as Code
Continuous Delivery and Infrastructure as CodeContinuous Delivery and Infrastructure as Code
Continuous Delivery and Infrastructure as Code
 
Containerization - The DevOps Revolution
Containerization - The DevOps RevolutionContainerization - The DevOps Revolution
Containerization - The DevOps Revolution
 
Ansible E2E Testing
Ansible E2E TestingAnsible E2E Testing
Ansible E2E Testing
 
Amazon Cloud Overview
Amazon Cloud OverviewAmazon Cloud Overview
Amazon Cloud Overview
 
HashiCorp at Just Eat
HashiCorp at Just EatHashiCorp at Just Eat
HashiCorp at Just Eat
 
Service Discovery in OSGi: Beyond the JVM using Docker and Consul
Service Discovery in OSGi: Beyond the JVM using Docker and ConsulService Discovery in OSGi: Beyond the JVM using Docker and Consul
Service Discovery in OSGi: Beyond the JVM using Docker and Consul
 
ApacheCon Core: Service Discovery in OSGi: Beyond the JVM using Docker and Co...
ApacheCon Core: Service Discovery in OSGi: Beyond the JVM using Docker and Co...ApacheCon Core: Service Discovery in OSGi: Beyond the JVM using Docker and Co...
ApacheCon Core: Service Discovery in OSGi: Beyond the JVM using Docker and Co...
 
Node Architecture.pptx
Node Architecture.pptxNode Architecture.pptx
Node Architecture.pptx
 
Introduction to Microservices
Introduction to Microservices Introduction to Microservices
Introduction to Microservices
 
DockerCon 2015: Docker Engine Breakout Session
DockerCon 2015: Docker Engine Breakout SessionDockerCon 2015: Docker Engine Breakout Session
DockerCon 2015: Docker Engine Breakout Session
 
Scripting Languages in OSGi
Scripting Languages in OSGiScripting Languages in OSGi
Scripting Languages in OSGi
 
Hashicorp: Delivering the Tao of DevOps
Hashicorp: Delivering the Tao of DevOpsHashicorp: Delivering the Tao of DevOps
Hashicorp: Delivering the Tao of DevOps
 
Building Micro-Services with Scala
Building Micro-Services with ScalaBuilding Micro-Services with Scala
Building Micro-Services with Scala
 
DockerCon SF 2015: Networking Breakout
DockerCon SF 2015: Networking BreakoutDockerCon SF 2015: Networking Breakout
DockerCon SF 2015: Networking Breakout
 
Serverless Pune Meetup 1
Serverless Pune Meetup 1Serverless Pune Meetup 1
Serverless Pune Meetup 1
 
Windows server and docker
Windows server and dockerWindows server and docker
Windows server and docker
 
PaaS options for .NET
PaaS options for .NETPaaS options for .NET
PaaS options for .NET
 
Quick intro to armeria
Quick intro to armeriaQuick intro to armeria
Quick intro to armeria
 

Similar to Developing Serverless Microservice in Rust

Rami Sayar - Node microservices with Docker
Rami Sayar - Node microservices with DockerRami Sayar - Node microservices with Docker
Rami Sayar - Node microservices with Docker
Web à Québec
 
Best Practices for Running Kafka on Docker Containers
Best Practices for Running Kafka on Docker ContainersBest Practices for Running Kafka on Docker Containers
Best Practices for Running Kafka on Docker Containers
BlueData, Inc.
 
FITC - Node.js 101
FITC - Node.js 101FITC - Node.js 101
FITC - Node.js 101
Rami Sayar
 
OpenStack Summit
OpenStack SummitOpenStack Summit
OpenStack Summit
Docker, Inc.
 
Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018
Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018
Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018
Mandi Walls
 
Docker-Intro
Docker-IntroDocker-Intro
Docker-Intro
Sujai Sivasamy
 
NYC Identity Summit Tech Day: ForgeRock DevOps/Cloud Strategy
NYC Identity Summit Tech Day: ForgeRock DevOps/Cloud StrategyNYC Identity Summit Tech Day: ForgeRock DevOps/Cloud Strategy
NYC Identity Summit Tech Day: ForgeRock DevOps/Cloud Strategy
ForgeRock
 
Docker intro
Docker introDocker intro
Docker intro
spiddy
 
Dockerization of Azure Platform
Dockerization of Azure PlatformDockerization of Azure Platform
Dockerization of Azure Platform
nirajrules
 
Microservices
MicroservicesMicroservices
Microservices
Meysam Javadi
 
Docker Swarm and Traefik 2.0
Docker Swarm and Traefik 2.0Docker Swarm and Traefik 2.0
Docker Swarm and Traefik 2.0
Jakub Hajek
 
Containers and Docker
Containers and DockerContainers and Docker
Containers and Docker
Damian T. Gordon
 
Rails Applications with Docker
Rails Applications with DockerRails Applications with Docker
Rails Applications with Docker
Laura Frank Tacho
 
Zero to Serverless in 60s - Anywhere
Zero to Serverless in 60s - AnywhereZero to Serverless in 60s - Anywhere
Zero to Serverless in 60s - Anywhere
Brian Christner
 
What is Serverless Computing?
What is Serverless Computing?What is Serverless Computing?
What is Serverless Computing?
AIMDek Technologies
 
Killer Docker Workflows for Development
Killer Docker Workflows for DevelopmentKiller Docker Workflows for Development
Killer Docker Workflows for Development
Chris Tankersley
 
Orchestrating Linux Containers while tolerating failures
Orchestrating Linux Containers while tolerating failuresOrchestrating Linux Containers while tolerating failures
Orchestrating Linux Containers while tolerating failures
Docker, Inc.
 
Real time web apps
Real time web appsReal time web apps
Real time web apps
Sepehr Rasouli
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to Kubernetes
Vishal Biyani
 
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
dotCloud
 

Similar to Developing Serverless Microservice in Rust (20)

Rami Sayar - Node microservices with Docker
Rami Sayar - Node microservices with DockerRami Sayar - Node microservices with Docker
Rami Sayar - Node microservices with Docker
 
Best Practices for Running Kafka on Docker Containers
Best Practices for Running Kafka on Docker ContainersBest Practices for Running Kafka on Docker Containers
Best Practices for Running Kafka on Docker Containers
 
FITC - Node.js 101
FITC - Node.js 101FITC - Node.js 101
FITC - Node.js 101
 
OpenStack Summit
OpenStack SummitOpenStack Summit
OpenStack Summit
 
Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018
Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018
Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018
 
Docker-Intro
Docker-IntroDocker-Intro
Docker-Intro
 
NYC Identity Summit Tech Day: ForgeRock DevOps/Cloud Strategy
NYC Identity Summit Tech Day: ForgeRock DevOps/Cloud StrategyNYC Identity Summit Tech Day: ForgeRock DevOps/Cloud Strategy
NYC Identity Summit Tech Day: ForgeRock DevOps/Cloud Strategy
 
Docker intro
Docker introDocker intro
Docker intro
 
Dockerization of Azure Platform
Dockerization of Azure PlatformDockerization of Azure Platform
Dockerization of Azure Platform
 
Microservices
MicroservicesMicroservices
Microservices
 
Docker Swarm and Traefik 2.0
Docker Swarm and Traefik 2.0Docker Swarm and Traefik 2.0
Docker Swarm and Traefik 2.0
 
Containers and Docker
Containers and DockerContainers and Docker
Containers and Docker
 
Rails Applications with Docker
Rails Applications with DockerRails Applications with Docker
Rails Applications with Docker
 
Zero to Serverless in 60s - Anywhere
Zero to Serverless in 60s - AnywhereZero to Serverless in 60s - Anywhere
Zero to Serverless in 60s - Anywhere
 
What is Serverless Computing?
What is Serverless Computing?What is Serverless Computing?
What is Serverless Computing?
 
Killer Docker Workflows for Development
Killer Docker Workflows for DevelopmentKiller Docker Workflows for Development
Killer Docker Workflows for Development
 
Orchestrating Linux Containers while tolerating failures
Orchestrating Linux Containers while tolerating failuresOrchestrating Linux Containers while tolerating failures
Orchestrating Linux Containers while tolerating failures
 
Real time web apps
Real time web appsReal time web apps
Real time web apps
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to Kubernetes
 
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
 

More from Adityo Pratomo

Managing Infrastructure as a Product - Introduction to Platform Engineering
Managing Infrastructure as a Product - Introduction to Platform EngineeringManaging Infrastructure as a Product - Introduction to Platform Engineering
Managing Infrastructure as a Product - Introduction to Platform Engineering
Adityo Pratomo
 
Designing with Code
Designing with CodeDesigning with Code
Designing with Code
Adityo Pratomo
 
Let The Machine Helps
Let The Machine HelpsLet The Machine Helps
Let The Machine Helps
Adityo Pratomo
 
Introducing Rust
Introducing RustIntroducing Rust
Introducing Rust
Adityo Pratomo
 
Developing VR in Unity
Developing VR in UnityDeveloping VR in Unity
Developing VR in Unity
Adityo Pratomo
 
Empowering Users: UX Lesson from Game Design
Empowering Users: UX Lesson from Game DesignEmpowering Users: UX Lesson from Game Design
Empowering Users: UX Lesson from Game Design
Adityo Pratomo
 
Prototyping GNOME UI for Gestural Input
Prototyping GNOME UI for Gestural InputPrototyping GNOME UI for Gestural Input
Prototyping GNOME UI for Gestural Input
Adityo Pratomo
 
Coding as Intersection of Art and Technology
Coding as Intersection of Art and TechnologyCoding as Intersection of Art and Technology
Coding as Intersection of Art and Technology
Adityo Pratomo
 
Interactive Data Visualization with Tangible User Interface
Interactive Data Visualization with Tangible User InterfaceInteractive Data Visualization with Tangible User Interface
Interactive Data Visualization with Tangible User Interface
Adityo Pratomo
 
Adityo Pratomo - Grounding Presentation PDF
Adityo Pratomo - Grounding Presentation PDFAdityo Pratomo - Grounding Presentation PDF
Adityo Pratomo - Grounding Presentation PDF
Adityo Pratomo
 
Adityo Pratomo - Grounding Assignment
Adityo Pratomo - Grounding AssignmentAdityo Pratomo - Grounding Assignment
Adityo Pratomo - Grounding Assignment
Adityo Pratomo
 

More from Adityo Pratomo (11)

Managing Infrastructure as a Product - Introduction to Platform Engineering
Managing Infrastructure as a Product - Introduction to Platform EngineeringManaging Infrastructure as a Product - Introduction to Platform Engineering
Managing Infrastructure as a Product - Introduction to Platform Engineering
 
Designing with Code
Designing with CodeDesigning with Code
Designing with Code
 
Let The Machine Helps
Let The Machine HelpsLet The Machine Helps
Let The Machine Helps
 
Introducing Rust
Introducing RustIntroducing Rust
Introducing Rust
 
Developing VR in Unity
Developing VR in UnityDeveloping VR in Unity
Developing VR in Unity
 
Empowering Users: UX Lesson from Game Design
Empowering Users: UX Lesson from Game DesignEmpowering Users: UX Lesson from Game Design
Empowering Users: UX Lesson from Game Design
 
Prototyping GNOME UI for Gestural Input
Prototyping GNOME UI for Gestural InputPrototyping GNOME UI for Gestural Input
Prototyping GNOME UI for Gestural Input
 
Coding as Intersection of Art and Technology
Coding as Intersection of Art and TechnologyCoding as Intersection of Art and Technology
Coding as Intersection of Art and Technology
 
Interactive Data Visualization with Tangible User Interface
Interactive Data Visualization with Tangible User InterfaceInteractive Data Visualization with Tangible User Interface
Interactive Data Visualization with Tangible User Interface
 
Adityo Pratomo - Grounding Presentation PDF
Adityo Pratomo - Grounding Presentation PDFAdityo Pratomo - Grounding Presentation PDF
Adityo Pratomo - Grounding Presentation PDF
 
Adityo Pratomo - Grounding Assignment
Adityo Pratomo - Grounding AssignmentAdityo Pratomo - Grounding Assignment
Adityo Pratomo - Grounding Assignment
 

Recently uploaded

Day 2 - Intro to UiPath Studio Fundamentals
Day 2 - Intro to UiPath Studio FundamentalsDay 2 - Intro to UiPath Studio Fundamentals
Day 2 - Intro to UiPath Studio Fundamentals
UiPathCommunity
 
From Natural Language to Structured Solr Queries using LLMs
From Natural Language to Structured Solr Queries using LLMsFrom Natural Language to Structured Solr Queries using LLMs
From Natural Language to Structured Solr Queries using LLMs
Sease
 
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectorsConnector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
DianaGray10
 
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving
 
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeckPoznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
FilipTomaszewski5
 
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and BioinformaticiansBiomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Neo4j
 
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
Fwdays
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
Miro Wengner
 
Call Girls Chandigarh🔥7023059433🔥Agency Profile Escorts in Chandigarh Availab...
Call Girls Chandigarh🔥7023059433🔥Agency Profile Escorts in Chandigarh Availab...Call Girls Chandigarh🔥7023059433🔥Agency Profile Escorts in Chandigarh Availab...
Call Girls Chandigarh🔥7023059433🔥Agency Profile Escorts in Chandigarh Availab...
manji sharman06
 
"What does it really mean for your system to be available, or how to define w...
"What does it really mean for your system to be available, or how to define w..."What does it really mean for your system to be available, or how to define w...
"What does it really mean for your system to be available, or how to define w...
Fwdays
 
Introducing BoxLang : A new JVM language for productivity and modularity!
Introducing BoxLang : A new JVM language for productivity and modularity!Introducing BoxLang : A new JVM language for productivity and modularity!
Introducing BoxLang : A new JVM language for productivity and modularity!
Ortus Solutions, Corp
 
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge GraphGraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
Neo4j
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
Jason Yip
 
"NATO Hackathon Winner: AI-Powered Drug Search", Taras Kloba
"NATO Hackathon Winner: AI-Powered Drug Search",  Taras Kloba"NATO Hackathon Winner: AI-Powered Drug Search",  Taras Kloba
"NATO Hackathon Winner: AI-Powered Drug Search", Taras Kloba
Fwdays
 
Containers & AI - Beauty and the Beast!?!
Containers & AI - Beauty and the Beast!?!Containers & AI - Beauty and the Beast!?!
Containers & AI - Beauty and the Beast!?!
Tobias Schneck
 
AI in the Workplace Reskilling, Upskilling, and Future Work.pptx
AI in the Workplace Reskilling, Upskilling, and Future Work.pptxAI in the Workplace Reskilling, Upskilling, and Future Work.pptx
AI in the Workplace Reskilling, Upskilling, and Future Work.pptx
Sunil Jagani
 
QR Secure: A Hybrid Approach Using Machine Learning and Security Validation F...
QR Secure: A Hybrid Approach Using Machine Learning and Security Validation F...QR Secure: A Hybrid Approach Using Machine Learning and Security Validation F...
QR Secure: A Hybrid Approach Using Machine Learning and Security Validation F...
AlexanderRichford
 
Getting the Most Out of ScyllaDB Monitoring: ShareChat's Tips
Getting the Most Out of ScyllaDB Monitoring: ShareChat's TipsGetting the Most Out of ScyllaDB Monitoring: ShareChat's Tips
Getting the Most Out of ScyllaDB Monitoring: ShareChat's Tips
ScyllaDB
 
Demystifying Knowledge Management through Storytelling
Demystifying Knowledge Management through StorytellingDemystifying Knowledge Management through Storytelling
Demystifying Knowledge Management through Storytelling
Enterprise Knowledge
 
ScyllaDB Tablets: Rethinking Replication
ScyllaDB Tablets: Rethinking ReplicationScyllaDB Tablets: Rethinking Replication
ScyllaDB Tablets: Rethinking Replication
ScyllaDB
 

Recently uploaded (20)

Day 2 - Intro to UiPath Studio Fundamentals
Day 2 - Intro to UiPath Studio FundamentalsDay 2 - Intro to UiPath Studio Fundamentals
Day 2 - Intro to UiPath Studio Fundamentals
 
From Natural Language to Structured Solr Queries using LLMs
From Natural Language to Structured Solr Queries using LLMsFrom Natural Language to Structured Solr Queries using LLMs
From Natural Language to Structured Solr Queries using LLMs
 
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectorsConnector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
 
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024
 
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeckPoznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
 
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and BioinformaticiansBiomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
 
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
 
Call Girls Chandigarh🔥7023059433🔥Agency Profile Escorts in Chandigarh Availab...
Call Girls Chandigarh🔥7023059433🔥Agency Profile Escorts in Chandigarh Availab...Call Girls Chandigarh🔥7023059433🔥Agency Profile Escorts in Chandigarh Availab...
Call Girls Chandigarh🔥7023059433🔥Agency Profile Escorts in Chandigarh Availab...
 
"What does it really mean for your system to be available, or how to define w...
"What does it really mean for your system to be available, or how to define w..."What does it really mean for your system to be available, or how to define w...
"What does it really mean for your system to be available, or how to define w...
 
Introducing BoxLang : A new JVM language for productivity and modularity!
Introducing BoxLang : A new JVM language for productivity and modularity!Introducing BoxLang : A new JVM language for productivity and modularity!
Introducing BoxLang : A new JVM language for productivity and modularity!
 
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge GraphGraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
 
"NATO Hackathon Winner: AI-Powered Drug Search", Taras Kloba
"NATO Hackathon Winner: AI-Powered Drug Search",  Taras Kloba"NATO Hackathon Winner: AI-Powered Drug Search",  Taras Kloba
"NATO Hackathon Winner: AI-Powered Drug Search", Taras Kloba
 
Containers & AI - Beauty and the Beast!?!
Containers & AI - Beauty and the Beast!?!Containers & AI - Beauty and the Beast!?!
Containers & AI - Beauty and the Beast!?!
 
AI in the Workplace Reskilling, Upskilling, and Future Work.pptx
AI in the Workplace Reskilling, Upskilling, and Future Work.pptxAI in the Workplace Reskilling, Upskilling, and Future Work.pptx
AI in the Workplace Reskilling, Upskilling, and Future Work.pptx
 
QR Secure: A Hybrid Approach Using Machine Learning and Security Validation F...
QR Secure: A Hybrid Approach Using Machine Learning and Security Validation F...QR Secure: A Hybrid Approach Using Machine Learning and Security Validation F...
QR Secure: A Hybrid Approach Using Machine Learning and Security Validation F...
 
Getting the Most Out of ScyllaDB Monitoring: ShareChat's Tips
Getting the Most Out of ScyllaDB Monitoring: ShareChat's TipsGetting the Most Out of ScyllaDB Monitoring: ShareChat's Tips
Getting the Most Out of ScyllaDB Monitoring: ShareChat's Tips
 
Demystifying Knowledge Management through Storytelling
Demystifying Knowledge Management through StorytellingDemystifying Knowledge Management through Storytelling
Demystifying Knowledge Management through Storytelling
 
ScyllaDB Tablets: Rethinking Replication
ScyllaDB Tablets: Rethinking ReplicationScyllaDB Tablets: Rethinking Replication
ScyllaDB Tablets: Rethinking Replication
 

Developing Serverless Microservice in Rust

  • 2. FABRIKAMFABRIKAM About Me • CTO at Labtek Indie • Technically, generalist • Host of Rabu Rust • Current interest: Kubernetes, Microservice, Serverless, PWA and Street Fighter V
  • 3. FABRIKAM Microservice • An architecture pattern that divides monolithic application into several different services • Each service is responsible for a smaller amount context • Each one is independent and can be invoked separately also, required to communicate between services • In practice, each service is deployed in different server and has its own database and communication interface Quick In tro ductio n This Photo by Unknown Author is licensed under CC BY-SA
  • 4. FABRIKAM Serverless Application • A server logic part of the application, deployed inside a fully managed server, normally in cloud -> BaaS (Backend as a Service) • A server logic part of the application, deployed as an independent function that can live only as long as it is being invoked -> FaaS (Function as a Service) • In both cases, application can be scaled automatically, according to usage • This frees up developer to fully concentrate on developing application, and not managing server Some alternative definitions 4
  • 6. FABRIKAM Serverless Solutions • The aforementioned serverless solutions are offered as a cloud-based infrastructure offering • Each has its own rule of what environment they provide, what languages they support and so forth • Mostly accepted languages are: • NodeJS • Python • Go • PHP Rule of the platform 6
  • 7. FABRIKAM How to get Rust into Serverless Platform? 7
  • 8. FABRIKAM8 2 Main Solutions embed into Dockerize binary
  • 9. FABRIKAM9 From Rust to Node in AWS Lambda Function Handler (NodeJS) AWS API Gateway Actual Function (Rust) • Implemented using Neon, a Rust crate that allows creation of native Node modules from Rust code • The Node code which implements the function handler, will call this native module • The Node code is called as usual JS script from the project root (node .) • Note that in order for Lambda function to work,it require a function handler in Node
  • 10. FABRIKAM10 From Rust to Node in AWS Lambda // native/src/lib.rs #[macro_use] extern crate neon; extern crate postgres; use postgres::{Connection, TlsMode}; use neon::prelude::*; fn hello(mut cx: FunctionContext) -> JsResult<JsString> { Ok(cx.string("hello from Rust")) } register_module!(mut cx, { cx.export_function("hello", hello) }); // lib/index.js const native = require('../native’); exports.handler = (event, context, callback) => callback(null, native.hello());
  • 11. FABRIKAM11 Deploy Rust Binary Inside Docker Container for Now Deployment • Compile Rust into binary that fits Now’s requirement • The easiest way is to build upon Now example and just deploy from that • Deploy into Now network using the command now • The serverless application will then live as an HTTP-based endpoint, ready to be used anytime Rust binary Dockerized Now network
  • 13. FABRIKAM Reflection Rust can be used to develop serverless microservice with fast response. However, it’s not yet primed for production in leading serverless platform. Docker-based microservice is the most exciting option for the time being
  • 14. FABRIKAM THANK YOU A D I T YO P R ATO M O + 6 2 8 7 8 7 6 7 2 3 1 0 0 d i d i t @ l a b t e k i n d i e . c o m