SlideShare a Scribd company logo
Presented by Ezeki Zibzibadze
Event-driven applications
Cheep Microservices
Agenda
• Define Naming

• Big Picture

• Cheep Transport

• Libraries & Dependencies

• Demo 1 - Basic Usage

• Message Structure

• Broker Benchmarks

• Demo 2 - Advanced Usage

• Questions
Event driven !== Event sourcing
Define Naming
APPLICATION LEVEL:
Command

RPC call to start new process. Always has one handler (one to one)

Query

RPC call to get the data. Always has one handler (one to one)

Event



Informs about something that happened in the past. (one to many)

TRANSPORT LEVEL:
Message



All Commands, Queries & Events are messages for the transport
Define Naming
Big Picture - Microservices
Big Picture - Microservices
Cheep Transport
Open Source. Simple. Safe.
0 dependencies
written in Typescript
Cheep Transport - Open Source
Kyle Bjordahl Ezeki Zibzibadze
playerx
kylebjordahl
github.com /so-cheep /microservices
Cheep Transport - Simple
const transport = new MemoryTransport()
await transport.init()
transport.on('PING', () => 'PONG')
await transport.start()
const result = await transport.execute({
route: 'PING',
payload: {},
})
expect(result).toBe('PONG')

await transport.publish({
route: 'PING',
payload: {},
})
Cheep Transport - Safe Execute
const transport = new MemoryTransport()
const api = createTransportApi<UserApi>(transport)
const isValid = await api.execute.Command.User.login({
username: 'Me',
password: '123',
})
type Api = {
Command: {
User: {
login: (props: {
username: string
password: string
}) => boolean
}
}
Event: {
User: {
updated: (props: {
userId: string
username: string
}) => void
}
}
}
type UserApi = ApiWithExecutableKeys<
Api,
'Command'
>
const transport = new MemoryTransport()
const handler = createTransportHandler<UserApi>(transport)
handler.on(
x => x.Command.User.login,
(_, data) => {
return data.username === data.password
},
)
1 2
3
Cheep Transport - Safe Publish
const transport = new MemoryTransport()
const api = createTransportApi<UserApi>(transport)
await api.publish.Event.User.updated({
userId: 'user1',
username: 'Me',
})
type Api = {
Command: {
User: {
login: (props: {
username: string
password: string
}) => boolean
}
}
Event: {
User: {
updated: (props: {
userId: string
username: string
}) => void
}
}
}
type UserApi = ApiWithExecutableKeys<
Api,
'Command'
>
const transport = new MemoryTransport()
const handler = createTransportHandler<UserApi>(transport)
handler.on(
x => x.Event.User.updated,
(_, data) => {
console.log(data.userId, data.username)
},
)
1 2
3
Libraries & Dependencies
@cheep/transport
💯 Type-safety @cheep/transport-aws
@cheep/transport-rabbitmq
@cheep/transport-nats
Transport Implementations:
@cheep/nestjs @cheep/angular
MemoryTransport
Demo 1
Basic Usage
Message Structure
Payload
Metadata
Route Command.User.login
{

transactionId: "1615987703914321"

createdAt: "2021-03-17T13:27:58.769Z"

}
{

username: "Me"

createdAt: "123"

}
Always Original
Always Original
Can be modified
In transit
Broker Benchmarks
AWS SQS + AWS SNS
RabbitMQ VS
~1ms ~100ms
1 message delivery
Ideal queue length
Short Unlimited
Demo 2
RabbitMQ
Broker
US Pusher EU Pusher
US Region EU Region
GraphQL / Rest
Server
Game Server
Redis
Advanced Usage
Demo 2
github.com
/so-cheep/microservices
/playerx/cheep-transport-demo1
/playerx/cheep-transport-demo2
Questions

More Related Content

What's hot

Swift Sequences & Collections
Swift Sequences & CollectionsSwift Sequences & Collections
Swift Sequences & Collections
CocoaHeads France
 
