GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing javaadvent.blogspot.com — Doing microservices with micro-infra-spring
Sunday, December 21, 2014Doing microservices with micro-infra-spring
We've been working at 4financeit for last couple of months on some open source solutions for microservices. I will be publishing some articles related to microservices and our tools and this is the first of (hopefully) many that I will write in the upcoming weeks (months?) on Too much coding blog.
This article will be an introduction to the micro-infra-spring library showing how you can quickly set up a microservice using our tools. IntroductionBefore you start it is crucial to remember that it's not enough to just use our tools to have a microservice. You can check out my slides about microservices and issues that we have dealt with while adopting them at 4financeit.
4financeit microservices 12.2014 at Lodz JUG from Marcin Grzejszczak
This post is part of the Java Advent Calendar and is licensed under the Creative Commons 3.0 Attribution license. If you like it, please spread the word by sharing, tweeting, FB, G+ and so on!
Here you can find my video where I talk about microservice at 4finance (it's from 19.09.2014 so it's pretty outdated) Also it's worth checking out the articles of Martin Fowler about microservices, Todd Hoff's - Microservices not a free lunch! or The Strengths and Weaknesses of Microservices by Abel Avram's. Is monolith bad?No it isn't! The most important thing to remember when starting with microservices is that it will complicate your life in terms of operations, metrics, deployment and testing. Of course it does bring plenty of benefits but if you are unsure of what to pick - monolith or microservices then my advice to use is to go the monolith way.All the benefits of microservices like code autonomy, doing one thing well, getting ridd of pacakge dependencies can be also achieved in the monolithic code thus try to write your applications with such approaches and your life will get simpler for sure. How to achieve that? That's complicated but here are a couple of hints that I can give you:
I'm a hipster - I want microservices!
Let's assume that you know what you are doing, you evaluated all pros and cons and you want to go down the microservice way. You have a devops culture there in your company and people are eager to start working on multiple codebases. How to start? Pick our tools and you won't regret it ;)
Clone a repo and get to work
We have set up a working template on Github with UI - boot-microservice-gui and without it - boot-microservice. If you clone our repo and start working with it you get a service that:
what you just have to do is:
Why should you use our repo?
Aren't we duplicating Spring Cloud?
In fact we're not. We're using it in our libraries ourselves (right now for property storage in Git repository). We have some different approaches to service discovery for instance but in general we are extending Spring Cloud's features by:
Conclusions
If you want to go down the microservice way you have to be well aware of the issues related to that approach. If you know what you're doing you can use our libraries and our microservice templates to have a fast start into feature development.
What's next
On my blog at toomuchcoding.blogspot.com I'll write about different features of the micro-infra-spring library with more emphasis on configuration on specific features that are not that well known but equally cool as the rest ;) Also I'll write some articles on how we approached splitting the monolith but you'll have to wait for that some time ;)
Subscribe to:
Post Comments (Atom)
| ||||||||||||||||||||||||||||||||||||||||||
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |