Practical Golang: Event multicast/subscription service

Introduction In our microservice architectures we always need a method for communicating between services. There are various ways to achieve this. Few of them are, but are not limited to: Remote Procedure Call, REST API’s, message BUSses. In this comprehensive tutorial we’ll write a service, which you can use to distribute messages/events across your system. Design How will it work? It will accept registering subscribers (other microservices). Whenever it gets a message from a microservice, it will send it further to all subscribers, using a REST call to the other microservices /event URL....

April 4, 2016 · 6 min · Jacob Martin

Web app using Microservices in Go: Part 4 – Worker and Frontend

Previous part Introduction In this part we will finally finish writing our application. We will implement the last two services: The Worker The Frontend The Worker The worker will communicate with the Master to get new Tasks. When it gets a Task it will get the corresponding data from the storage and will start working on the task. When it finishes it will send the finished data to the storage service, and if that succeeds it will register the Task as finished to the Master....

March 23, 2016 · 12 min · Jacob Martin

Web app using Microservices in Go: Part 3 – Storage and Master

Previous part Introduction In this part we will implement the next part of the microservices needed for our web app. We will implement the: Storage system Master This way we will have the Master API ready when we’ll be writing the slaves/workers and the frontend. And we’ll already have the database, k/v store and storage when writing the master. SO every time we write something we’ll already have all its dependencies....

March 21, 2016 · 9 min · Jacob Martin

Web app using Microservices in Go: Part 2 – k/v store and Database

Previous part Introduction In this part we will implement part of the microservices needed for our web app. We will implement the: key-value store Database This will be a pretty code heavy tutorial so concentrate and have fun! The key-value store Design The design hasn’t changed much. We will save the key-value pairs as a global map, and create a global mutex for concurrent access. We’ll also add the ability to list all key-value pairs for debugging/analytical purposes....

March 16, 2016 · 11 min · Jacob Martin

Web app using Microservices in Go: Part 1 – Design

Introduction Recently it’s a constantly repeated buzzword – Microservices. You can love ’em or hate ’em, but you really shouldn’t ignore ’em. In this short series we’ll create a web app using a microservice architecture. We’ll try not to use 3rd party tools and libraries. Remember though that when creating a production web app it is highly recommended to use 3rd party libraries (even if only to save you time)....

March 14, 2016 · 5 min · Jacob Martin