Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Building a Bank with Go - Golang UK 2015

mattheath
August 21, 2015

Building a Bank with Go - Golang UK 2015

Large banking systems are incredibly dated, often as a result of a series of mergers between banks, leading to a patchwork of different systems & technologies. As a result, the pace of innovation in the banking industry has slowed to a crawl. At Mondo we are building a new kind of bank, a smart bank that belongs in the 21st century, and we’re building it almost entirely in Go. This talk will cover how we are developing new core banking systems from scratch backed by a microservice based platform written in Go, running across multiple data centres using tools including Docker and Mesos. We also look at why Go is perfectly suited to this, our architectural decisions, common pitfalls to avoid, and lessons learnt when developing high volume, low latency, distributed Go applications.

mattheath

August 21, 2015
Tweet

More Decks by mattheath

Other Decks in Programming

Transcript

  1. M

  2. M

  3. LOGIN
 API AUTH SERVICE PERMS SERVICE LOAD BALANCER HTTP API

    & ROUTING LAYER ACCOUNT SERVICE FEED SERVICE
  4. func main() { srv := service.Init(service.Config{ Name: "service.account", Description: "boop",

    }) srv.Server().AddEndpoints( handler.Create, handler.Read, handler.List, ) srv.Run() }
  5. type Server interface { Name() string AddEndpoints(eps ...Endpoint) RemoveEndpoints(eps ...Endpoint)

    Endpoint(name string) (Endpoint, bool) Endpoints() []Endpoint Start(trans transport.Transport) error Run(trans transport.Transport) Stop() Middleware() []ServerMiddleware SetMiddleware([]ServerMiddleware) AddMiddleware(ServerMiddleware) }
  6. func main() { srv := service.Init(service.Config{ Name: "service.account", Description: "boop",

    }) srv.Server().AddEndpoints( handler.Create, handler.Read, handler.List, ) srv.Run() }
  7. type Endpoint struct { Name string Handler Handler Request interface{}

    Response interface{} } type Handler func(req mercury.Request) (mercury.Response, error)
  8. func main() { srv := service.Init(service.Config{ Name: "service.account", Description: "boop",

    }) srv.Server().AddEndpoints( handler.Create, handler.Read, handler.List, ) srv.Run() }
  9. type Server interface { Name() string AddEndpoints(eps ...Endpoint) RemoveEndpoints(eps ...Endpoint)

    Endpoint(name string) (Endpoint, bool) Endpoints() []Endpoint Start(trans transport.Transport) error Run(trans transport.Transport) Stop() Middleware() []ServerMiddleware SetMiddleware([]ServerMiddleware) AddMiddleware(ServerMiddleware) }
  10. type Transport interface { Tomb() *tomb.Tomb Ready() <-chan struct{} Listen(serviceName

    string, inboundChan chan<- message.Request) error StopListening(serviceName string) bool Respond(request message.Request, response message.Response) error Send(req message.Request, timeout time.Duration) (message.Response, error) }
  11. type Transport interface { Tomb() *tomb.Tomb Ready() <-chan struct{} Listen(serviceName

    string, inboundChan chan<- message.Request) error StopListening(serviceName string) bool Respond(request message.Request, response message.Response) error Send(req message.Request, timeout time.Duration) (message.Response, error) }
  12. type Server interface { Name() string AddEndpoints(eps ...Endpoint) RemoveEndpoints(eps ...Endpoint)

    Endpoint(name string) (Endpoint, bool) Endpoints() []Endpoint Start(trans transport.Transport) error Run(trans transport.Transport) Stop() Middleware() []ServerMiddleware SetMiddleware([]ServerMiddleware) AddMiddleware(ServerMiddleware) }
  13. type ClientMiddleware interface { ProcessClientRequest(req mercury.Request) mercury.Request ProcessClientResponse(rsp mercury.Response, ctx

    context.Context) mercury.Response ProcessClientError(err *terrors.Error, ctx context.Context) } type ServerMiddleware interface { ProcessServerRequest(req mercury.Request) (mercury.Request, mercury.Response) ProcessServerResponse(rsp mercury.Response, ctx context.Context) mercury.Response }
  14. type Context interface { Deadline() (deadline time.Time, ok bool) Done()

    <-chan struct{} Err() error Value(key interface{}) interface{} }
  15. PhosphorD Service A Trace Library goroutine chan UDP Service B

    Trace Library goroutine chan UDP PHOSPHOR HOST INSTANCES PUBLISH DASHBOARD AGGREGATION PERSISTANCE
  16. mercury Logic Handler Storage libraries SERVICE • PROVISIONING • SERVICE

    DISCOVERY • CONFIGURATION • MONITORING • AUTHENTICATION/AUTHORISATION • AB TESTING • SELF CONFIGURING CONNECTIVITY 
 TO THIRD-PARTY SERVICES
  17. CREDITS ATM: Thomas Hawk
 IBM System/360: IBM Absorbed: Saxbald Photography

    Orbital Ion Cannon: www.rom.ac Go Gophers: Renee French Control Room: NASA ATM Failure: George Redgrave