MicroServices - Let’s Build Some!
A hands-on development of asynchronous MicroServices using a bus architecture!
This is the original MicroService workshop by the person who Adrian Cockcroft (of Netflix) cites as the first use of the term, MicroService. While “MicroServices” is becoming a heavily over-worked term, it has been interpreted many ways. In this hands-on workshop we will explore a particular style that matches “fuzzy” problems, that is, problems that lack a definitive solution, like fraud detection or recommendations. Using tiny asynchronous services, we create an environment that supports continuous experimentation, that was the core of one of the most successful implementations. Given an animated specification of flow, we will embark on delivering the proposed services, wrestling with the issues common to this new paradigm. Participants have a choice of languages, with new starting code in Java, C#, and Ruby. At the end of the workshop, we will discuss MicroServices challenges and organizations that are optimized for such architectures.
It is one thing to talk about MicroServices. It is another altogether to have to build them. The instructor, Fred George, is cited by Martin Fowler as one of the co-inventors of the MicroService architecture, and cited by one of those co-inventors as the first use of the term MicroService.. He has refined it and used it extensively over the last dozen years, mostly on the “fuzzy” problems (see Dave Snowden’s Cynefin model’s Complex and Chaos segments). After a brief introduction of MicroService principles, we will watch an animation of a MicroService environment. We will start with new versions of pre-built skeleton microservice environment (RabbitMQ message bus with a couple of starter services in Java, C#, and Ruby). We will then design and implement additional services to broaden the overall functionality. These additional services can be written in any language that will run on the participant's laptop.
While pairing is strongly encouraged, it is not required. In the final stage, different pairs will implement different services, yet they will all run together implementing the animation. Throughout the workshop, we will stop as participants come across common issues with MicroServices. We will use this time to discuss best practices. We wrap up with the participants making observations on what they learned (and how it may be different from MicroServices they are currently implementing, if any). This is followed by presentations on MicroService challenges and the organization impact of rapidly developed MicroServices.
Outline/Structure of the Workshop
- Introduction to MicroServices
- Sample asynchronous MicroService application
- Installation of sample MicroServices for the exercise
- Installing RabbitMQ drivers for your language
- Testing access to RabbitMQ server
- Implementing a new MicroService
- Discussion of effort
- Implementing a second MicroService
- Discussion and review of code
- Implementing the application (teams develop different services that will work together)
- Wrap up observations by participants
The focus of the workshop will be on:
1) Understanding how to design asynchronous servicearchitectures,
2) Creating small, yet functional, services rather than larger services,
3) Reducing coupling to the bare minimum (JSON packets with extra fields ignored), and
4) Debugging asynchronous systems.
Developers (we will be writing code). Workshop is limited to 24 attendees.
Prerequisites for Attendees
The MicroServices Workshop is a coding workshop. You need to bring your favourite development notebook with tools installed. The sample code we start with is in GitHub. Please download it (https://github.com/fredgeorge/microservice_workshop ) before the class, and import it into your favourite development tool.
ports (Google your OS for details) 5672 and 15672 so that your pairing partner can access your RabbitMQ.
All these details and more exist in the README for the GitHub repository and in the various specific language directories. If you don't get a chance to do this before class, we will spend the initial time in the class getting it done. You'll write more new services quicker if you can get this done before the workshop.
Good luck, and I look forward to seeing you in the class.