Продвинутая отладка JavaScript с помощью Chrome Dev Tools
Продвинутая отладка JavaScript с помощью Chrome Dev ToolsПродвинутая отладка JavaScript с помощью Chrome Dev Tools
Продвинутая отладка JavaScript с помощью Chrome Dev Tools
FDConf
 
CCResourceAsyncLoader
CCResourceAsyncLoaderCCResourceAsyncLoader
CCResourceAsyncLoader
Keisuke Hata
 
Js interpreter interpreted
Js interpreter interpretedJs interpreter interpreted
Js interpreter interpreted
Martha Schumann
 
Javascript Everywhere From Nose To Tail
Javascript Everywhere From Nose To TailJavascript Everywhere From Nose To Tail
Javascript Everywhere From Nose To Tail
Cliffano Subagio
 
2016 gunma.web games-and-asm.js
2016 gunma.web games-and-asm.js2016 gunma.web games-and-asm.js
2016 gunma.web games-and-asm.js
Noritada Shimizu
 
20151224-games
20151224-games20151224-games
20151224-games
Noritada Shimizu
 
DOM & Events
DOM & EventsDOM & Events
DOM & Events
CHAITANYA KUMAR REDDY
 
Mozilla とブラウザゲーム
Mozilla とブラウザゲームMozilla とブラウザゲーム
Mozilla とブラウザゲーム
Noritada Shimizu
 
Flamingo in Production
Flamingo in ProductionFlamingo in Production
Flamingo in Production
i-love-flamingo
 
Functional Programming with JavaScript
Functional Programming with JavaScriptFunctional Programming with JavaScript
Functional Programming with JavaScript
Mark Shelton
 
Luis Atencio on RxJS
Luis Atencio on RxJSLuis Atencio on RxJS
Luis Atencio on RxJS
Luis Atencio
 
Locomotor: transparent migration of client-side database code
Locomotor: transparent migration of client-side database codeLocomotor: transparent migration of client-side database code
Locomotor: transparent migration of client-side database code
Michael Mior
 
Connect S3 with Kafka using Akka Streams
Connect S3 with Kafka using Akka Streams Connect S3 with Kafka using Akka Streams
Connect S3 with Kafka using Akka Streams
Seiya Mizuno
 
A real-world Relay application in production - Stefano Masini - Codemotion Am...
A real-world Relay application in production - Stefano Masini - Codemotion Am...A real-world Relay application in production - Stefano Masini - Codemotion Am...
A real-world Relay application in production - Stefano Masini - Codemotion Am...
Codemotion
 
C# 4.0 dynamic
C# 4.0 dynamicC# 4.0 dynamic
C# 4.0 dynamic
Wiryadi Adidharma
 
Onyx
OnyxOnyx
Async Microservices with Twitter's Finagle
Async Microservices with Twitter's FinagleAsync Microservices with Twitter's Finagle
Async Microservices with Twitter's Finagle
Vladimir Kostyukov
 
Scala Future & Promises
Scala Future & PromisesScala Future & Promises
Scala Future & Promises
Knoldus Inc.
 
Groovy and Grails talk
Groovy and Grails talkGroovy and Grails talk
Groovy and Grails talk
desistartups
 

What's hot (20)

Swift Sequences & Collections
Swift Sequences & CollectionsSwift Sequences & Collections
Swift Sequences & Collections
 
Продвинутая отладка JavaScript с помощью Chrome Dev Tools
Продвинутая отладка JavaScript с помощью Chrome Dev ToolsПродвинутая отладка JavaScript с помощью Chrome Dev Tools
Продвинутая отладка JavaScript с помощью Chrome Dev Tools
 
CCResourceAsyncLoader
CCResourceAsyncLoaderCCResourceAsyncLoader
CCResourceAsyncLoader
 
Js interpreter interpreted
Js interpreter interpretedJs interpreter interpreted
Js interpreter interpreted
 
