{"id":1915,"date":"2017-02-28T20:18:28","date_gmt":"2017-02-28T19:18:28","guid":{"rendered":"https:\/\/blog.mi.hdm-stuttgart.de\/?p=1915"},"modified":"2023-06-07T15:25:55","modified_gmt":"2023-06-07T13:25:55","slug":"microservices-legolizing-software-development-5","status":"publish","type":"post","link":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/2017\/02\/28\/microservices-legolizing-software-development-5\/","title":{"rendered":"Microservices &#8211; Legolizing Software Development V"},"content":{"rendered":"<p style=\"text-align: justify;\">Welcome to the final part of our microservices series. If you\u2019ve missed a previous post you can read it here:<\/p>\n<p style=\"text-align: justify;\">I)<a href=\"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/2017\/02\/28\/microservices-legolizing-software-development-1\/\"> Architecture<br \/>\n<\/a>II) <a href=\"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/2017\/02\/28\/microservices-legolizing-software-development-2\/\">Caching<br \/>\n<\/a>III) <a href=\"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/2017\/02\/28\/microservices-legolizing-software-development-3\/\">Security<br \/>\n<\/a>IV) <a href=\"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/2017\/02\/28\/microservices-legolizing-software-development-4\/\">Continuous Integration<br \/>\n<\/a>V) <a href=\"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/2017\/02\/28\/microservices-legolizing-software-development-5\/\">Lessons Learned<\/a><\/p>\n<h1 style=\"text-align: justify;\">Lessons Learned<\/h1>\n<h2 style=\"text-align: justify;\">Respect for Stumbling Blocks<\/h2>\n<p style=\"text-align: justify;\">Hopefully you have enjoyed our blog posts and have learned a lot. We answered following questions in our last four posts<\/p>\n<ul style=\"text-align: justify;\">\n<li>How to build a microservices architecture?<\/li>\n<li>How to use the advantages of caching with microservices?<\/li>\n<li>How to secure microservices and handle authentication between them?<\/li>\n<li>How to set up a seamless Continuous Integration workflow for microservices combining Jenkins, Git and Docker?<\/li>\n<\/ul>\n<p><!--more--><\/p>\n<p style=\"text-align: justify;\">Our aim wasn&#8217;t to replace wikipedia or howto-articles. We wanted to provide an insight into different topics which occupied us during the semester &#8211; especially focused on our lessons learned. Therefore, we will present you the top stumbling blocks in the following. Why we do that? We want to avoid that someone else will fall over them.<\/p>\n<p style=\"text-align: justify;\"><b><i>#1<\/i><i> Smaller services, but higher costs <\/i><\/b><\/p>\n<p style=\"text-align: justify;\">Costs for infrastructure will increase when multiple services are in use. To enable a high scalability, presuppose that the necessary resources are available. We build each service in a separate docker container which requires a lot of memory. We made the experience that a suitable server requires also an outlook to the future. We\u2019ve started with Amazon AWS and must unfortunately note that our requirements are linked to high prices. Moreover, we didn\u2019t use a configuration management tool like Ansible which made the server movement very time-consuming.<\/p>\n<p style=\"text-align: justify;\"><b><i>#2<\/i><i> Setbacks preprogrammed<\/i><\/b><\/p>\n<p style=\"text-align: justify;\">A microservices architecture requires a lot of time in the conception phase and several architectural changes at least for our project. Therefore, we recommend to respect long-winded architecture meetings before starting with development. \u201cThink big!\u201d captures it well. One big setback was the database change from MySQL to MongoDB for reasons of security. We had implemented some basic functions with a MySQL ORM mapper which did not protect against SQL injection attacks. The switch to Mongoose, which is a mapper npm module for MongoDB with security protection support, had cost us lots of days of development.<\/p>\n<p style=\"text-align: justify;\"><b><i>#3<\/i><i> Microservices? &#8211; Not as easy as you think!<\/i><\/b><\/p>\n<p style=\"text-align: justify;\">\u201cLet\u2019s do microservices\u201d is said easily. We felt its impact first hand. No one of our group had previous knowledge about this topic. Therefore, it was quite difficult to split the business logic into separate independent services and simultaneously avoid a single point of failure. The main advantages are a higher scalability and an easier replaceability. Only the interfaces need to be updated to the newest versions.<\/p>\n<p style=\"text-align: justify;\"><b><i>#4<\/i><i> Simplifying everything<\/i><\/b><\/p>\n<p style=\"text-align: justify;\">A good decision was to implement a service template which didn&#8217;t only save time, but also ensured uniformity for all microservices. Uniformity to a certain degree is very important because each developer has its own style. Thus, we achieved on the one side that everyone is able to contribute to each microservice and on the other we have got a homogeneous microservices landscape.<\/p>\n<p style=\"text-align: justify;\">So, bottom line: Who would win a comparison between monolith and microservice architectures? Well, we would love to give you a clear answer, but unfortunately we will have to stick with: it depends. Or to put it more precisely, it depends on several factors like budget, knowledge, requirements, time, environment, infrastructure, scope and others. For our use case, after a longer initial warm-up phase, we experienced lots of benefits. These include small and easy to understand code bases, the ability to use different technology stacks and a great overall scalability, portability and deployability. So for us microservices proofed to be small parts with big advantages. At the end of the day, we would still go down the same road and choose this approach without hesitation. And if you think a microservice architecture could fit the needs of your next project &#8211; you should definitely give it a try!<\/p>\n<hr \/>\n<p style=\"text-align: justify;\">Kost, Christof [<a href=\"mailto:ck154@hdm-stuttgart.de\">ck154@hdm-stuttgart.de<\/a>]<br \/>\nKuhn, Korbinian [<a href=\"mailto:kk129@hdm-stuttgart.de\">kk129@hdm-stuttgart.de<\/a>]<br \/>\nSchelling, Marc [<a href=\"mailto:ms467@hdm-stuttgart.de\">ms467@hdm-stuttgart.de<\/a>]<br \/>\nMauser, Steffen [<a href=\"mailto:sm182@hdm-stuttgart.de\">sm182@hdm-stuttgart.de<\/a>]<br \/>\nVaratharajah, Calieston\u00a0[<a href=\"mailto:cv015@hdm-stuttgart.de\">cv015@hdm-stuttgart.de<\/a>]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We finish with a concluding review about the use of microservices in small projects and give an overview about our top stumbling blocks.<\/p>\n","protected":false},"author":193,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[651,2],"tags":[91],"ppma_author":[718],"class_list":["post-1915","post","type-post","status-publish","format-standard","hentry","category-system-designs","category-system-engineering","tag-microservices"],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":23961,"url":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/2023\/02\/10\/microservices-any-good\/","url_meta":{"origin":1915,"position":0},"title":"Microservices &#8211; any good?","author":"Kim Bastiaanse","date":"10. February 2023","format":false,"excerpt":"As software solutions continue to evolve and grow in size and complexity, the effort required to manage, maintain and update them increases. To address this issue, a modular and manageable approach to software development is required.\u00a0Microservices architecture provides a solution by breaking down applications into smaller, independent services that can\u2026","rel":"","context":"In &quot;Allgemein&quot;","block_context":{"text":"Allgemein","link":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/category\/allgemein\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2023\/02\/Microservice.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2023\/02\/Microservice.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2023\/02\/Microservice.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2023\/02\/Microservice.png?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2023\/02\/Microservice.png?resize=1050%2C600&ssl=1 3x, https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2023\/02\/Microservice.png?resize=1400%2C800&ssl=1 4x"},"classes":[]},{"id":1912,"url":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/2017\/02\/28\/microservices-legolizing-software-development-2\/","url_meta":{"origin":1915,"position":1},"title":"Microservices &#8211; Legolizing Software Development II","author":"Korbinian Kuhn, Steffen Mauser","date":"28. February 2017","format":false,"excerpt":"Part two will take a closer look on how caching improves the heavy and frequent communication within our setup.","rel":"","context":"In &quot;System Designs&quot;","block_context":{"text":"System Designs","link":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/category\/system-designs\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2017\/02\/Caching-01.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2017\/02\/Caching-01.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2017\/02\/Caching-01.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2017\/02\/Caching-01.png?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2017\/02\/Caching-01.png?resize=1050%2C600&ssl=1 3x"},"classes":[]},{"id":1907,"url":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/2017\/02\/28\/microservices-legolizing-software-development-1\/","url_meta":{"origin":1915,"position":2},"title":"Microservices &#8211; Legolizing Software Development I","author":"Korbinian Kuhn, Steffen Mauser","date":"28. February 2017","format":false,"excerpt":"In the first part, we present an example microservice structure, with multiple services, a foreign API interface and a reverse proxy that also allows load balancing.","rel":"","context":"In &quot;System Designs&quot;","block_context":{"text":"System Designs","link":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/category\/system-designs\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2017\/02\/Architecture-01.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2017\/02\/Architecture-01.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2017\/02\/Architecture-01.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":1924,"url":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/2017\/02\/28\/microservices-legolizing-software-development-4\/","url_meta":{"origin":1915,"position":3},"title":"Microservices \u2013 Legolizing Software Development IV","author":"Calieston Varatharajah, Christof Kost, Korbinian Kuhn, Marc Schelling, Steffen Mauser","date":"28. February 2017","format":false,"excerpt":"An automated development environment will save you. We explain how we set up Jenkins, Docker and Git to work seamlessly together.","rel":"","context":"In &quot;System Designs&quot;","block_context":{"text":"System Designs","link":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/category\/system-designs\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2017\/02\/draw_io_docker_small-1024x439.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2017\/02\/draw_io_docker_small-1024x439.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2017\/02\/draw_io_docker_small-1024x439.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":23067,"url":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/2022\/03\/15\/security-strategies-and-best-practices-for-microservices-architecture\/","url_meta":{"origin":1915,"position":4},"title":"Security Strategies and Best Practices for Microservices Architecture","author":"Larissa Schmauss","date":"15. March 2022","format":false,"excerpt":"Microservices architectures seem to be the new trend in the approach to application development. However, one should always keep in mind that microservices architectures are always closely associated with a specific environment:\u00a0Companies want to develop faster and faster, but resources are also becoming more limited, so they now want to\u2026","rel":"","context":"In &quot;Scalable Systems&quot;","block_context":{"text":"Scalable Systems","link":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/category\/scalable-systems\/"},"img":{"alt_text":"","src":"https:\/\/lh6.googleusercontent.com\/LbFspPRY1BxRBdAVjQwWXeJ6UOoxl6JWsRYrxboF5ObXlNNgy3uZikcGkc3cgzI0mr_ZlbWPxvdp0FoJC1k-odh7mRc2lCPXaMSq8TudjfoZ7e5HKstaMHmLpH319jCym6vQRo1a","width":350,"height":200,"srcset":"https:\/\/lh6.googleusercontent.com\/LbFspPRY1BxRBdAVjQwWXeJ6UOoxl6JWsRYrxboF5ObXlNNgy3uZikcGkc3cgzI0mr_ZlbWPxvdp0FoJC1k-odh7mRc2lCPXaMSq8TudjfoZ7e5HKstaMHmLpH319jCym6vQRo1a 1x, https:\/\/lh6.googleusercontent.com\/LbFspPRY1BxRBdAVjQwWXeJ6UOoxl6JWsRYrxboF5ObXlNNgy3uZikcGkc3cgzI0mr_ZlbWPxvdp0FoJC1k-odh7mRc2lCPXaMSq8TudjfoZ7e5HKstaMHmLpH319jCym6vQRo1a 1.5x"},"classes":[]},{"id":27660,"url":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/2025\/03\/20\/monolith-vs-micro-services\/","url_meta":{"origin":1915,"position":5},"title":"Monolith vs Micro Services &#8211; &#8220;Back to the future with modular monoliths&#8221;","author":"Luca-Max Baur","date":"20. March 2025","format":false,"excerpt":"In der Softwareentwicklung stehen Software- und Systemarchitekten heutzutage oft vor der Entscheidung zwischen einem monolithischen Aufbau oder Microservices. In diesem Blogpost wird erl\u00e4utert, was ein Monolith und Microservice sind und welche Vor- und Nachteilen diese mit sich bringen. Zudem wird ein Blick in die Wirtschaft gewagt, um den aktuellen Trend\u2026","rel":"","context":"In &quot;Allgemein&quot;","block_context":{"text":"Allgemein","link":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/category\/allgemein\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_sharing_enabled":true,"authors":[{"term_id":718,"user_id":193,"is_guest":0,"slug":"kk129","display_name":"Korbinian Kuhn, Steffen Mauser","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/e55f12f0048e76d004529e6da31f8f5fe030917ab31166bd5df95af51bc7e234?s=96&d=mm&r=g","0":null,"1":"","2":"","3":"","4":"","5":"","6":"","7":"","8":""}],"_links":{"self":[{"href":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/wp-json\/wp\/v2\/posts\/1915","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/wp-json\/wp\/v2\/users\/193"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/wp-json\/wp\/v2\/comments?post=1915"}],"version-history":[{"count":19,"href":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/wp-json\/wp\/v2\/posts\/1915\/revisions"}],"predecessor-version":[{"id":2250,"href":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/wp-json\/wp\/v2\/posts\/1915\/revisions\/2250"}],"wp:attachment":[{"href":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/wp-json\/wp\/v2\/media?parent=1915"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/wp-json\/wp\/v2\/categories?post=1915"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/wp-json\/wp\/v2\/tags?post=1915"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/wp-json\/wp\/v2\/ppma_author?post=1915"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}