Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
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 v...
What is Qurami?
A venue, at a glance



Select the service of
your interest, know the
exact position of the
venue, get its...
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 d...
Architecture
APIs
Business Domain Models
Microservices
Integration services,
Databases
3rd party services
Advantages
• “No pain” updates
• Hot swappable components
• Testable architecture
• Really scalable
• Performance statisti...
Microservices
Business Domain Models Microservices
Business Domain Models

Microservices
?
Business Domain Models Microservices
API
office list? office list?
complete

domain model

data
data
presentation
elaborat...
• Low level software
• Not accessible from apps
• Single-model responsibility
• Written in Golang
Business Domain Models M...
Business Domain Models Microservices
API
HTTP JSON-RPC server
Interface
Service core
DB conn. 3rd p. int. Helpers
ServiceN...
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
├── c...
Microservice specifications
Interface Definition Language
Microservice implementation: main
func main() {
// parse some command-line parameters
// such as service ID and environmen...
Microservice implementation: jsonrpc interface
func (i *JSONRPCInterface) Enqueue(

r *http.Request,
args *EnqueueArgs,
re...
Microservice implementation: core excerpt
...
func Enqueue(args *EnqueueArgs) QueuedCommandResult {
var result QueuedComma...
RESTed
Request body
{
"id": 1,
"jsonrpc": "2.0",
"method": "Deployer.Enqueue",
"params": {
"command": "DEPLOY",
"repository": “my...
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
You’ve finished this document.
Download and read it offline.
Upcoming SlideShare
Linux kit meetup_v1.0.0
Next
Upcoming SlideShare
Linux kit meetup_v1.0.0
Next
Download to read offline and view in fullscreen.

Share

A microservice architecture based on golang

Download to read offline

A brief description of a software architecture based on golang micro services.

The keynote was shown during the Golangit meetup @ Codemotion Rome 2015 event on March 27th 2015.

Related Books

Free with a 30 day trial from Scribd

See all

A microservice architecture based on golang

  1. 1. A microservice architecture
 based on Golang @giefferre
  2. 2. What is Qurami? Qurami is the free app that queues up for you
  3. 3. What is Qurami? Select the venue you are going to
 
 Choose from the venues in your area, or
 discover all the available venues
  4. 4. What is Qurami? A venue, at a glance
 
 Select the service of your interest, know the exact position of the venue, get its contacts
  5. 5. What is Qurami? Issue a ticket
 
 Qurami will inform you about the status of the queue, in real time!
  6. 6. Availability
  7. 7. Code facts
  8. 8. Code facts Backend: 1’062’287 Mobile: 600’413 lines of code
  9. 9. Code facts API libraries system
 configuration continuous integration web stuff services utilities agent
  10. 10. Architecture evolution
  11. 11. Evolution Proof of Concept • monolithic platform in Python
  12. 12. Evolution Minimum Viable Product • backend in PHP • agent in Java
  13. 13. Evolution Product a lot more!
  14. 14. Evolution “The focus is moved from common technology to common interfaces, integration techniques, protocols for passing data around”
  15. 15. Architecture APIs Business Domain Models Microservices Integration services, Databases 3rd party services
  16. 16. Advantages • “No pain” updates • Hot swappable components • Testable architecture • Really scalable • Performance statistics
  17. 17. Microservices
  18. 18. Business Domain Models Microservices Business Domain Models
 Microservices ?
  19. 19. Business Domain Models Microservices API office list? office list? complete
 domain model
 data data presentation elaboration
  20. 20. • Low level software • Not accessible from apps • Single-model responsibility • Written in Golang Business Domain Models Microservices
  21. 21. Business Domain Models Microservices API HTTP JSON-RPC server Interface Service core DB conn. 3rd p. int. Helpers ServiceName.MethodName(params)
  22. 22. Development process
  23. 23. The Deployer Microservice
  24. 24. Requirements We needed a micro service
 to automatically deploy some applications
 from a repository to a machine
  25. 25. Microservice structure . ├── README.md
 ├── interface.idl ├── main │   └── main.go ├── interfaces │   └── jsonrpc.go ├── core │   ├── deployer.go │   └── deployserver.go └── resources └── conf ├── github.ini └── server_list.ini
  26. 26. Microservice specifications Interface Definition Language
  27. 27. 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 }
  28. 28. 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 }
  29. 29. 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 } ...
  30. 30. RESTed
  31. 31. 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" } }
  32. 32. Response body { "jsonrpc": "2.0", "result": { "queued": true, "message": "Started DEPLOY" }, "id": 1 }
  33. 33. Commands over HipChat
  34. 34. Performance improvements
  35. 35. Addendum from 60% to 20%
  36. 36. Addendum from 2% to 7%
  37. 37. Reference
  38. 38. Reference Microservice architecture http://bit.ly/1dI7ZJQ
  39. 39. Reference Microservices for dysfunctional teams http://bit.ly/1ICTyE9
  40. 40. Reference Golang http://golang.org
  41. 41. Thank You! /qurami www.qurami.cominfo@qurami.com@qurami
  • powerirs

    Feb. 19, 2019
  • wutichaiamornchaichan

    Feb. 8, 2018
  • HenriqueMartinsRober

    Nov. 17, 2017
  • rampishere

    Sep. 6, 2017
  • AswathVenkatesan

    Aug. 19, 2017
  • YunzhiWei

    Jun. 19, 2017
  • elvanowen

    May. 17, 2017
  • jaychoo

    May. 5, 2017
  • mehdifathi4

    Mar. 3, 2017
  • prohit99

    Feb. 14, 2017
  • Starfine

    Nov. 29, 2016
  • ssuserfb5522

    Nov. 2, 2016
  • TungTranThanh2

    Oct. 22, 2016
  • WidnyanaPutra2

    Oct. 5, 2016
  • cjeong

    Aug. 10, 2016
  • brianacton376

    Jul. 28, 2016
  • ssuserc95a65

    Jul. 10, 2016
  • LucianoQuercia1

    Jun. 30, 2016
  • manzevil

    Jun. 6, 2016
  • xzqttt

    May. 21, 2016

A brief description of a software architecture based on golang micro services. The keynote was shown during the Golangit meetup @ Codemotion Rome 2015 event on March 27th 2015.

Views

Total views

14,961

On Slideshare

0

From embeds

0

Number of embeds

101

Actions

Downloads

211

Shares

0

Comments

0

Likes

40

×