SlideShare a Scribd company logo
A microservice architectureโ€จ
based on Golang
@giefferre
What is Qurami?
Qurami is the free app
that queues up for you
What is Qurami?
Select the venue you
are going toโ€จ
โ€จ
Choose from the
venues in your area, orโ€จ
discover all the
available venues
What is Qurami?
A venue, at a glanceโ€จ
โ€จ
Select the service of
your interest, know the
exact position of the
venue, get its contacts
What is Qurami?
Issue a ticketโ€จ
โ€จ
Qurami will inform you
about the status of the
queue, in real time!
Availability
Code facts
Code facts
Backend: 1โ€™062โ€™287
Mobile: 600โ€™413
lines of code
Code facts
API
libraries
systemโ€จ
configuration
continuous
integration
web stuff
services
utilities
agent
Architecture evolution
Evolution
Proof of Concept
โ€ข monolithic platform in Python
Evolution
Minimum Viable Product
โ€ข backend in PHP
โ€ข agent in Java
Evolution
Product
a lot more!
Evolution
โ€œThe focus is moved from common
technology to common interfaces, integration
techniques, protocols for passing data aroundโ€
Architecture
APIs
Business Domain Models
Microservices
Integration services,
Databases
3rd party services
Advantages
โ€ข โ€œNo painโ€ updates
โ€ข Hot swappable components
โ€ข Testable architecture
โ€ข Really scalable
โ€ข Performance statistics
Microservices
Business Domain Models Microservices
Business Domain Modelsโ€จ
Microservices
?
Business Domain Models Microservices
API
office list? office list?
completeโ€จ
domain modelโ€จ
data
data
presentation
elaboration
โ€ข Low level software
โ€ข Not accessible from apps
โ€ข Single-model responsibility
โ€ข Written in Golang
Business Domain Models Microservices
Business Domain Models Microservices
API
HTTP JSON-RPC server
Interface
Service core
DB conn. 3rd p. int. Helpers
ServiceName.MethodName(params)
Development process
The Deployer Microservice
Requirements
We needed a micro serviceโ€จ
to automatically deploy some applicationsโ€จ
from a repository to a machine
Microservice structure
.
โ”œโ”€โ”€ README.mdโ€จ
โ”œโ”€โ”€ interface.idl
โ”œโ”€โ”€ main
โ”‚ย ย  โ””โ”€โ”€ main.go
โ”œโ”€โ”€ interfaces
โ”‚ย ย  โ””โ”€โ”€ jsonrpc.go
โ”œโ”€โ”€ core
โ”‚ย ย  โ”œโ”€โ”€ deployer.go
โ”‚ย ย  โ””โ”€โ”€ deployserver.go
โ””โ”€โ”€ resources
โ””โ”€โ”€ conf
โ”œโ”€โ”€ github.ini
โ””โ”€โ”€ server_list.ini
Microservice specifications
Interface Definition Language
Microservice implementation: main
func main() {
// parse some command-line parameters
// such as service ID and environment
...
deployer, err := servers.NewRPCServer(โ€จ
new(interfaces.JSONRPCInterface),
Identifier,
Environment,
)โ€จ
if err != nil {
log.Fatal(err)
}
deployer.ServeJSON()
...
// wait until an exit command is given
}
Microservice implementation: jsonrpc interface
func (i *JSONRPCInterface) Enqueue(โ€จ
r *http.Request,
args *EnqueueArgs,
reply *string,
) error {
result, err := core.Enqueue(*args)
if err != nil {
return err
}
*reply = result
return nil
}
Microservice implementation: core excerpt
...
func Enqueue(args *EnqueueArgs) QueuedCommandResult {
var result QueuedCommandResult
deployer, err := NewDeployer(โ€จ
args.Command,
args.Repository,
args.AppName,
args.Branch,
args.DestMachine,
)
if err != nil {
result.Queued = false
result.Message = err.Error()
} else {
result.Queued = true
result.Message = "Started " + args.Command
go deployer.SetAndExecute()
}
return result
}
...
RESTed
Request body
{
"id": 1,
"jsonrpc": "2.0",
"method": "Deployer.Enqueue",
"params": {
"command": "DEPLOY",
"repository": โ€œmy-repository",
"appName": โ€œmy-application",
"branch": "my-feature-branch",
"destMachine": "test01"
}
}
Response body
{
"jsonrpc": "2.0",
"result": {
"queued": true,
"message": "Started DEPLOY"
},
"id": 1
}
Commands over HipChat
Performance improvements
Addendum
from 60% to 20%
Addendum
from 2% to 7%
Reference
Reference
Microservice architecture
http://bit.ly/1dI7ZJQ
Reference
Microservices for dysfunctional teams
http://bit.ly/1ICTyE9
Reference
Golang
http://golang.org
Thank You!
/qurami www.qurami.cominfo@qurami.com@qurami

More Related Content

What's hot (20)

PDF
DCSF 19 Microservices API: Routing Across Any Infrastructure
Docker, Inc.
ย 
PPTX
Simple tweaks to get the most out of your JVM
Jamie Coleman
ย 
PDF
DockerCon SF 2015: Docker at Lyft
Docker, Inc.
ย 
ODP
DevOps @ OpenShift Online
OpenShift Origin
ย 
PDF
Automating CICD Pipeline with GitLab and Docker Containers for Java Applications
Jelastic Multi-Cloud PaaS
ย 
PDF
Troubleshooting tips from docker support engineers
Docker, Inc.
ย 
PDF
The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
Josef Adersberger
ย 
PDF
Microservices, Kubernetes and Istio - A Great Fit!
Animesh Singh
ย 
PPTX
Enabling Production Grade Containerized Applications through Policy Based Inf...
Docker, Inc.
ย 
ODP
Openshift presentation
ArmaฤŸan Ersรถz
ย 
PDF
Improving security with Istio | DevNation Tech Talk
Red Hat Developers
ย 
PDF
DCEU 18: Docker Container Networking
Docker, Inc.
ย 
PPTX
Why kubernetes matters
Platform9
ย 
PPTX
Spring Boot on Kubernetes/OpenShift
Kamesh Sampath
ย 
PDF
Containers & Cloud Native Ops Cloud Foundry Approach
CodeOps Technologies LLP
ย 
PDF
Back to the Future: Containerize Legacy Applications
Docker, Inc.
ย 
ODP
Openshift: Build, deploy & manage open, standard containers
Jonh Wendell
ย 
PDF
DockerCon SF 2015: DHE/DTR
Docker, Inc.
ย 
PPTX
Microservices and Best Practices
Weaveworks
ย 
PDF
PHPIDOL#80: Kubernetes 101 for PHP Developer. Yusuf Hadiwinata - VP Operation...
Yusuf Hadiwinata Sutandar
ย 
DCSF 19 Microservices API: Routing Across Any Infrastructure
Docker, Inc.
ย 
Simple tweaks to get the most out of your JVM
Jamie Coleman
ย 
DockerCon SF 2015: Docker at Lyft
Docker, Inc.
ย 
DevOps @ OpenShift Online
OpenShift Origin
ย 
Automating CICD Pipeline with GitLab and Docker Containers for Java Applications
Jelastic Multi-Cloud PaaS
ย 
Troubleshooting tips from docker support engineers
Docker, Inc.
ย 
The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
Josef Adersberger
ย 
Microservices, Kubernetes and Istio - A Great Fit!
Animesh Singh
ย 
Enabling Production Grade Containerized Applications through Policy Based Inf...
Docker, Inc.
ย 
Openshift presentation
ArmaฤŸan Ersรถz
ย 
Improving security with Istio | DevNation Tech Talk
Red Hat Developers
ย 
DCEU 18: Docker Container Networking
Docker, Inc.
ย 
Why kubernetes matters
Platform9
ย 
Spring Boot on Kubernetes/OpenShift
Kamesh Sampath
ย 
Containers & Cloud Native Ops Cloud Foundry Approach
CodeOps Technologies LLP
ย 
Back to the Future: Containerize Legacy Applications
Docker, Inc.
ย 
Openshift: Build, deploy & manage open, standard containers
Jonh Wendell
ย 
DockerCon SF 2015: DHE/DTR
Docker, Inc.
ย 
Microservices and Best Practices
Weaveworks
ย 
PHPIDOL#80: Kubernetes 101 for PHP Developer. Yusuf Hadiwinata - VP Operation...
Yusuf Hadiwinata Sutandar
ย 

