SlideShare a Scribd company logo
Micro-service
architectures using
Gilmour
Aditya Godbole
@aagdbl, aa@gdbl.me
TechJam
Services
• Process isolation
• Polyglot
• Potentially remote
vs Libraries
Services
• Logical entity - higher level of abstraction
• Can be comprised of sub-services
• Multiple servers for fault tolerance
• Different expectations of reliability
vs Servers
Service oriented architecture
Service oriented architecture
Function points
Micro-service architectures with Gilmour
Why?
Why?
• Software problem: Function point scalability
Why?
• Software problem: Function point scalability
• People problem: Clean separation of authority and
responsibility
Patterns
Async - Signals and slots
Async - Signals and slots
Web
Async - Signals and slots
Web
User added
Signal
Async - Signals and slots
Web
User added
Email
notifier
SMS
notifier
Slots
Signal
Async - Signals and slots
Web
User added
Email
notifier
SMS
notifier
Slots
Signal
Async - Signals and slots
Web
User added
Email
notifier
SMS
notifier
Slots
Signal
Push
message
notifier
Async - Signals and slots
Web
User added
Email
notifier
SMS
notifier
Slots
Signal
user.add.500
Push
message
notifier
Async - Signals and slots
Web
User added
Email
notifier
SMS
notifier
Slots
Signal
user.add.500
user.add.*
user.add.*
user.add.*
Push
message
notifier
Async - Signals and slots
Web
User added
Email
notifier
SMS
notifier
Slots
Signal
user.add.500
user.add.*
user.add.*
user.add.*
VIP customer
notified
user.add.420
Push
message
notifier
Async - Signals and slots
Web
User added
Email
notifier
SMS
notifier
Slots
Signal
user.add.500
user.add.*
user.add.*
user.add.*
VIP customer
notified
user.add.420
Push
message
notifier
Push
message
notifier
Push
message
notifier
Async - Signals and slots
Web
User added
Email
notifier
SMS
notifier
Slots
Signal
user.add.500
user.add.*
user.add.*
user.add.*
VIP customer
notified
user.add.420
Push
message
notifier
Push
message
notifier
Push
message
notifier FP scaling
Async - Signals and slots
Web
User added
Email
notifier
SMS
notifier
Slots
Signal
user.add.500
user.add.*
user.add.*
user.add.*
VIP customer
notified
user.add.420
Push
message
notifier
Push
message
notifier
Push
message
notifier FP scaling
excl_group: push_msg
7
8 server = Server.new
9 gilmour = server.enable_backend('redis')
10
11 waiter = Gilmour::Waiter.new
12
13 waiter.add
14 gilmour.slot "user.added.*" do
15 # This one will send out email notifications
16 logger.info "Sent email notification for -"
17 logger.info request.body
18 waiter.done
19 end
20
21 waiter.add
22 gilmour.slot "user.added.*" do
23 # This one will send out push notifications
24 logger.info "Sent push notification for -"
25 logger.info request.body
26 waiter.done
27 end
28
29 EM.next_tick {
30 gilmour.signal!({ username: 'foo', email: 'foo@bar.com' }, 'user.added.9')
31 }
32
33 waiter.wait
Signals and slots - Failure
Web
User added
Email
notifier
SMS
notifier
Push
message
notifier
Slots
Signal
Signals and slots - Failure
Web
User added
Email
notifier
SMS
notifier
Push
message
notifier
Slots
Signal Error reporter
gilmour.error
Request Response
RPC
Hello?
Request Response
RPC
Hello?
Aloha!
Request Response
RPC
Hello?
Aloha!
sender_id
Request Response
RPC
Hello?
Aloha!
sender_id
Wrong number!
Request Response
RPC
Hello?
Aloha!
sender_id
Wrong number! code
Request Response
RPC
Hello?
Aloha!
{	
  
	
  	
  data:	
  The	
  actual	
  payload,	
  
	
  	
  sender:	
  The	
  origin	
  of	
  the	
  request	
  (unique	
  for	
  each	
  request),	
  
	
  	
  code:	
  The	
  response	
  code	
  if	
  this	
  is	
  a	
  response.	
  This	
  uses	
  HTTP	
  error	
  codes	
  
}
sender_id
Wrong number! code
Signals/Slots
vs
Request/Reply
Signals/Slots
vs
Request/Reply
• Ownership of failure
Error detection
• confirm_subscriber - Are there any active
subscribers?
• timeout - Client side and service side timeouts
Errors
Hello?
Errors
Hello?
Aloha!
Errors
Hello?
Aloha!
sender_id
Errors
Hello?
Aloha!
sender_id
Wrong number!
Errors
Hello?
Aloha!
sender_id
Wrong number! code
Error reporter
Errors
Hello?
Aloha!
sender_id
Wrong number! code
Error reporter
?
Errors
Hello?
Aloha!
sender_id
Wrong number! code
Error reporter
?
{	
  
	
  	
  	
  	
  code:	
  response	
  code	
  (non-­‐200)	
  
	
  	
  	
  	
  sender:	
  the	
  "sender"	
  from	
  the	
  request	
  
	
  	
  	
  	
  topic:	
  the	
  topic	
  to	
  which	
  the	
  request	
  was	
  sent	
  
	
  	
  	
  	
  request_data:	
  the	
  request	
  payload	
  
	
  	
  	
  	
  userdata:	
  implementation	
  dependent	
  debug	
  infomation	
  
	
  	
  	
  	
  backtrace:	
  the	
  backtrace	
  of	
  the	
  error	
  
	
  	
  	
  	
  timestamp:	
  the	
  timestamp	
  of	
  the	
  error	
  
}
Errors
request_id":"c60bc3ba-e7ff-4ec1-98cf-54541b671e7c"
request_id = Errors + Logs
Ops - Servers
• Log forwarding and aggregation
• Error reporting
• Monitoring
Ops - services
• What are the services in my system?
• Do my services have spare capacity
• Do my services respond in time?
health-bulletin
Gilmour
• Library - no external process
• Async - Signals, slots
• Sync - Request, Reply
• Low level publish subscribe
• Scaling - Exclusion groups
• Error and health monitoring
• Failure detection
• No message persistence or failure handing
For everything else …
• Hystrix - Backpressure management, circuit
breaking, failure queues, retries
Micro-service architectures with Gilmour
Services
Services
Micro?
The wisdom of the
masters
• Do one thing and do it well
• Design programs to be connected to other programs
• When a program has nothing surprising to say, it
should say nothing.
• When you must fail, fail noisily and as soon as
possible.
• Design for the future, because it will be here sooner
than you think.
Unix philosophy -> micro-services
stdin, stdout, stderr
stdin, stdout, stderr
stdin
stdin, stdout, stderr
stdin
stdout
stdin, stdout, stderr
stdin
stderr
Error reporter
stdout
Composition
• compose - cmd1 | cmd2 | cmd3
• andand - cmd1 && cmd2 && cmd3
• batch - cmd1; cmd2; cmd3 > out OR 

