Microservices Described in a Scala Shop, Toby Matjovsky, North East Scala Symposium 2015

Home / Functional Programming / Microservices Described in a Scala Shop, Toby Matjovsky, North East Scala Symposium 2015

This talk is from the North East Scala Symposium where Director of Engineering Toby Matjovsky spoke about Microservices in the context of working at Tapad, a Scala shop which develops proprietary software to deliver relevant content across different devices.

As a rebranding of Service Oriented Architecture, which Matjovsky says became the clunky monolith it was supposed to replace, Tapad built a framework on top of Finagle, Twitter’s RPC system written in Scala in order to execute subroutines.

The guys at Tapad have become acutely aware of when to deploy Microservices and the advantages and disadvantages of using them, joyfully allowing you to scale different components of development although executing remote procedural calls can be slower and give you more to keep track of.

Tapad use SBT for all of their Plugins and define data types and service interfaces using Apache Thrift whilst using some extra Bootstrap code to execute with the client. Matjovsky runs through examples of an embedded project and server project showing the server Bootstrap which allows the system to wait for the client to connect.

..there is no magic about it so for example if you have a service that is in front of a database and this does some kind of database call, your database is the bottleneck of the application and you cannot simply spin up more service instances and get better performance, this is not always super obvious when writing code…      you can’t afford the fact there is some shared state or shared service behind the scenes so bare that in mind and see when things start failing.

On top of the service build plugins, Tapad use various other plugins for operations including sbt release to check that the build is clean whilst running tests plug as well as sbt assembly allowing deployment of fat JARs whilst giving control over how you handle merge conflicts.

They also recently started using Sbt Native Packager to package up applications in RPM format which Matjovsky also runs through saying it it slightly more difficult to configure pointing out override instructions to make sure it only packages what you tell it to (fat JAR).

 

Related Posts