Similar to A microservice architecture based on golang (20)

PDF
Building asynchronous micro-services that get along
Makara Wang
ย 
PDF
Microservices at Mercari
Google Cloud Platform - Japan
ย 
PPTX
Microservices with Node and Docker
Tony Pujals
ย 
PDF
Microservices for java architects it-symposium-2015-09-15
Derek Ashmore
ย 
PDF
Microservices in GO - Massimiliano Dessรฌ - Codemotion Rome 2017
Codemotion
ย 
PDF
4Developers 2015: Do you think you're doing microservice architecture? - Marc...
PROIDEA
ย 
PDF
Do you think you're doing microservice architecture? What about infrastructur...
Marcin Grzejszczak
ย 
PPTX
Microservices: next-steps
Boyan Dimitrov
ย 
PPTX
Yotpo microservices
Ron Barabash
ย 
PDF
Monolith vs Microservices with Golang at practice - Ivan Kutuzov
Kuberton
ย 
PDF
Cloud Foundry Open Tour China (english)
marklucovsky
ย 
PDF
Olist Architecture v2.0
Osvaldo Santana Neto
ย 
PPT
TransitioningToMicroServonDocker_MS
Lana Kalashnyk
ย 
PDF
Microservices Journey NYC
Christian Posta
ย 
PDF
Microservices in Go_Dessi_Massimiliano_Codemotion_2017_Rome
Massimiliano Dessรฌ
ย 
PDF
OSGi Cloud Ecosystems (OSGi Users Forum Germany)
David Bosschaert
ย 
PDF
Zero to scaleable in ten minutes
Matt Walters
ย 
PPTX
High-speed, Reactive Microservices 2017
Rick Hightower
ย 
PPTX
Tef con2016 (1)
ggarber
ย 
PDF
Microservices - opportunities, dilemmas and problems
ลukasz Sowa
ย 
Building asynchronous micro-services that get along
Makara Wang
ย 
Microservices at Mercari
Google Cloud Platform - Japan
ย 
Microservices with Node and Docker
Tony Pujals
ย 
Microservices for java architects it-symposium-2015-09-15
Derek Ashmore
ย 
Microservices in GO - Massimiliano Dessรฌ - Codemotion Rome 2017
Codemotion
ย 
4Developers 2015: Do you think you're doing microservice architecture? - Marc...
PROIDEA
ย 
Do you think you're doing microservice architecture? What about infrastructur...
Marcin Grzejszczak
ย 
Microservices: next-steps
Boyan Dimitrov
ย 
Yotpo microservices
Ron Barabash
ย 
Monolith vs Microservices with Golang at practice - Ivan Kutuzov
Kuberton
ย 
Cloud Foundry Open Tour China (english)
marklucovsky
ย 
Olist Architecture v2.0
Osvaldo Santana Neto
ย 
TransitioningToMicroServonDocker_MS
Lana Kalashnyk
ย 
Microservices Journey NYC
Christian Posta
ย 
Microservices in Go_Dessi_Massimiliano_Codemotion_2017_Rome
Massimiliano Dessรฌ
ย 
OSGi Cloud Ecosystems (OSGi Users Forum Germany)
David Bosschaert
ย 
Zero to scaleable in ten minutes
Matt Walters
ย 
High-speed, Reactive Microservices 2017
Rick Hightower
ย 
Tef con2016 (1)
ggarber
ย 
Microservices - opportunities, dilemmas and problems
ลukasz Sowa
ย 
Ad

Recently uploaded (20)