(cmd1; cmd2; cmd3) > out
• parallel & sync
((bringup_dc | dc_validate) |
(parallel bringup_logger
bringup_monitor) | infra_validate)
1 def do_bringup(_data, responder)
5 dc_pipeline = responder.compose([
6 { topic: 'private.customer.datacenter.create', message: data },
7 { topic: 'private.datacenter.validate' }
8 ])
9 nodes_pipeline = responder.compose([
10 responder.parallel([
11 { topic: 'private.customer.logger.create', message: data },
12 { topic: 'private.customer.monitor.create', message: data },
13 ]),
14 ->(d) { d.reduce({}) { |m, out| m.merge(out[:data]) } },
15 { topic: 'private.dummy.validate' }
16 ])
17
18 responder.sync(responder.compose([dc_pipeline, nodes_pipeline])) do |
resdata, rescode|
19 $stderr.puts rescode, resdata
25 end
26 end
Gilmour
• Library - no external process
• Async - Signals, slots
• Sync - Request, Reply
• Scaling - Exclusion groups
• Error and health monitoring
• Failure detection
• Composition - real micro-services
• No message persistence or failure handing
Languages
• Ruby - https://github.com/gilmour-libs/gilmour
• Reference implementation.
• Most feature complete
• Nice
• Java / Go -
• https://github.com/gilmour-libs/gilmour-e-go and https://github.com/
gilmour-libs/gilmour-e-java
• The cleanest API design
• Request-reply, signal-slot abstractions
• Composition
Goli - Gilmour cli
$: goli request hello-world <(cat data.yml) | echo
$: goli request hello-world <(cat data.yml) | goli
signal another-hello | echo
$: timeout 5 goli request hello-world <(cat
data.yml)
$: goli status --topic hello-world --topic another-
hello
$: goli health-check | curl -I “pagerduty….”
$: goli tail gilmour.error
Credits
• Ruby community
• Piyush Verma @meson10
• Datascale

More Related Content

PDF
TLS and Certificates
PDF
OOPS v2.0.0-rc.1 - Interfaces and Traits for Ruby
PPTX
Tef con2016 (1)
PDF
Inter process communication
PDF
Microservices. Mastering Chaos
PPTX
Microservices-101
PPTX
Designing Fault Tolerant Microservices
PDF
Richardrodger nodeday-2014-final
TLS and Certificates
OOPS v2.0.0-rc.1 - Interfaces and Traits for Ruby
Tef con2016 (1)
Inter process communication
Microservices. Mastering Chaos
Microservices-101
Designing Fault Tolerant Microservices
Richardrodger nodeday-2014-final

Similar to Micro-service architectures with Gilmour (20)

PDF
Richardrodger nodeday-2014-final
PPTX
.Net Microservices with Event Sourcing, CQRS, Docker and... Windows Server 20...
PPTX
An introduction to Microservices
PPTX
Jeffrey Richter
PDF
Microservice architecture
PDF
Service Mesh Talk for CTO Forum
PDF
Microservices: What's Missing - O'Reilly Software Architecture New York
PDF
Expect the unexpected: Prepare for failures in microservices
PDF
Building Microservices Software practics
PDF
Design Patterns in Micro-services architectures & Gilmour
PPTX
Service Mesh CTO Forum (Draft 3)
PPTX
.NET Fest 2019. Irina Scurtu. Forget about HTTP
PDF
Microservices - opportunities, dilemmas and problems
PDF
Resilient microservices
PPTX
Microservices
PDF
OptiSol Microservices Architecture - Tech Meetup
PPTX
Concurrency at Scale: Evolution to Micro-Services
PPTX
Microservices pros and cons
PPTX
Main Groups of Microservices
PDF
Microservices architecture: practical aspects
Richardrodger nodeday-2014-final
.Net Microservices with Event Sourcing, CQRS, Docker and... Windows Server 20...
An introduction to Microservices
Jeffrey Richter
Microservice architecture
Service Mesh Talk for CTO Forum
Microservices: What's Missing - O'Reilly Software Architecture New York
Expect the unexpected: Prepare for failures in microservices
Building Microservices Software practics
Design Patterns in Micro-services architectures & Gilmour
Service Mesh CTO Forum (Draft 3)
.NET Fest 2019. Irina Scurtu. Forget about HTTP
Microservices - opportunities, dilemmas and problems
Resilient microservices
Microservices
OptiSol Microservices Architecture - Tech Meetup
Concurrency at Scale: Evolution to Micro-Services
Microservices pros and cons
Main Groups of Microservices
Microservices architecture: practical aspects
Ad

Recently uploaded (20)

PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PPTX
Introduction to Artificial Intelligence
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PDF
top salesforce developer skills in 2025.pdf
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PPTX
Essential Infomation Tech presentation.pptx
PPTX
CHAPTER 2 - PM Management and IT Context
PPTX
Transform Your Business with a Software ERP System
PDF
medical staffing services at VALiNTRY
PPTX
ai tools demonstartion for schools and inter college
PDF
System and Network Administration Chapter 2
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PPTX
L1 - Introduction to python Backend.pptx
PDF
How Creative Agencies Leverage Project Management Software.pdf
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
2025 Textile ERP Trends: SAP, Odoo & Oracle
Introduction to Artificial Intelligence
Odoo Companies in India – Driving Business Transformation.pdf
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
top salesforce developer skills in 2025.pdf
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Essential Infomation Tech presentation.pptx
CHAPTER 2 - PM Management and IT Context
Transform Your Business with a Software ERP System
medical staffing services at VALiNTRY
ai tools demonstartion for schools and inter college
System and Network Administration Chapter 2
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
How to Migrate SBCGlobal Email to Yahoo Easily
L1 - Introduction to python Backend.pptx
How Creative Agencies Leverage Project Management Software.pdf
Internet Downloader Manager (IDM) Crack 6.42 Build 41
VVF-Customer-Presentation2025-Ver1.9.pptx
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Ad

Micro-service architectures with Gilmour