Javascript Everywhere From Nose To Tail
Javascript Everywhere From Nose To TailJavascript Everywhere From Nose To Tail
Javascript Everywhere From Nose To Tail
 
2016 gunma.web games-and-asm.js
2016 gunma.web games-and-asm.js2016 gunma.web games-and-asm.js
2016 gunma.web games-and-asm.js
 
20151224-games
20151224-games20151224-games
20151224-games
 
DOM & Events
DOM & EventsDOM & Events
DOM & Events
 
Mozilla とブラウザゲーム
Mozilla とブラウザゲームMozilla とブラウザゲーム
Mozilla とブラウザゲーム
 
Flamingo in Production
Flamingo in ProductionFlamingo in Production
Flamingo in Production
 
Functional Programming with JavaScript
Functional Programming with JavaScriptFunctional Programming with JavaScript
Functional Programming with JavaScript
 
Luis Atencio on RxJS
Luis Atencio on RxJSLuis Atencio on RxJS
Luis Atencio on RxJS
 
Locomotor: transparent migration of client-side database code
Locomotor: transparent migration of client-side database codeLocomotor: transparent migration of client-side database code
Locomotor: transparent migration of client-side database code
 
Connect S3 with Kafka using Akka Streams
Connect S3 with Kafka using Akka Streams Connect S3 with Kafka using Akka Streams
Connect S3 with Kafka using Akka Streams
 
A real-world Relay application in production - Stefano Masini - Codemotion Am...
A real-world Relay application in production - Stefano Masini - Codemotion Am...A real-world Relay application in production - Stefano Masini - Codemotion Am...
A real-world Relay application in production - Stefano Masini - Codemotion Am...
 
C# 4.0 dynamic
C# 4.0 dynamicC# 4.0 dynamic
C# 4.0 dynamic
 
Onyx
OnyxOnyx
Onyx
 
Async Microservices with Twitter's Finagle
Async Microservices with Twitter's FinagleAsync Microservices with Twitter's Finagle
Async Microservices with Twitter's Finagle
 
Scala Future & Promises
Scala Future & PromisesScala Future & Promises
Scala Future & Promises
 
Groovy and Grails talk
Groovy and Grails talkGroovy and Grails talk
Groovy and Grails talk
 

Similar to Cheep microservices

服务框架: Thrift & PasteScript
服务框架: Thrift & PasteScript服务框架: Thrift & PasteScript
服务框架: Thrift & PasteScript
Qiangning Hong
 
Java/Scala Lab: Анатолий Кметюк - Scala SubScript: Алгебра для реактивного пр...
Java/Scala Lab: Анатолий Кметюк - Scala SubScript: Алгебра для реактивного пр...Java/Scala Lab: Анатолий Кметюк - Scala SubScript: Алгебра для реактивного пр...
Java/Scala Lab: Анатолий Кметюк - Scala SubScript: Алгебра для реактивного пр...
GeeksLab Odessa
 
GDG-MLOps using Protobuf in Unity
GDG-MLOps using Protobuf in UnityGDG-MLOps using Protobuf in Unity
GDG-MLOps using Protobuf in Unity
Ivan Chiou
 
Alexey Orlenko ''High-performance IPC and RPC for microservices and apps''
Alexey Orlenko ''High-performance IPC and RPC for microservices and apps''Alexey Orlenko ''High-performance IPC and RPC for microservices and apps''
Alexey Orlenko ''High-performance IPC and RPC for microservices and apps''
OdessaJS Conf
 
Go Concurrency Patterns
Go Concurrency PatternsGo Concurrency Patterns
Go Concurrency Patterns
ElifTech
 
[PyCon 2014 APAC] How to integrate python into a scala stack to build realtim...
[PyCon 2014 APAC] How to integrate python into a scala stack to build realtim...[PyCon 2014 APAC] How to integrate python into a scala stack to build realtim...
[PyCon 2014 APAC] How to integrate python into a scala stack to build realtim...
Jerry Chou
 
Fast and Reliable Swift APIs with gRPC
Fast and Reliable Swift APIs with gRPCFast and Reliable Swift APIs with gRPC
Fast and Reliable Swift APIs with gRPC
Tim Burks
 
Node Interactive: Node.js Performance and Highly Scalable Micro-Services
Node Interactive: Node.js Performance and Highly Scalable Micro-ServicesNode Interactive: Node.js Performance and Highly Scalable Micro-Services
Node Interactive: Node.js Performance and Highly Scalable Micro-Services
Chris Bailey
 
Reactive programming every day
Reactive programming every dayReactive programming every day
Reactive programming every day
Vadym Khondar
 
Running gRPC Services for Serving Legacy API on Kubernetes
Running gRPC Services for Serving Legacy API on KubernetesRunning gRPC Services for Serving Legacy API on Kubernetes
Running gRPC Services for Serving Legacy API on Kubernetes
Sungwon Lee
 
Composable and streamable Play apps
Composable and streamable Play appsComposable and streamable Play apps
Composable and streamable Play apps
Yevgeniy Brikman
 
MessagePack Rakuten Technology Conference 2010
MessagePack Rakuten Technology Conference 2010MessagePack Rakuten Technology Conference 2010
MessagePack Rakuten Technology Conference 2010
Sadayuki Furuhashi
 
AnyMQ, Hippie, and the real-time web
AnyMQ, Hippie, and the real-time webAnyMQ, Hippie, and the real-time web
AnyMQ, Hippie, and the real-time web
clkao
 
Node js introduction
Node js introductionNode js introduction
Node js introduction
Alex Su
 
Building serverless application on the Apache Openwhisk platform
Building serverless application on the Apache Openwhisk platformBuilding serverless application on the Apache Openwhisk platform
Building serverless application on the Apache Openwhisk platform
Lucio Grenzi
 
Lucio Grenzi - Building serverless applications on the Apache OpenWhisk platf...
Lucio Grenzi - Building serverless applications on the Apache OpenWhisk platf...Lucio Grenzi - Building serverless applications on the Apache OpenWhisk platf...
Lucio Grenzi - Building serverless applications on the Apache OpenWhisk platf...
Codemotion
 
Akka with Scala
Akka with ScalaAkka with Scala
Akka with Scala
Oto Brglez
 
Evolution of kube-proxy (Brussels, Fosdem 2020)
Evolution of kube-proxy (Brussels, Fosdem 2020)Evolution of kube-proxy (Brussels, Fosdem 2020)
Evolution of kube-proxy (Brussels, Fosdem 2020)
Laurent Bernaille
 
Apache Flink @ NYC Flink Meetup
Apache Flink @ NYC Flink MeetupApache Flink @ NYC Flink Meetup
Apache Flink @ NYC Flink Meetup
Stephan Ewen
 
commit => #GitHub => #CircleCI => #Docker => #Kubernetes #AWS cluster
commit => #GitHub => #CircleCI => #Docker => #Kubernetes #AWS clustercommit => #GitHub => #CircleCI => #Docker => #Kubernetes #AWS cluster
commit => #GitHub => #CircleCI => #Docker => #Kubernetes #AWS cluster
Jakub Kulhan
 

Similar to Cheep microservices (20)

服务框架: Thrift & PasteScript
服务框架: Thrift & PasteScript服务框架: Thrift & PasteScript
服务框架: Thrift & PasteScript
 
Java/Scala Lab: Анатолий Кметюк - Scala SubScript: Алгебра для реактивного пр...
Java/Scala Lab: Анатолий Кметюк - Scala SubScript: Алгебра для реактивного пр...Java/Scala Lab: Анатолий Кметюк - Scala SubScript: Алгебра для реактивного пр...
Java/Scala Lab: Анатолий Кметюк - Scala SubScript: Алгебра для реактивного пр...
 