PDF
SAP GUI Installation Guide for macOS (iOS) | Connect to SAP Systems on Mac
SAP Vista, an A L T Z E N Company
ย 
PDF
Enhancing Security in VAST: Towards Static Vulnerability Scanning
ESUG
ย 
PPTX
TexSender Pro 8.9.1 Crack Full Version Download
cracked shares
ย 
PPTX
Employee salary prediction using Machine learning Project template.ppt
bhanuk27082004
ย 
PDF
Odoo Customization Services by CandidRoot Solutions
CandidRoot Solutions Private Limited
ย 
PDF
Best Insurance Compliance Software for Managing Regulations
Insurance Tech Services
ย 
PDF
Ready Layer One: Intro to the Model Context Protocol
mmckenna1
ย 
PDF
How AI in Healthcare Apps Can Help You Enhance Patient Care?
Lilly Gracia
ย 
PPTX
SAP Public Cloud PPT , SAP PPT, Public Cloud PPT
sonawanekundan2024
ย 
PPTX
Cutting Optimization Pro 5.18.2 Crack With Free Download
cracked shares
ย 
PDF
Supabase Meetup: Build in a weekend, scale to millions
Carlo Gilmar Padilla Santana
ย 
PPT
Brief History of Python by Learning Python in three hours
adanechb21
ย 
PDF
Australian Enterprises Need Project Service Automation
Navision India
ย 
PDF
Summary Of Odoo 18.1 to 18.4 : The Way For Odoo 19
CandidRoot Solutions Private Limited
ย 
PPTX
ChessBase 18.02 Crack + Serial Key Free Download
cracked shares
ย 
PPTX
Transforming Lending with IntelliGrow โ€“ Advanced Loan Software Solutions
Intelli grow
ย 
PDF
Introduction to Apache Icebergโ„ข & Tableflow
Alluxio, Inc.
ย 
PDF
How Attendance Management Software is Revolutionizing Education.pdf
Pikmykid
ย 
PDF
Notification System for Construction Logistics Application
Safe Software
ย 
PPTX
MiniTool Partition Wizard Crack 12.8 + Serial Key Download Latest [2025]
filmoracrack9001
ย 
SAP GUI Installation Guide for macOS (iOS) | Connect to SAP Systems on Mac
SAP Vista, an A L T Z E N Company
ย 
Enhancing Security in VAST: Towards Static Vulnerability Scanning
ESUG
ย 
TexSender Pro 8.9.1 Crack Full Version Download
cracked shares
ย 
Employee salary prediction using Machine learning Project template.ppt
bhanuk27082004
ย 
Odoo Customization Services by CandidRoot Solutions
CandidRoot Solutions Private Limited
ย 
Best Insurance Compliance Software for Managing Regulations
Insurance Tech Services
ย 
Ready Layer One: Intro to the Model Context Protocol
mmckenna1
ย 
How AI in Healthcare Apps Can Help You Enhance Patient Care?
Lilly Gracia
ย 
SAP Public Cloud PPT , SAP PPT, Public Cloud PPT
sonawanekundan2024
ย 
Cutting Optimization Pro 5.18.2 Crack With Free Download
cracked shares
ย 
Supabase Meetup: Build in a weekend, scale to millions
Carlo Gilmar Padilla Santana
ย 
Brief History of Python by Learning Python in three hours
adanechb21
ย 
Australian Enterprises Need Project Service Automation
Navision India
ย 
Summary Of Odoo 18.1 to 18.4 : The Way For Odoo 19
CandidRoot Solutions Private Limited
ย 
ChessBase 18.02 Crack + Serial Key Free Download
cracked shares
ย 
Transforming Lending with IntelliGrow โ€“ Advanced Loan Software Solutions
Intelli grow
ย 
Introduction to Apache Icebergโ„ข & Tableflow
Alluxio, Inc.
ย 
How Attendance Management Software is Revolutionizing Education.pdf
Pikmykid
ย 
Notification System for Construction Logistics Application
Safe Software
ย 
MiniTool Partition Wizard Crack 12.8 + Serial Key Download Latest [2025]
filmoracrack9001
ย 
Ad

A microservice architecture based on golang