GDG-MLOps using Protobuf in Unity
GDG-MLOps using Protobuf in UnityGDG-MLOps using Protobuf in Unity
GDG-MLOps using Protobuf in Unity
 
Alexey Orlenko ''High-performance IPC and RPC for microservices and apps''
Alexey Orlenko ''High-performance IPC and RPC for microservices and apps''Alexey Orlenko ''High-performance IPC and RPC for microservices and apps''
Alexey Orlenko ''High-performance IPC and RPC for microservices and apps''
 
Go Concurrency Patterns
Go Concurrency PatternsGo Concurrency Patterns
Go Concurrency Patterns
 
[PyCon 2014 APAC] How to integrate python into a scala stack to build realtim...
[PyCon 2014 APAC] How to integrate python into a scala stack to build realtim...[PyCon 2014 APAC] How to integrate python into a scala stack to build realtim...
[PyCon 2014 APAC] How to integrate python into a scala stack to build realtim...
 
Fast and Reliable Swift APIs with gRPC
Fast and Reliable Swift APIs with gRPCFast and Reliable Swift APIs with gRPC
Fast and Reliable Swift APIs with gRPC
 
Node Interactive: Node.js Performance and Highly Scalable Micro-Services
Node Interactive: Node.js Performance and Highly Scalable Micro-ServicesNode Interactive: Node.js Performance and Highly Scalable Micro-Services
Node Interactive: Node.js Performance and Highly Scalable Micro-Services
 
Reactive programming every day
Reactive programming every dayReactive programming every day
Reactive programming every day
 
Running gRPC Services for Serving Legacy API on Kubernetes
Running gRPC Services for Serving Legacy API on KubernetesRunning gRPC Services for Serving Legacy API on Kubernetes
Running gRPC Services for Serving Legacy API on Kubernetes
 
Composable and streamable Play apps
Composable and streamable Play appsComposable and streamable Play apps
Composable and streamable Play apps
 
MessagePack Rakuten Technology Conference 2010
MessagePack Rakuten Technology Conference 2010MessagePack Rakuten Technology Conference 2010
MessagePack Rakuten Technology Conference 2010
 
AnyMQ, Hippie, and the real-time web
AnyMQ, Hippie, and the real-time webAnyMQ, Hippie, and the real-time web
AnyMQ, Hippie, and the real-time web
 
Node js introduction
Node js introductionNode js introduction
Node js introduction
 
Building serverless application on the Apache Openwhisk platform
Building serverless application on the Apache Openwhisk platformBuilding serverless application on the Apache Openwhisk platform
Building serverless application on the Apache Openwhisk platform
 
Lucio Grenzi - Building serverless applications on the Apache OpenWhisk platf...
Lucio Grenzi - Building serverless applications on the Apache OpenWhisk platf...Lucio Grenzi - Building serverless applications on the Apache OpenWhisk platf...
Lucio Grenzi - Building serverless applications on the Apache OpenWhisk platf...
 
Akka with Scala
Akka with ScalaAkka with Scala
Akka with Scala
 
Evolution of kube-proxy (Brussels, Fosdem 2020)
Evolution of kube-proxy (Brussels, Fosdem 2020)Evolution of kube-proxy (Brussels, Fosdem 2020)
Evolution of kube-proxy (Brussels, Fosdem 2020)
 
Apache Flink @ NYC Flink Meetup
Apache Flink @ NYC Flink MeetupApache Flink @ NYC Flink Meetup
Apache Flink @ NYC Flink Meetup
 
commit => #GitHub => #CircleCI => #Docker => #Kubernetes #AWS cluster
commit => #GitHub => #CircleCI => #Docker => #Kubernetes #AWS clustercommit => #GitHub => #CircleCI => #Docker => #Kubernetes #AWS cluster
commit => #GitHub => #CircleCI => #Docker => #Kubernetes #AWS cluster
 

Recently uploaded

UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
Wouter Lemaire
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
Project Management Semester Long Project - Acuity
Project Management Semester Long Project - AcuityProject Management Semester Long Project - Acuity
Project Management Semester Long Project - Acuity
jpupo2018
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
IndexBug
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Wask
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
OpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - AuthorizationOpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - Authorization
David Brossard
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 

Recently uploaded (20)

UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
Project Management Semester Long Project - Acuity
Project Management Semester Long Project - AcuityProject Management Semester Long Project - Acuity
Project Management Semester Long Project - Acuity
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
OpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - AuthorizationOpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - Authorization
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 

Cheep microservices

  • 1. Presented by Ezeki Zibzibadze Event-driven applications Cheep Microservices
  • 2. Agenda • Define Naming • Big Picture • Cheep Transport • Libraries & Dependencies • Demo 1 - Basic Usage • Message Structure • Broker Benchmarks • Demo 2 - Advanced Usage • Questions
  • 3. Event driven !== Event sourcing Define Naming
  • 4. APPLICATION LEVEL: Command RPC call to start new process. Always has one handler (one to one) Query RPC call to get the data. Always has one handler (one to one) Event 
 Informs about something that happened in the past. (one to many) TRANSPORT LEVEL: Message 
 All Commands, Queries & Events are messages for the transport Define Naming
  • 5. Big Picture - Microservices
  • 6. Big Picture - Microservices
  • 7. Cheep Transport Open Source. Simple. Safe. 0 dependencies written in Typescript
  • 8. Cheep Transport - Open Source Kyle Bjordahl Ezeki Zibzibadze playerx kylebjordahl github.com /so-cheep /microservices
  • 9. Cheep Transport - Simple const transport = new MemoryTransport() await transport.init() transport.on('PING', () => 'PONG') await transport.start() const result = await transport.execute({ route: 'PING', payload: {}, }) expect(result).toBe('PONG')
 await transport.publish({ route: 'PING', payload: {}, })
  • 10. Cheep Transport - Safe Execute const transport = new MemoryTransport() const api = createTransportApi<UserApi>(transport) const isValid = await api.execute.Command.User.login({ username: 'Me', password: '123', }) type Api = { Command: { User: { login: (props: { username: string password: string }) => boolean } } Event: { User: { updated: (props: { userId: string username: string }) => void } } } type UserApi = ApiWithExecutableKeys< Api, 'Command' > const transport = new MemoryTransport() const handler = createTransportHandler<UserApi>(transport) handler.on( x => x.Command.User.login, (_, data) => { return data.username === data.password }, ) 1 2 3
  • 11. Cheep Transport - Safe Publish const transport = new MemoryTransport() const api = createTransportApi<UserApi>(transport) await api.publish.Event.User.updated({ userId: 'user1', username: 'Me', }) type Api = { Command: { User: { login: (props: { username: string password: string }) => boolean } } Event: { User: { updated: (props: { userId: string username: string }) => void } } } type UserApi = ApiWithExecutableKeys< Api, 'Command' > const transport = new MemoryTransport() const handler = createTransportHandler<UserApi>(transport) handler.on( x => x.Event.User.updated, (_, data) => { console.log(data.userId, data.username) }, ) 1 2 3
  • 12. Libraries & Dependencies @cheep/transport 💯 Type-safety @cheep/transport-aws @cheep/transport-rabbitmq @cheep/transport-nats Transport Implementations: @cheep/nestjs @cheep/angular MemoryTransport
  • 14. Message Structure Payload Metadata Route Command.User.login { transactionId: "1615987703914321" createdAt: "2021-03-17T13:27:58.769Z" } { username: "Me" createdAt: "123" } Always Original Always Original Can be modified In transit
  • 15. Broker Benchmarks AWS SQS + AWS SNS RabbitMQ VS ~1ms ~100ms 1 message delivery Ideal queue length Short Unlimited
  • 16. Demo 2 RabbitMQ Broker US Pusher EU Pusher US Region EU Region GraphQL / Rest Server Game Server Redis