<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Marcus Eisele on Medium]]></title>
        <description><![CDATA[Stories by Marcus Eisele on Medium]]></description>
        <link>https://medium.com/@marcus.eisele?source=rss-a84e9508c172------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*6LkI4mlJL2JCgcpIWAbBKA.jpeg</url>
            <title>Stories by Marcus Eisele on Medium</title>
            <link>https://medium.com/@marcus.eisele?source=rss-a84e9508c172------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 16 Nov 2026 20:47:02 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@marcus.eisele/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[10 Rules to live by as a Developer]]></title>
            <link>https://medium.com/@marcus.eisele/10-rules-to-live-by-as-a-developer-21a5287e7c13?source=rss-a84e9508c172------2</link>
            <guid isPermaLink="false">https://medium.com/p/21a5287e7c13</guid>
            <category><![CDATA[developer]]></category>
            <category><![CDATA[soft-skills]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Marcus Eisele]]></dc:creator>
            <pubDate>Thu, 06 Jun 2019 07:00:00 GMT</pubDate>
            <atom:updated>2019-06-14T22:26:02.737Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*hvVB-wkjDZR6vwMM.jpg" /></figure><h3>1. It is about the people!</h3><p>Software needs to solve people’s problems. What really separates good from great developers is mostly their way of communicating with others and thinking in problems.</p><h3>2. Make friends and be someone you would to have as a co-worker — Be positive!</h3><p>You are probably spending more time with your co-workers than with your loved ones. Make sure to make the best out of it, make friends at work and you will see that work is much more bearable. <strong>Also it is a lot more fun!</strong></p><p>Try to be the best version of yourself. Even if things are not working out so well. Most of the times, you being crumpy over something doesn’t make it better.</p><p>Currently things at work are not working so smooth — still I try to keep my cool and stay positive. I have already witnessed, how fast a pretty good mood at work can turn to a very bad one.</p><h3>3. First make it work then make it pretty</h3><p>Your first try doesn’t need to be perfect. More often it is more valuable to get something out in order to get some feedback.</p><p>Personally, I also do this without getting feedback from somebody else. When coding on my own, I write my code in a Test-Driven fashion and then refactor the hell out of the crappy implementation when done.</p><p><em>The result</em>: You pretty fast have an idea whether your approach will be working.</p><p>When your approach is working, you already have the tests in place which will hinder you from destroying your effective (=doing the right thing) implementation. Another personal favorite of this approach is that the most important test cases are already in place before starting to polish.</p><p>The big benefit of this approach: Finishing a task is not hindered by writing a lot of tests. Personally, I also have the feeling that the tests are better since they are not bound to the implementation that much.</p><p><strong>Word of clarification:</strong></p><p>What I mean about tests here are “big tests”, mostly integration tests covering the basics. Unit tests are for me mostly written in the “refactoring phase” since changing a lot of interfaces often means to re-write a lot of unit tests. Integration Tests are much more stable in this department.)</p><h3>4. Don’t let the need for perfection get in your way!</h3><p>I think everyone is or was guilty of doing this: Spending way more …</p><p>If you want to read more about this — the full article is available on <a href="https://programmerfriend.com/10-rules-to-live-developer/">https://programmerfriend.com/10-rules-to-live-developer/</a></p><p><em>Originally published at </em><a href="https://programmerfriend.com/10-rules-to-live-developer/"><em>https://programmerfriend.com</em></a><em> on June 6, 2019.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=21a5287e7c13" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[11 Ways to Kill Your App in the App Stores]]></title>
            <link>https://medium.com/@marcus.eisele/11-ways-to-kill-your-app-in-the-app-stores-393fd42ba47f?source=rss-a84e9508c172------2</link>
            <guid isPermaLink="false">https://medium.com/p/393fd42ba47f</guid>
            <category><![CDATA[crític]]></category>
            <category><![CDATA[apps]]></category>
            <category><![CDATA[store]]></category>
            <category><![CDATA[bad-practices]]></category>
            <dc:creator><![CDATA[Marcus Eisele]]></dc:creator>
            <pubDate>Wed, 20 Feb 2019 20:54:40 GMT</pubDate>
            <atom:updated>2019-03-05T16:08:13.685Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/750/0*6rK-1xw2lxViJ8-s.jpg" /></figure><h3>1. Make Sure to Build the Wrong Features</h3><p>Users complain a lot about features which don’t work. So what would be better than building things they won’t use at all?</p><p>Features not getting used are the ones with the lowest number of bugs reported.</p><h3>2. Don’t Listen to Your Users</h3><p>This goes hand in hand with the advice I just gave.<br>Why should we listen to our user base? Aren’t we experts who get paid for developing good software? Would you give feedback to a chef who wants to cook you a steak?</p><h3>3. Ship No Matter What</h3><p>Every user is actively waiting for your next release. Due to this, there is nothing more important than keeping your schedule. Make sure to do whatever it takes to bring your updates to the store.</p><p>The user will appreciate it.</p><h3>4. Don’t Worry About a Few Crashes</h3><p>You also can see this as some kind of extension of rule #3. If there are already a few crashes during your tests, they for sure will not affect your users.</p><p>I remember having read some studies about testers and developers using apps differently than real users anyway. Like I already said in the previous rule, prioritize the release over having a few crashes.</p><h3>5. Slowness Is Nothing to Worry About</h3><p>Maybe you have mixed feelings about crashes. Let’s talk about slowness in your application. In general, a user is used to waiting. He waits in all areas of his life.</p><p>He might be waiting for his next paycheck, he might be waiting for the next garbage collection. So no reason to worry about letting him wait a few times here and there in your app. After all, he is used to it.</p><h3>6. Make Sure That Users Train Their Brain</h3><p>You totally should make sure that your users are aware of what kind of settings they made. Also, it doesn’t hurt to remind them of their password. The best way of making sure they don’t forget it, is to make them enter it every other time you start your application.</p><p>The most effective way of doing this is to just remove the credentials or other settings sporadically.</p><h3>7. Use Notifications for Everything</h3><p>Most of the users for sure have nothing better to do than to interact with your app. Make sure that they are up-to-date about everything your app is doing. You always hear about establishing a connection between you and your user base. Is there a better way than using push notifications?</p><p>Make sure to congratulate them to their birthday using a notification. Another good idea you could have is to send them notifications when something happens on your team. Who wouldn’t be ecstatic hearing about the new coffee machine for the developers?</p><h3>8. Change a Lot in Every Update</h3><p>The user should clearly see that some things changed in between the updates. Since what is the point in updating, if nobody realizes it?<br>Also, users like to adjust their behavior and explore new alternative ways of doing things within your app.</p><h3>9. Make Sure That Every Update Needs a Re-Install</h3><p>Together with the previous update, we could name it “make sure the User notices that he installed an update”. Most apps use some kind of popup of telling a user what changed — Don’t do that!</p><p>Everybody is doing this. Posting this information to the change notes in the app stores is much better and more effective. Nobody needs an explicit message telling them what changed. It should be visible from your app alone.<br>An interested user then can go the store and look there for the changes notes they didn’t see since they enabled automated updates.</p><h3>10. A Little Bug Party Never Killed Nobody</h3><p>I hope you already internalized rule #3 in which we learned that shipping features and updates have the highest priority. A few bugs here and there are not the end of the world. The same what applies for waiting is also applying to bugs. Users are used to applications not working like expected.</p><p>“Working as implemented” is a comfortable way of expressing the autonomy of your developers.</p><h3>11. Everybody Likes Running into Old Friends</h3><p>Make sure that a few of the bugs occur again after they have been fixed. After all, your developers spent probably a lot of time fixing them the first time. This experience is also reminding a user from time to time what improved in the past.</p><p>Overall a users which gets reminded that there was this bug in the past and it was fixed will be much happier.</p><h3>Recap</h3><p>I really hope these guidelines help you in reaching your goal of killing your App in the App Stores. If you follow my advice here I am pretty sure you will eventually succeed.</p><p>Ok, I hope by now you already figured out that this article is quite cynical and ironic. Nobody should be doing the points mentioned above. At least if he not really wants to get his app slaughtered by reviews in the App Stores. Hope you liked this short list of things you definitely shouldn’t do.</p><p>I would love to hear of your past faux pas or other advices we could collect for people trying to wreck their App Ratings.</p><p>When you liked the article and want to read more of my stories feel free to come over to my personal blog at <a href="https://programmerfriend.com./">https://programmerfriend.com.</a></p><p>If you want to keep updated, feel free to subscribe to the Programmer Friend Mailing List by clicking below:</p><p><a href="http://eepurl.com/gjvAAD">Programmerfriend</a></p><p><em>Originally published at </em><a href="https://programmerfriend.com/index.php/2019/02/20/11-ways-to-kill-your-app-in-the-app-stores/"><em>programmerfriend.com</em></a><em> on February 20, 2019.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=393fd42ba47f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Visiting Geode Summit at S1P!]]></title>
            <link>https://medium.com/@marcus.eisele/visiting-geode-summit-at-s1p-5a550221037a?source=rss-a84e9508c172------2</link>
            <guid isPermaLink="false">https://medium.com/p/5a550221037a</guid>
            <category><![CDATA[gemfire]]></category>
            <category><![CDATA[spring-boot]]></category>
            <category><![CDATA[spring]]></category>
            <category><![CDATA[apache-geode]]></category>
            <category><![CDATA[conference]]></category>
            <dc:creator><![CDATA[Marcus Eisele]]></dc:creator>
            <pubDate>Tue, 25 Sep 2018 10:31:47 GMT</pubDate>
            <atom:updated>2018-09-25T10:31:47.586Z</atom:updated>
            <content:encoded><![CDATA[<h3>Is this the beginning or are we already on top? Visiting Geode Summit at S1P!</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bajR_OhgGzPwkSeeMrw3hw.png" /></figure><p>So here it goes, the first day of the conference is going to start.<br>I wake up, I am wide awake and I look at the clock — 04:30 AM.</p><p>Ah, not again, but I did kind of expect it, since I had the same kind of jetlag last time I traveled to Florida which is having the same timezone. Even tough I didn’t sleep during the flights, was exposed to all the beautiful sunlight — but well, it could have been worse.</p><p>Rise and shine! First I took a shower, which was colder than expected, since I guess there was not so much warm water flowing during the last hours. The first thing I did afterwards was a bit of video calling with my beloved ones at home which worked really good and was a nice thing to have while being so far away. Little applause for the 21th century.</p><p>Since it still was like 5:30 in the morning I finished up the blog post from yesterday and scheduled my agenda for the upcoming Geode Summit.</p><p>During the next hours me and my colleague with whom I am traveling met for breakfast and had to resolve some misunderstandings between our travel agency and the front desk. I hope we have resolved them now so that we don’t have to pay for the whole stay with our personal credit cards 😜</p><p>So after a while we arrived at the Gaylord National Resort &amp; Convention Center. First impression I was having, since we were approaching it from it seemed the small side, was that it doesn’t look that huge — HELL was I wrong.</p><p>Still I am a bit confused how everything is fitting in there, think I have to have another look from outside knowing the insides now.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RI_uDZ-NmTv7Kxh_KGBJ5A.jpeg" /></figure><p>Inside the building there is a big area with I would say smaller houses and even a bit of green area were birds are chirping and flying around. Really a nice place for having a gathering of any sort.</p><p>We out of a sudden realized, since we didn’t sign up in time for the workshops and had not booked any training, that we have a bit of spare time, which I personally used for having a look at the agenda for Tuesday. I don’t want to spoiler anything or so, but I guess there are too many interesting talks at the same time and I really need to make some decisions what to watch in person. Gladly the talks are all recorded and I can watch them later when I am back home.</p><p>So 14:00 is coming closer and we are going to the conference room. There we meet a room packed with people and being really crowdy. It looked like there came more than expected. There were so many that the organizers quickly decided that they will move in more chairs after or before the first talk. Appreciation for a good decision there, afterwards everybody had a seat even tough it seemed that after a few talks a lot of people already got out of the room, which kind of reminded me of my time at the university.</p><p>Small dump of memory I have about the talks on that day:</p><ol><li><strong>“Geode: Much More Than a Cache” — Randy May<br></strong>Randy talked about a lot of different use-cases for Geode.<br>From top of my head they were:</li></ol><ul><li>Ready heavy scenario: Geode as a “side-cache”, writes going to the primary resource</li><li>Microservice Enabled: “Bleeding out” (own term) monoliths by introducing new services which run in parallel</li><li>Transaction Processing: Example Rail ticketing system</li><li>Fraud Protection: Feed Data for a rating engine with multiple input</li><li>Data Aware Compute Grid</li><li>For me the most interesting case: Streaming Data for a fleet of vehicles</li></ul><p>Randy really made me think that I should probably talk to our consultant again and rethink or region setup (Partitioning and Replication in special).</p><p><strong>2. “Cloud-Native Data Architecture: Break Away From Data Monoliths for Cloud-Native Applications” — Jeff Cherng, Anupama Pradhan</strong><br>For me this talk was a small but good recap and extension of the first talk.<br>What I kept in mind was again the “Side Cache” scenario, an inline cache (for write behind semantics), and Geode as a possibility to really leverage CQRS.</p><p>The last CQRS point just made me think how to get rid of the writes on the read side since it looked like there must be an event created after writing which needs to be consumed. The consumption should also trigger an update somewhere in the read model. If I got it right the update of the read model then can be implemented inside Geode itself. Really need to get this fixed in my head during the next days. Maybe I will reach out to the authors after rewatching it again.</p><p><strong>3. “Geode Performance Architecture for the Agile Enterprise using Cloud-Native API’s” — Joshua Haggerty, Amit Madan<br></strong>This talk really struck a nerve.<br>I remember Joshua talking about 250k transactions a second for Citi on their Geode cluster.<br>At work we work with a Gemfire Cluster which is currently not runnning perfectly and we see a lot of performance issues, and this is on I would think maybe 6k transactions a second. WOW (yeah that is a wow in uppercase).</p><p>For me the most valuable thing there was, this is probably a bit why I can currently not recall everything, is the things he and Amit told about testing and monitoring there Geode setup.<br>I really loved how they have figured it out with different levels of testing.<br>Great/Easy talk for beginners, with some really valuable points for advanced users I would say.<br>I liked it!</p><p><strong>4. Questions, Answers, and Oddly Specific Opinions with Apache Geode Committers: Anthony Baker, Swapnil Bawaskar, Jianxia Chen, Karen Miller, Dan Smith<br></strong>I was following along, but I had the feeling next time I should sit more in the center of the room for things like that. Sometimes it was a bit hard to hear the questions from the audience, especially if something loud was happening just outside of the conference room with its open doors.<br>Maybe next time you can get one of these “throwaround microphones”, could also really help for the later recordings.</p><p>Besides that I really liked indirectly hearing about other people working with Geode and that I had the feeling the contributors of the project really KNOW what the users of Geode are doing and want from it.</p><p><strong>5. Geode on Virtualized Infrastructure: How to Succeed with Geode on vSphere &amp; Public Clouds — Charlie Black<br></strong>I missed a good portion of this talk since I was on the phone for a while. Still my colleague which was attending it gave me a small recap and I should definitly watch it as a whole when I am back home. It seems that we can learn something there which will could help our Gemfire Installation since it is also running on virtualized hardware.</p><p>Not sure if I can say this right now, but maybe this talk can be published in a modified way as a “Best Practices” document for operators running the infrastructure of Geode/Gemfire installations.</p><p><strong>6. How the Enterprise Data Grid (GemFire) is Groundbreaking for Johnson &amp; Johnson — Steve Sorensen</strong></p><p>Even though Steve gave me a bad feeling for not knowing Johnson &amp; Johnson as a guy coming from Europe, I liked his talk how Gemfire speeded up there whole process of developing software and delivering value to the customers. Feeling a bad to admit it, I guess I have to at least skim again the slides once they are available. I think I felt a bit tired since I was up since around 4AM and my body still is somehow used to go to bed around this time.</p><p>After that talk, we paid a quick visit to the Community Hub were we grabbed a bit of snacks, a lot of goodies and swag, and got our badges scanned a lot. Let’s hope this was not a mistake.</p><p>Still we were both a bit tired because of the jet lag and went back to the hotel at around 8:30PM.<br>I plugged in my chargers, and even fell asleep without starting my phone again (was deep depleted) and setting an alarm.</p><p><strong>Call to action:</strong></p><p>If you are also participant of the S1P conference, leave me comment.<br>What is the talk you are looking the most forward too? What do you expect from your visit at the conference?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5a550221037a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Spring One Platform (S1P) Experience — D.C. Edition]]></title>
            <link>https://medium.com/@marcus.eisele/the-spring-one-platform-s1p-experience-d-c-edition-be62ca83a029?source=rss-a84e9508c172------2</link>
            <guid isPermaLink="false">https://medium.com/p/be62ca83a029</guid>
            <category><![CDATA[java]]></category>
            <category><![CDATA[conference]]></category>
            <category><![CDATA[spring-boot]]></category>
            <category><![CDATA[spring]]></category>
            <category><![CDATA[developer]]></category>
            <dc:creator><![CDATA[Marcus Eisele]]></dc:creator>
            <pubDate>Mon, 24 Sep 2018 10:45:18 GMT</pubDate>
            <atom:updated>2018-09-24T10:45:18.645Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F8O9LOQgTsi38zXwAdDJOg.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/photos/yJ9G1I_8CxY?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Jomar</a> on <a href="https://unsplash.com/search/photos/washington-dc?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a>. I added the image while being in our Hotel in Old Town Alexandria, I like it because it matches so perfectly.</figcaption></figure><p>Washington D.C., home of the US government.<br>Even living outside of the US, everybody is aware of the existence of this city.<br>Due to it being the capitol of the US, getting screen time in US-based blockbusters and popular series like House of cards, Alpha House, Independence Day, Enemy of the State (Will Smith seems to like acting there), Captain America and many more which just came to my mind.</p><h3>But what I am really doing here?</h3><p>The reason for my visit here is to participate the, I would say biggest conference about the Spring Framework of the world, the SpringOne Platform.</p><blockquote>So it seems that Washington is all about Spring even in September.</blockquote><p>What should you actually expect from this post, besides me cracking stupid jokes about Spring and other seasons?<br>This is my first major tech conference, and I hope by reading about my well- and not-so-well-doings all of you and even myself can get something out of it.<br>The other reason I write this is that I want to make this some kind of personally diary to make sure I remember the things I experienced here being in the moment and not solely from my memories.</p><h3>First things first:</h3><p>Traveling by Business Class is really an experience. If some of you ever thought you can not get used to travelling, see if you can get used to it that way. I am currently hacking this away on about 36,000 feet (~11km) above the Atlantic Ocean, basically laying in my chair. Being not the biggest guy I know, I have to even move the chair a bit to the front to sit comfortably here.<br>Yes — I am still on a plane.</p><h3>Second things second:</h3><p>Being far away from home is a bit strange, especially while having a very lovely wife and wonderful son at home.<br>I can see myself really missing them hard during the next week, since this is the first time I am now away from them more than probably two or three days.<br>To be more specific this time there are a bit more than 4000 miles (or about 6500km) between us with a 6 hour time difference.<br>Saying goodbye at the gate in Stuttgart really was hard, but we made plans to setup some video chats in my mornings, so I probably can be with them while they are having their lunch.<br>I really hope this whole thing works out and is not somehow sabotaged by awful wifi connection or other possible issues.</p><h3>Coming back to the reason I am writing this</h3><p>When I joined my current employer <a href="https://www.daimler-tss.com/">Daimler TSS</a> (big shoutout for having me here.), my previous experience in Java was writing some basic J2EE stuff and creating some Java projects at the university.<br>Looking back to my apprenticeship , where I was contributing to a SaaS/On-Premise Web Solution using a proprietary framework, a lot of things changed.<br>Back in time I was using an in-house built proprietary framework which somehow was deployed as a WAR-file onto an Application Server.<br>Later during my studies, I got to know Java as a universal language which in my eyes was requiring just a bit more boilerplate than other languages I was using over the years.<br>Still I really liked it for its statical typing and compile-time checks and all the other things the JVM comes with.<br>What did it do for future employability? Well working with what current Java Developers would maybe call a bit old-fashioned, I can now rant with my a few years older colleague about the ins and outs of J2EE topics e.g. WebSphere or the effort to setup these environments.</p><p>Just kidding, still it is somehow true. Sadly the experience with the proprietary framework was of barely any use somewhere else. When I started at my current employer to work with Spring Boot, it really strengthened my bounds with Java again. Nowadays I am not sure if I would keep or go back to the Java universe with something different than Spring Boot.<br>Being based on Spring and having all these (mostly cool, yeah it is opinionated) defaults, it is really fast to prototype and create something which could even later be used on a production level.<br>If you don’t like the defaults, it is really easy to opt-out and do it using your preferred way.<br>Other cool projects (e.g Spring Cloud, Netflix OSS) are also really adding value upon integrating different middleware or just creating a ground for building your work onto “shoulders of giants”.</p><p>Now that I talked about my previous experience and exposure to Spring, I would like to tell you what I hope to be able to achieve at the SpringOne Platform conference.<br>I would love to get to know a few people. Normally I am a very social person and would really like to expand my professional network a bit here and there.<br>Sadly I forgot to bring some business cards. Lets see how much of a hinderance this is in late 2018.</p><p>The other thing I want to achieve is to refresh my brain with the “new stuff that is out there”. While starting to work corporate my brain really consumed all kind of new things really fast. Learned a lot about architecture especially about building microservices. Implemented some of them by using asynchronous messaging, using good abstractions like declarative REST-clients or JPA repositories. I also learned a lot about different ways to test an application, still even after two years writing tests somehow still feels like a burden. Even tough writing tests is not my favorite task, I really learned the big benefits writing tests in general has. Nowadays I am even a big fan of test-driven-development since your implementation is then mostly finished once it is done. Maybe I should give topic some time on its own in the future.</p><p>What I show here that I have a feeling that there are different stages you have with a technology.</p><ol><li>Making a Hello-Worldish program</li><li>Building your first things</li><li>Earning more and more confidence and feeling I would even say invincible (optional)</li><li>Have a few moments where things are not working perfectly and becoming more humble because of this. You are realizing there is so much more what you have not yet seen.</li><li>Same as four with less and less moments where stuff is not working as it should.</li></ol><p>Personally I feel somewhere between 4 and 5. Most of the times I have my ways of doing stuff with tools I know inside and out. <br>There is a saying “If you have a nail — everything looks like a hammer”, I would even go the other way around.<br>Sometimes people tend to not use the correct tool for the job, but for them</p><blockquote>Everything looks like a nail, because they have a really good hammer which has proven its use already for hitting a nail into a wall.</blockquote><p>I want to escape that cage, by learning a bit about new ways and tools to do these new things. Lets see how this all works out. Hope I work my way through and find time to write my next days also over here.</p><h3>Lessons learned so far:</h3><ul><li>Don’t forget to bring business cards</li><li>Usually you are at least away for a few days, and good-byes can be hard</li><li>Always be curious!</li><li>Hopefully this is one of many follow-up posts</li></ul><p>If you are also a participant of the S1P, feel free to come over in case you see me. Would be really a pleasure to get to know you, and a few people with similar interests over here.</p><p>Also I would be really interested on “what was your first conference and how do you remember it?”. Feel free to answer in the comments.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=be62ca83a029" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Whatever it takes]]></title>
            <link>https://medium.com/@marcus.eisele/whatever-it-takes-ca7b135d671a?source=rss-a84e9508c172------2</link>
            <guid isPermaLink="false">https://medium.com/p/ca7b135d671a</guid>
            <category><![CDATA[mindfulness]]></category>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[motivation]]></category>
            <category><![CDATA[destiny]]></category>
            <category><![CDATA[mindset]]></category>
            <dc:creator><![CDATA[Marcus Eisele]]></dc:creator>
            <pubDate>Sat, 21 Jul 2018 02:05:08 GMT</pubDate>
            <atom:updated>2018-07-25T21:49:32.998Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OQY5W9_xx3z3APhnOECj_A.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/photos/XzUMBNmQro0?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Jon Tyson</a> on <a href="https://unsplash.com/search/photos/aim?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>It is 3am and I just finished an about 4 hours long gaming session switching between Rocket League and Fifa 18. Some would say I am lazy, maybe I am. Now, I am not sure if it is the lack of sleep which is making me write this or my daily life.</p><blockquote>Are we doing whatever it takes?</blockquote><p>The question is probably answered very easily. I just guess <strong>NO.<br></strong>But coming back to the reason for the answer in just a few seconds, the more important thing here would be even just reasoning about the question itself.</p><p>Are we doing whatever it takes? But what is the desired outcome?<br>Be a lazy bum playing video games whole night? Being a good friend/father/software engineer/whatever you name it? Guess I can tick at least one of by now.</p><p>Lately, I was projecting this question a lot onto my workplace. There we are facing I would say a lot of stress in combination with FUD (fear uncertainty and doubt) which is mostly because it is very unclear what will happen to the project after and during the next 3/6/9/12 months.</p><p>I really don’t know what to think about this whole thing, as I understood our current mission is “to do whatever it takes” to improve the product. But like we have seen after the initial question in this story, everybody is having a different understanding of what should be achieved or even what would be the best. Some may even be thinking just dumping it and starting again from scratch could be more worthwhile.</p><h4>Coming back to the initial question: Find your goal!</h4><p>A recently read a lot of these motivation memes of any sort about reaching your goal, here are a few examples:</p><blockquote>You can not aim without a target</blockquote><blockquote>You can’t hit a target by directly aiming at it</blockquote><blockquote>If you have no target you can never miss</blockquote><p>The last one is really interesting and I think the people without any target could be the happiest or the saddest persons of all. Personally, I can not believe that you could live so focused in the NOW that you don’t have any long-term goals, but this could be something personal. After you found your goal…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Nhznhi6r5SdK8tDKctajBQ.jpeg" /></figure><h3>Define the path</h3><p>How do you want to reach your goal? Be aware of the previous quote about not being able to hit a target by directly aiming at it. Still, I think directly looking at your target and how to go there does not hurt. Detours will be creeping in by themselves. After you have focused on your goal, you have to factor in all the things which drive you towards and away from your goal and keep adjusting direction all the time. An archer or gunman is also continuously factoring in changes in wind and distance to his target.</p><h3>Track your progress</h3><p>Now that you have defined the path you want to travel, it should be really easy to be sure that you are keeping on track. You can check your progress once a week, once a month or even once a year. Sometimes a faster feedback loop may be helpful, but I guess that as long as you are checking you are doing fine. In order to successfully track your progress, you need measurable metrics which should be easy to gather and compare.</p><p>If you are planning a personal weight loss program it could be worth to start with tracking your weight. After a while you may be having issues in losing any more weight or having the feeling that you should be losing weight but aren’t. This is when the tracking is not sufficient anymore. From time to time there may be new things you want to add to your progress tracking.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IATVDPFDsQ4Fn2kHW8kKfg.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/photos/Y3X4jYrXNsQ?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Sabine van Straaten</a> on <a href="https://unsplash.com/search/photos/struggle?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><h3><strong>Start and Keep doing it!</strong></h3><p>When you have all this set up:</p><blockquote>START AND JUST STICK TO IT!</blockquote><p>This is the most valuable advice I can give you. Often people are overthinking stuff and therefore never finishing anything. Sometimes it is just easier to define something and do it for a while. If you are still doing it after an initial period of about one month I would say it is appropriate to start modifying<br>your defined path a bit. After modifying it, make sure it is still leading to your goal. Keep sure to keep going! I know this is often easier said than done, but I am pretty sure if you think back there was at least one thing which you planned really hard but the execution after that did just not happen or there you perceive that your plan will not work out at all.</p><h3>So … are we doing whatever it takes?</h3><p>I can only speak for myself and can say “it depends”. While writing this story I felt that I don’t have this one single defined goal which I want to achieve really badly. I guess at the moment I am aiming at different targets. I think this is an issue because of that it will always be hard to prioritize things when everything seems important but for different goals. When you have one single defined goal it should be much easier to prioritize different things you want or should do.</p><p>Maybe I will re-read the story tomorrow and work on my personal plan and define how I want to reach it.</p><h3><strong>Are you doing whatever it takes?</strong></h3><p>Would love to hear from all of you in the comments.<br>Thanks for reading and make sure to leave a clap here if you liked the story.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ca7b135d671a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Spring Boot Microservices: Gateway Service based on Netflix Zuul]]></title>
            <link>https://medium.com/@marcus.eisele/spring-boot-microservices-part-six-the-gateway-service-netflix-zuul-55f8d97b731d?source=rss-a84e9508c172------2</link>
            <guid isPermaLink="false">https://medium.com/p/55f8d97b731d</guid>
            <category><![CDATA[java]]></category>
            <category><![CDATA[spring-boot]]></category>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[learning-microservices]]></category>
            <category><![CDATA[zuul]]></category>
            <dc:creator><![CDATA[Marcus Eisele]]></dc:creator>
            <pubDate>Thu, 17 May 2018 22:57:50 GMT</pubDate>
            <atom:updated>2019-03-05T15:57:34.950Z</atom:updated>
            <content:encoded><![CDATA[<h3>Spring Boot Microservices — Part Six: The Gateway Service (Netflix Zuul)</h3><p>This session is about one of the more advanced pieces of our microservice architecture. I am talking about our Gateway Service. Our gateway service will be powered by the mighty <strong>ZUUL</strong> (see the picture for reference — if you not aware of it til now: It’s a Ghostbusters reference).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*P8PExS5AyjST0A5csbJYdA.jpeg" /><figcaption>Zuul the Gatekeeper of Gozer</figcaption></figure><p>Zuul will be the gatekeeper of our architecture. We plan to use him to accept and pass requests to the microservices behind him. Of course, such a gateway can not only forward but also modify or reject requests. The gateway we are implementing will protect the services in the back by requesting basic auth credentials before allowing access to the downstream services.</p><h3>Summoning Zuul</h3><p>The start of our ceremony, we will be again on <a href="http://start.spring.io/">http://start.spring.io</a>. “<em>Start DOT spring DOT io”</em> - But be careful: Saying it repeatedly may as well summon <a href="https://twitter.com/starbuxman">Josh Long</a>. Author of a book I can’t recommend enough and his talks about the Spring Boot ecosystem are just superb! Yeah, but I think we shouldn’t get carried away too much, here the steps to initialize the gateway service :</p><ul><li>For my projects I have chosen: Spring Boot 1.5.13</li><li>Group: <em>com.marcuseisele.springboot_microservices</em><br>Artifact: <em>gatewayservice</em></li><li>Select <em>Zuul</em>, <em>Actuator</em>, <em>Eureka Discovery </em>and <em>Security</em> as dependencies.</li><li>Hit generate and move the content of the downloaded zip to the place where the services from the previous sessions are placed</li><li>Create a DockerFile for the new service and add it to docker compose (like in the previous sessions, see <a href="https://github.com/eiselems/spring-boot-microservices/blob/master/gatewayservice/Dockerfile">DockerFile</a> / <a href="https://github.com/eiselems/spring-boot-microservices/blob/master/docker-compose.yml">docker-compose</a>)</li><li><a href="https://github.com/eiselems/spring-boot-microservices/commit/521921d39746a0a6acd1581d67cb111f149d0d77#diff-600376dffeb79835ede4a0b285078036">Add the service to the pom file in the root directory</a> (click to see the diff on github in case you have trouble)</li></ul><p>After all this the gateway-service is a proper part of the project and will get build by running mvn package from the root of our project and it will also get started when we boot up all our services with docker using docker-compose up .</p><h3>Taming Zuul</h3><p>The service as we generated it is not doing much, we need to configure it properly first. The following steps will be necessary:</p><ul><li>Enable the ZuulProxy for our gateway application</li><li>Create a general config for our gateway service</li><li>Setup a route for our counter-service</li><li>Enable handling Basic Authentication (remember? We wanted to have that)</li></ul><p>After we have done all that: The gateway will be able to access our service-registry and based on these informations it will expose the service at the route we created.</p><p><strong>Making Zuul our servant:<br></strong>The first step is quickly done: Just add @EnableZuulProxy on top of the GatewayApplication-class. After that, go into the application.properties in order to setup the general configuration of Zuul. I personally started with the following:</p><pre>server.port=9999<br>zuul.prefix=/api<br>eureka.client.serviceUrl.defaultZone=http://registryservice:8761/eureka<br>spring.application.name=zuul</pre><p>If you were following the tutorial until now you may be confused by the eureka.client.serviceUrl.defaultZone here. It is something I did for refactoring the whole docker setup. It tells that the registry will be found at this network address which is by default exposed by docker-compose. So this configuration will just run in docker. <strong>If you want to use everything locally just remove that line here. </strong>In the future I may provide different profiles for running inside a docker container or running locally.</p><p>If we now would start the service there wouldn’t be much happening wouldn’t it? It would! Zuul is by default creating routes for all services a registry knows.<br>By default it is exposing them at a route matching the service name. So our counterService would be exposed at /api/counterservice (/api because we defined the Zuul-Prefix) which is not too bad, even tough I would love to have a more snappy name for that route. You could try it by accessing <a href="http://localhost:9999/api/counterservice/get">http://localhost:9999/api/counterservice/get</a> to try it out. The main problem here is not the sub-optimal route name, but this configuration is also exposing all our other services, e.g. the configuration service and our registry. This is nothing we should be doing! It is leaking sensible information.</p><p><strong>Let’s fix that!<br></strong>This is done by adding following lines to our config:</p><pre>zuul.ignored-services=<strong>*<br></strong>zuul.routes.test.path=<strong>/cs/**<br></strong>zuul.routes.test.serviceId=<strong>counterservice</strong></pre><p>The “test” part here is a part you can name like you want. I just named it test to make that obvious, it makes sense to have a proper name there for easier understanding what we are dealing with, but technically it is not necessary.</p><p>After this change we now only have one working route which is accessible via <br><a href="http://localhost:9999/api/counterservice/get">http://localhost:9999/api/cs/</a>. You can access the functionallity of our counter-services at <a href="http://localhost:9999/api/counterservice/get">http://localhost:9999/api/cs/get</a>.</p><p>So far so good, what is left now? Ah right, we wanted to add some Protection for our services. We will be using the SpringBoot-Starter spring-boot-starter-security , gladly we already added it to our dependencies when using the generator.</p><p>This now is more now an practical exercise of the following Spring Guide: <a href="https://spring.io/guides/gs/securing-web/">https://spring.io/guides/gs/securing-web/</a>. If you want to learn more about Spring Security make sure to head there. Spring Guides are a really valuable source for quickly learning how things work within Spring.</p><p>Let’s cut to the chase:<br>Create a class inside your main-package (or any subpackage). I called mineSecurityConfig.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/82d56b74c155f0d99a756d2f6a29b29e/href">https://medium.com/media/82d56b74c155f0d99a756d2f6a29b29e/href</a></iframe><p>Yes the credentials are hard-coded, make sure to don’t form a habit based on this code here 😅</p><p>What happens now when we run our services and access our counter-service using our gateway at ahttp://localhost:9999/api/cs/get . Yay! We get a password prompt from our browser which expects us to enter the credentials given in the SecurityConfig (user: mo password: password).</p><h3>Quick Recap:</h3><p>Not only about this article here but also about the whole series. What did we build until now? We have a counter-service which is representing our services doing the business logic, a configuration-service which provides configuration to that service. On top of that we have a registry which is keeping track of all services we have up and running. Now we created a service gateway which exposes and protects our services.</p><p>How cool is that? I mean we started from scratch and now have, I would say, a really good basis for a scaling architecture of microservices.</p><h3>Outlook:</h3><p>When you have a look at <a href="https://github.com/eiselems/spring-boot-microservices">my github repository</a> for this project (you should!), you may see that I adjusted a lot for making the services work inside their docker containers. The major adjustment was to change the used URLs to the ones provided by docker compose. The hostnames provided by docker compose are matching the container names. I will probably write something about these changes in the near future. In case this causes any confusion and you are not able to figure it out just let me know.</p><p>Having now a look at the previous sessions and our initial goal, I think we are almost there. The only last service missing is our Admin Service which is some kind of dashboard to monitor our services and give us insight into how they are performing.</p><p>I really hope you enjoyed this whole journey until now. If you do spread the word and give me a few claps, if don’t let me know! You can easily contact me here using direct message, via <a href="https://twitter.com/eiselems">twitter</a>.</p><p>If your journey with my tutorials started just here, make sure to also check out the other parts of this series which start at:<br><a href="https://medium.com/@marcus.eisele/implementing-a-microservice-architecture-with-spring-boot-intro-cdb6ad16806c">Implementing a Microservice Architecture with Spring Boot: Intro</a></p><p>Would love to hear your feedback!</p><p>If you want to be kept up to date about my latest posts (also on my personal blog <a href="https://programmerfriend.com)/">https://programmerfriend.com)</a> make sure to subscribe to mailing.</p><p><a href="http://eepurl.com/gjvAAD">Programmerfriend</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=55f8d97b731d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Microservices with Mo — Part Five: The Registry Service (Netflix Eureka)]]></title>
            <link>https://medium.com/@marcus.eisele/microservices-with-mo-part-five-the-registry-service-netflix-eureka-96f0de083252?source=rss-a84e9508c172------2</link>
            <guid isPermaLink="false">https://medium.com/p/96f0de083252</guid>
            <category><![CDATA[spring-boot]]></category>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[netflixoss]]></category>
            <category><![CDATA[spring]]></category>
            <category><![CDATA[java]]></category>
            <dc:creator><![CDATA[Marcus Eisele]]></dc:creator>
            <pubDate>Sat, 10 Mar 2018 18:06:32 GMT</pubDate>
            <atom:updated>2018-05-23T18:26:23.136Z</atom:updated>
            <content:encoded><![CDATA[<p>This post is part of the series ‘Microservices with Mo’: <br><a href="https://medium.com/@marcus.eisele/implementing-a-microservice-architecture-with-spring-boot-intro-cdb6ad16806c">Part 0: Intro</a> <br><a href="https://medium.com/@marcus.eisele/implementing-a-microservice-architecture-with-spring-boot-part-one-the-environment-cbc032473ab8">Part 1: Setting up Docker<br></a><a href="https://medium.com/@marcus.eisele/microservices-with-mo-part-two-the-architecture-3845b5228ddb">Part 2: The Architecture</a><br><a href="https://medium.com/@marcus.eisele/microservices-with-mo-part-three-the-counter-microservice-5fa34af2dcdc">Part 3: The Counter Microservice</a><br><a href="https://medium.com/p/7d9a5b1b4f72/">Part 4: The Config Microservice</a><br><a href="https://medium.com/@marcus.eisele/microservices-with-mo-part-five-the-registry-service-netflix-eureka-96f0de083252">Part 5: The Registry Microservice</a><br><a href="https://medium.com/@marcus.eisele/spring-boot-microservices-part-six-the-gateway-service-netflix-zuul-55f8d97b731d">Part 6: The Gateway Microservice</a></p><p>In this part, we will introduce another important basic feature of an architecture: <strong>The registry-service.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C_QcFA7ajZGPhZaujbW5ug.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/photos/t11oyf1K8kA?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Himesh Kumar Behera</a> on <a href="https://unsplash.com/search/photos/compass?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a> — Discovering services is easier with a registry 🙂</figcaption></figure><h4>What is all this fuss about?</h4><p>A service registry allows our services to find/discover each other. Without some sort of registry, we would need to wire our services by hand. A central registry for our services enables advanced features like client-side load balancing where a client can distribute its requests across multiple instances of the same service. Another use-case leveraging service discovery is an API Gateway which uses the registry to forward the requests and therefore is a single entry-point to accessing our services. An API Gateway can keep unauthorized users out or create pre- and postprocessors for passing requests.</p><h4>Let’s get it started</h4><p>Our journey again takes us again to <a href="http://start.spring.io/">http://start.spring.io</a>.<br>In order to create the service discovery itself, we need to add ‘Eureka Server’ as a dependency. Eureka is part of the Netflix Open Source Project. It is a component which they used to enable their services to discover each other on AWS.</p><p>After downloading and extracting the just generated project we are almost finished with implementing the server. The only things remaining here are:</p><ul><li>Adding @EnableEurekaServer on top of your Application-class</li><li>Adding a few lines to the application.properties of our newly created registry service</li></ul><pre>server.port=8761<br>eureka.client.register-with-eureka=false<br>eureka.client.fetch-registry=false</pre><p>Very simple, yet very effective. The only configuration we have done here is that we specified 8761 as the port being used and also that the registry itself should neither fetch the registry nor register itself with Eureka.</p><p>Being in the working directory of the registry-service we can run the service via</p><pre>./mvnw clean spring-boot:run</pre><p>After it booted we should be able to see the Eureka Dashboard at <a href="http://localhost:8761/">http://localhost:8761/</a>. Eureka! There is the Dashboard of our Service Registry, but until now we can see that no service is registered there (see <em>Instances currently registered with Eureka</em>). Don’t fear, we will change this very soon.</p><h4><strong>What about the other services?</strong></h4><p>Yeah, you are totally right. Even if it sometimes feels like there is happening a lot of magic in the background, not everything is done for you. The other services still have to register themselves at the service registry and also have to fetch the information about other services from there.</p><p>You remember our counter-service which is fetching its configuration from the config-service? It was fetching its configuration from the configuration service by hitting its defined default port. This is not very robust and not a good practice at all. We will now refactor these two services to leverage the service registry we just created to fetch the configuration regardless of the port being used.</p><h4>Updating the Config-Service</h4><p>The changes in the Config-Service are very small:</p><ul><li>Add a dependency to your pom (up to date versions always can be found at <a href="http://projects.spring.io/spring-cloud/">http://projects.spring.io/spring-cloud/</a>)</li></ul><pre>&lt;dependency&gt;<br>    &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;<br>    &lt;artifactId&gt;spring-cloud-starter-eureka&lt;/artifactId&gt;&lt;/dependency&gt;</pre><pre>&lt;!-- Don’t forget to add the spring cloud project to your dependency management area of your pom. --&gt;</pre><pre>...<br>&lt;dependency&gt;<br>    &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;<br>    &lt;artifactId&gt;spring-cloud-dependencies&lt;/artifactId&gt;<br>    &lt;version&gt;Camden.SR5&lt;/version&gt;<br>    &lt;type&gt;pom&lt;/type&gt;<br>    &lt;scope&gt;import&lt;/scope&gt;<br>&lt;/dependency&gt;</pre><ul><li>Add @EnableDiscoveryClient to your Application class</li><li>Make sure that the following is inside your application.properties</li></ul><pre>spring.application.name=config<br>spring.cloud.config.discovery.enabled=true</pre><p>When you now start your config service and the service registry, you should be able to see the config service registering itself at the registry. You can check this again on our Dashboard at <a href="http://localhost:8761/">http://localhost:8761/</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YM34S3A6duUOe4c6ykN2XQ.png" /></figure><h4>Updating the counter-service</h4><p>The change to the counter-service is quite similar. I think you would easily be able to do it yourselves without any advice from my side:</p><ul><li>Add the same dependency we already used in our config-service</li><li>Add @EnableDiscoveryClient to the application class</li><li>Update the bootstrap.properties with the following content:</li></ul><pre>spring.cloud.config.name=counterservice<br>spring.cloud.config.discovery.serviceid=config<br>spring.cloud.config.discovery.enabled=true</pre><p>Make sure that the spring.cloud.config.discovery.serviceid is identical to the application name of our config-server. Otherwise the service will not be able to figure out which of our services will be providing the configuration.</p><h3>What did we achieve?</h3><p>I would say: “A LOT”. We created a central service-registry. All our services are using the registry to promote their endpoints. Our counter-service is now using the service-registry to resolve its dependency to the config-service.</p><p>You may not fully understand it, but this is the real basis for our microservice architecture. No matter where you would host these services, as long as all of them would be able to reach the service-registry, they would be able to discover each other without hardcoding any URL inside any service (Sidenote: Maybe you would need to configure the services to have the correct URL for the service-registry).</p><p>Hope you have the feeling of having achieved something.<br>Let me know how you liked the course here so far :)<br>Would really love to hear the opinions of all of you.</p><p>The next chapter is over here: <a href="https://medium.com/@marcus.eisele/spring-boot-microservices-part-six-the-gateway-service-netflix-zuul-55f8d97b731d">Part Six- The Gateway Service</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=96f0de083252" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[5 Things in the first year of a Software Engineer]]></title>
            <link>https://medium.com/@marcus.eisele/5-things-in-the-first-year-of-a-software-engineer-40fc968ac12?source=rss-a84e9508c172------2</link>
            <guid isPermaLink="false">https://medium.com/p/40fc968ac12</guid>
            <category><![CDATA[getting-started]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[junior-developer]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Marcus Eisele]]></dc:creator>
            <pubDate>Sun, 25 Feb 2018 08:51:28 GMT</pubDate>
            <atom:updated>2018-02-25T08:51:28.276Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XWCrOtVijQ8gqcEWKuWMBA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/photos/1K9T5YiZ2WU?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Tim Gouw</a> on <a href="https://unsplash.com/search/photos/junior-developer?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>Hi my name is Marcus and I graduated from university at the end of 2016 with a MSc degree in Software Engineering. So I am now one and a half year in my current position as a Java Backend Developer in a team which is developing an Android and iOS App.</p><p>I hope this didn’t sound too much like the introduction at a mutual aid fellowship 😅 But it guess thats not too far off. I think we could create a mutual aid group for developers who are just starting out and easily have it filled with people.</p><p>During the last year I read a few articles here on medium from some people who just finished there bootcamp or finished their degree and then began to work full-time in software development, they all had more or less the same topics covered and also are in line with my personal experience so far.</p><p>In this story I want to collect the 5 points I guess are the most important to keep in mind during your first year.</p><h3>1. Starting out is hard</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FXyNLlDk1WARJsoK9gTmCA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/photos/kFVmYjK6hZ8?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">whoislimos</a> on <a href="https://unsplash.com/search/photos/despair?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>You will feel a very hard discomfort no matter what you did before. There will be so many technologies or ways of doing things. That discomfort also could be due to your inexperience in the domain of your company. This may be getting a bit eased if you previously had an internship at the same company but still you will get exposed to so much stuff you have (or have the opportunity) to learn. My advice here for now and the future is</p><blockquote>Embrace and learn to live in this discomfort — It is the greatest thing for personal and professional growth</blockquote><p>This may sound a bit counterintuitive, but let me explain:<br>When you feel the discomfort I just described you are in an environment where you are learning things in a really fast pace. In order to put the whole point here into perspective: When you continue your journey I will promise you that this discomfort you feel at the beginning will fade — This is a sign that it may be time to find some additional new tasks you can do which cause that initial discomfort again to stay in that <strong>discomfort zone </strong>that is boosting your growth. Make sure that there is always something that you are learning at work.</p><h3>2. Become a part of the team</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EQX_EJicy5Ipdp99sOc_YA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/photos/7de474KZIbs?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Pascal Swier</a> on <a href="https://unsplash.com/search/photos/team?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>During your fist month you will start to get used to the team dynamics.<br>Even if you had designated people helping you with your on-boarding it may be really worth to also work with other people.</p><p>My onboarding was done by basically two colleagues but I also spent time finsihing some userstories with other colleagues. In retrospective this was a real good thing since I just tripled the amount of people I can easily come back to in case I have some questions about the code or how things work at the company.</p><p>It also doesn’t hurt to spent some time on shared activities like playing table soccer, playing ping pong or just eating lunch together. Another benfit: It is fun 😄. In the long-term you and your teammates will become real friends who can trust and count on each other.</p><h3>3. Ask questions and take notes</h3><p>At some point you will be starting to work independently and this will really make you sweat. After my first month I got a task to write an own service using a framework I previously never touched. The service then will be one of the central services in our architecture. <br>How it turned out: I was really stressed. For one by the fact that this services was really important and for the other I had the feeling, since I spent my first month, that I was supposed to do it on my own.</p><p>For getting started I learned a lot by looking at proper online sources or already existing code in our companies repository written by my colleagues.<br>Also code-reviews were a great place for getting exposed to the code of my company and I also had the opportunity to ask for reasoning behind things I didn’t understand. Sometimes it is not even yourself but the existing code which should be doubted when you are not able to understand it.</p><p>Then I had one subtask were I really got stuck. I spent I guess almost a week without measurable progress. I did progress by having a list in my mind of <em>“stuff I tried but which didn’t work out” </em>which was becoming longer and longer<em>. </em>The problem I had was very special, we use a specific version of a protocol for which the support in the tool I wanted to use was dropped a long time ago. Because of that I had to go back to a really old version which was not really compatible with the newest framework we were using since a lot of cool integration only happened for the later versions. Of course this problem barely had any google hits.</p><p>After that week I had a talk to a colleague who already used that thing for something similar. We made it work but it took us another 3 days. Until today we are joking about how “shitty” that tool is and how bad we want to replace it. <br><em>Sidenote</em>: If anybody is aware of the best and easiest way to integration test rabbitMQ consumer/producers in Spring Boot. Go tell me!</p><p>What I learned here is that you are supposed to seek for help even if you are stuck with some simple thing. You are not on your own and you shouldn’t.<br>Your colleagues will love (they will tell you when it is a bad timing for them) to help you, especially since they know that you will happily return the favor another time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8c333d_YNEHG4q3UDb1wTA.jpeg" /><figcaption>Photo by Helloquence on Unsplash</figcaption></figure><h3>4. Code reviews are great — so is a good ability to understand code</h3><p>Even if I have to admit that from time to time I have the feeling that they are a burden if you are on the reviewing side and also hindering your productivity if you are on the other side having to wait for a review when you just had a small change.</p><blockquote><strong>Code reviews are one great way to spend time reading well written code</strong></blockquote><p>During my first year I learned that as a developer you probably spend more time reading than writing code. Regardless wether you fix a bug, add functionality, just refactor existing code or review somebody else’s code — for all of this tasks a great portion of time is spent on reading and understanding code.</p><p>By time you get better at understanding code more quickly. Also you will start to appreciate <strong>clean code </strong>which is easy to understand and start writing in that way too. I don’t want to get in too much detail here what that means since that could be easily a story here on its own.</p><p>Code reviews really help you to get on track with the coding guidelines and standards in your company. Also they are a place where you can just pick up some cool ideas what you could use while writing own code, especially if you are not that fluent in the programming language.</p><h3>5. Be available for colleagues and use their availability</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HCjlpdpFY4Rpfx_CsaP5VQ.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/photos/KhmfoQEindg?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Alvaro Reyes</a> on <a href="https://unsplash.com/search/photos/team?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>Trust me, you will not for long be the “new guy”. After a while you will be considered as <em>one of the pack. </em>Especially people joining after you may not be aware that you are not that much longer there than themselves. When you reach that point I would personally make sure that you always have a open ear for them. I really try to make that work at office but sometimes it is really hard because of deadlines.</p><p>In the long-term this will really ease your own moments when you are looking for really urgent help or at least you will not feel that bad for getting people interrupted by yourself. Regardless if it is an urgent problem on the production environment or you want to have instant feedback on an idea which will affect the architecture of your project.</p><p>Another great use of availability of other team members is the chance to pair on a problem. I often like to pair on some more complicated problems if the opportunity is there. The benefits for me are similar to the ones mentioned for the code review since often you have instant suggestions / feedback how your code could be improved or spot bugs just when you are about to create them.</p><p>My experience shows that code written in pair has often less requests for modification in the code review — I guess that is just because it is already more or less reviewed by another developer at that point.</p><h3>Takeaway</h3><p>Besides the five points mentioned here I guess there will be a lot more you will experience during your first year. I just want to make sure you remember one last thing which is maybe more important than all of these 5 together. When you really enjoy what you are doing then it won’t be feeling hard at all. <strong>Make sure to enjoy the process. </strong>After all you probably will be in this field for a long time and you are just getting started. You will cry, doubt, fail but also will find friends, courage and success in things you thought would be impossible for you. You all gonna make it!</p><p>I really would love to hear about your journeys so far, make sure to leave a comment. Also I would really appreciate to hear from you how you did like this article since normally I am writing about technology, to see if there would be more interest in articles like this.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=40fc968ac12" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Microservices with Mo — Part Four: The Configuration Service]]></title>
            <link>https://medium.com/@marcus.eisele/microservices-with-mo-part-four-the-configuration-service-7d9a5b1b4f72?source=rss-a84e9508c172------2</link>
            <guid isPermaLink="false">https://medium.com/p/7d9a5b1b4f72</guid>
            <category><![CDATA[netflixoss]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[spring-boot]]></category>
            <dc:creator><![CDATA[Marcus Eisele]]></dc:creator>
            <pubDate>Sat, 30 Sep 2017 14:15:32 GMT</pubDate>
            <atom:updated>2018-03-10T18:36:24.083Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Zv5KXdAW988QNEeyKlB83A.jpeg" /><figcaption>Gears representing our configurations. Photo by <a href="https://unsplash.com/photos/bphc6kyobMg?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Chester Alvarez</a> on <a href="https://unsplash.com/?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>Welcome back, glad to have you here again.</p><p>This post is part of the series ‘Microservices with Mo’. Just hit the links if you want to follow along:<br><a href="https://medium.com/@marcus.eisele/implementing-a-microservice-architecture-with-spring-boot-intro-cdb6ad16806c">Part 0: Intro</a> <br><a href="https://medium.com/@marcus.eisele/implementing-a-microservice-architecture-with-spring-boot-part-one-the-environment-cbc032473ab8">Part 1: Setting up docker<br></a><a href="https://medium.com/@marcus.eisele/microservices-with-mo-part-two-the-architecture-3845b5228ddb">Part 2: The architecture</a><br><a href="https://medium.com/@marcus.eisele/microservices-with-mo-part-three-the-counter-microservice-5fa34af2dcdc">Part 3: The Counter Microservice</a></p><p>Today we are going to introduce a configuration service which will be the centralized source of configurations for our microservices.</p><h3>What is a config server and why do we need it?</h3><p>Think I need to play the role of a salesman for a bit:<br>Imagine you have a lot of microservices running — think about 10 / 50 / 200 … you get the point. Would it not be awesome to have a centralized place where you could manage the configuration of all of them? For each and every instance of whatever microservice?</p><p>Another scenario: You or another developer are changing the configurations of a few services. After two weeks you realize that mistakes have been made and you need the knowledge of what the working configurations were. Wouldn’t it be nice to have a version control system for your configurations?</p><p>Look no further this is what a configuration service is able to do.</p><p>For our simple use-case here it might be overkill but like we said this is all about the environment around our microservices.</p><h3>Where should we start?</h3><p>At first I want to create something inside the microservice we implemented in the previous part of the series. At the moment it does not use any configuration and therefore a configuration service could be kind of pointless right?</p><p>Therefore we will modify our CounterController a bit like in the following code snippet:</p><pre><strong>@RestController<br></strong>public class CounterController {<br><br>    private AtomicLong count = new AtomicLong(0L);<br><br>    <strong>@Value</strong>(value = <strong>&quot;${counter.prefixMessage}&quot;</strong>)<br>    private String prefixMessage;<br><br>    <strong>@GetMapping</strong>(path = <strong>&quot;/count&quot;</strong>)<br>    public String getCount(){<br>        return prefixMessage + count.getAndIncrement();<br>    }<br>}</pre><p>Here we introduced a prefixMessage which will be printed before the actual count we are returning. In consequence the return type of our Controller-Method has changed to String.</p><p>Also we added the key to our application.properties :</p><pre>counter.prefixMessage=<strong>Hello World: </strong></pre><p>If we now access the count-Endpoint of our freshly started microservice we get greeted with an Hello World: 0 .</p><h3>Off to the config service:</h3><p>Let’s get started with the config service.</p><p>Like before our journey will begin at <a href="http://start.spring.io/">http://start.spring.io/</a>.<br>There we should update the group- and artifactID again (I have chosen com.marcuseisele.springboot_microservices and configservice). As dependencies I only added Config Server .</p><p>After downloading the zip and extracting it to our repository I quickly brought the repository itself up to date:</p><ol><li>Copy the Dockerfile to the configservice folder and update it with the proper jar name: configservice-0.0.1-SNAPSHOT.jar</li><li>Update the docker-compose.yml</li><li>Add the config service to the pom.xml inside the repository root</li></ol><h4>Implementing the config service:</h4><p>After we have copied there are a few things still left to do in order to set up the service properly. At fist we need to add @EnableConfigServer to some Configuration-Class or simply the main-class. For the sake of simplicity I added it to main-class. By doing that we enable the functionality of the configuration service. Still we are missing some pieces.</p><pre>@SpringBootApplication<br><strong>@EnableConfigServer<br></strong>public class ConfigserviceApplication {<br><br>   public static void main(String[] args) {<br>      SpringApplication.<em>run</em>(ConfigserviceApplication.class, args);<br>   }<br>}</pre><p>The config service has not yet a place were we could store our configuration and it runs locally on the default port 8080. The latter is not really a problem since we run the services containerized and just could update the port forwarding inside the docker-compose.yml . For testing the services locally I would love to have a profile which uses a specific port so that I can run it with other services side-by-side. Because of that I created anapplication-local.properties file which will set the properties needed for running locally. Besides setting the server port to 8888 I also wanted to use a local repository as source of my configuration files.</p><pre>server.port=<strong>8888<br></strong>spring.cloud.config.server.git.uri=<strong>${HOME}/git/microservice-config</strong></pre><p>Now we need to make sure that the folder specified here is pointing to a git repository which should keep track of all configuration files. For the sake of simplicity I will let you guys just put the public repository in there which I created for this tutorial.<br>The URL is <a href="https://github.com/eiselems/microservice-config">https://github.com/eiselems/microservice-config</a>.</p><p>If you are adding your own repo here you need to create a property file similiar to <a href="https://raw.githubusercontent.com/eiselems/microservice-config/master/counterservice.properties">https://raw.githubusercontent.com/eiselems/microservice-config/master/counterservice.properties</a> inside the root of your configuration repository.</p><p>After setting everything up we now can start it locally via: ./mvnw springboot:run .<br>In order to test the proper content of our config server we can access the provided config of our config server at <a href="http://localhost:8888/counterservice/default">http://localhost:8888/counterservice/default</a> and should be greeted by something similiar to this:</p><pre>{  <br>   <strong>&quot;name&quot;</strong>:&quot;counterservice&quot;,<br>   <strong>&quot;profiles&quot;</strong>:[  <br>      &quot;default&quot;<br>   ],<br>   <strong>&quot;label&quot;</strong>:null,<br>   <strong>&quot;version&quot;</strong>:&quot;d5d4a8051a8c2f37a3c43282c156aba06162992c&quot;,<br>   <strong>&quot;state&quot;</strong>:null,<br>   <strong>&quot;propertySources&quot;</strong>:[  <br>      {  <br>         <strong>&quot;name&quot;</strong>:&quot;/Users/marcuseisele/git/microservice-config/counterservice.properties&quot;,<br>         <strong>&quot;source&quot;</strong>:{  <br>            <strong>&quot;counter.prefixMessage&quot;</strong>:&quot;Hello EVERYBODY: &quot;<br>         }<br>      }<br>   ]<br>}</pre><h4>Updating the counter service:</h4><p>In order to leverage the potential of the config service we need to update the counter service. After having it done myself I realized it is easier than I expected.<br>Just add following dependency to the pom.xml of the counterservice.</p><pre>&lt;dependency&gt;<br>   &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;<br>   &lt;artifactId&gt;spring-cloud-starter-config&lt;/artifactId&gt;<br>&lt;/dependency&gt;</pre><p>With the following dependency management:</p><pre>&lt;dependencyManagement&gt;<br>   &lt;dependencies&gt;<br>      &lt;dependency&gt;<br>         &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;<br>         &lt;artifactId&gt;spring-cloud-config&lt;/artifactId&gt;<br>         &lt;version&gt;1.3.2.RELEASE&lt;/version&gt;<br>         &lt;type&gt;pom&lt;/type&gt;<br>         &lt;scope&gt;import&lt;/scope&gt;<br>      &lt;/dependency&gt;<br>   &lt;/dependencies&gt;<br>&lt;/dependencyManagement&gt;</pre><p>With these settings the counter-service will by default look for a configuration service at localhost:8888 which just matches our needs here.</p><p>Now we will update the applications.properties to update some properties so that it looks like this:</p><pre>spring.application.name=counterservice<br>counter.prefixMessage=Hello World: <br>management.security.enabled=false</pre><p>We added the application name by which the application will lookup its properties at the configuration service. The last line is for enabling the possibility to reload the configuration on the fly via an actuator endpoint. By default this endpoint is basic auth protected — we just disabled that for the sake of our tutorial.</p><p>After that we will add a @RefreshScopeon top of our @Countercontroller. Which enables reloading of the configurations from the config server by sending a POST-Request to the /reload endpoint of the counterservice.</p><p>If we now start the configservice and the counterservice and hit the count endpoint on <a href="http://localhost:8080/count">http://localhost:8080/count</a> we will get greeted by the message “Hello EVERYBODY: 0”. As you see this is the message provided by the configserver.</p><p>Earlier I wrote something about a reload feature. We already added it by adding the RefreshScope-Annotation. We can test it by (while running both services) switching to our config repository and modifying the counterservice.properties there. After adding the modification we need to commit that change. Now that we updated the source of the config we can verify it again on: <a href="http://localhost:8888/counterservice/default">http://localhost:8888/counterservice/default</a>. Here we should now see the new values for the message. Now we need to grab a REST Client or simply use cURL to do a POST to the <a href="http://localhost:8080/refresh">http://localhost:8080/refresh</a> endpoint.</p><pre>$ curl -d{} <a href="http://localhost:8081/refresh">http://localhost:8080/refresh</a></pre><p>After that we can see that the count Endpoint of our counterservice at <a href="http://localhost:8080/count">http://localhost:8080/count</a> returns the new values from the configservice.</p><h3>Great so far …</h3><p>We are now able to reload or configuration which is some sort of pull-mechanic. If we think about scaling our services it still would be difficult to update a lot of configurations at once since we would have to hit the refresh-endpoint for every service which should be updated.</p><p>Spring Cloud also offers a solution for just this: <a href="http://cloud.spring.io/spring-cloud-bus/"><strong>Spring Cloud Bus</strong></a><strong>.<br></strong>Spring Cloud Bus is according to their page: “Linking nodes of a distributed system with a lightweight message broker”. It can easily be used for updating the configurations. The only downside is that it relies on a message broker and therefore we would have to update our docker setup to provide one.</p><p>Since I don’t want to drag this article too much I will add this in a future addition to the series. In case you have the urge to want to know more about the automatic update mechanism — just let me know! In that case I will probably update it sooner than later.</p><p>When writing this paragraph I realized that I initially wanted to create the Service Discovery in advance to the Configuration Service. So I guess creating the Service Disovery will be the next part of the series 😄</p><p>Again you can review all changes made during this part on GitHub (<a href="https://github.com/eiselems/spring-boot-microservices/compare/bba58a4cae2eafee954845cc28e8bdf393471a47...part4">Link to diff view</a> / <a href="https://github.com/eiselems/spring-boot-microservices/tree/part4">Link to branch after finishing this part</a>)</p><p>As always I hope you like this part and the series in total. Feel free to ask anything that is questioning you or parts where you think I could improve something. I already learned a lot by the feedback I received. Nobody is perfect and so am I.</p><p><a href="https://medium.com/@marcus.eisele/microservices-with-mo-part-five-the-registry-service-netflix-eureka-96f0de083252">Link to next story: Part 5 the Service Registry</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7d9a5b1b4f72" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Microservices with Mo — Part Three: The Counter Microservice]]></title>
            <link>https://medium.com/@marcus.eisele/microservices-with-mo-part-three-the-counter-microservice-5fa34af2dcdc?source=rss-a84e9508c172------2</link>
            <guid isPermaLink="false">https://medium.com/p/5fa34af2dcdc</guid>
            <category><![CDATA[java]]></category>
            <category><![CDATA[spring-boot]]></category>
            <category><![CDATA[microservices]]></category>
            <dc:creator><![CDATA[Marcus Eisele]]></dc:creator>
            <pubDate>Sat, 16 Sep 2017 20:02:12 GMT</pubDate>
            <atom:updated>2017-09-30T14:19:21.336Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TdEIMWVcPe9lPdp2xbBC6A.jpeg" /><figcaption>Let’s get some codin’ done. Photo by <a href="https://unsplash.com/photos/p-xSl33Wxyc?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Farzad Nazifi</a> on <a href="https://unsplash.com/?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>This post is part of the series ‘Microservices with Mo’:<br><a href="https://medium.com/@marcus.eisele/implementing-a-microservice-architecture-with-spring-boot-intro-cdb6ad16806c">Part 0: Intro</a> <br><a href="https://medium.com/@marcus.eisele/implementing-a-microservice-architecture-with-spring-boot-part-one-the-environment-cbc032473ab8">Part 1: Setting up docker<br></a><a href="https://medium.com/@marcus.eisele/microservices-with-mo-part-two-the-architecture-3845b5228ddb">Part 2: The architecture</a></p><p>Last time we scratched our head a bit and thought about components of a microservice architecture. There we decided to start with implementing our first microservice which will be covering the business logic</p><p>Like already explained in the introduction to this series: This service will not be very clever — since this series is more about the surrounding of this service.</p><h3>What we gonna do:</h3><p>We gonna write an awesome microservice based on Spring Boot which will provide an REST Endpoint where our imaginary clients can GET how many requests the service already has received in prior to the user’s call. For the sake of simplicity this information will be since the restart of the service.</p><h3>Let’s do this:</h3><p>In general a good place to start a Spring Boot Microservice is <a href="http://start.spring.io/">http://start.spring.io/</a>. Here we can easily select all the packages we need for our microservice. Since it is a very easy one we won’t need much. As you can see in the image below I have chosen a meaningful <em>Group-</em> and <em>ArtifactId</em> and also added following dependencies:</p><ul><li>Web: Since we will be creating a REST-Interface we will leverage the integrated tomcat and the capabilities of WebMVC</li><li>Actuator: With this dependency our API will be extended with some endpoints like /info and /health to give information about our microservice.</li><li>DevTools: A great article about them with all the features listed can be found <a href="http://www.baeldung.com/spring-boot-devtools">here</a>. Tldr: They are a great set of tools which save a lot of time during developing by enabling Live Reloads for template engines, reload upon changes in the classpath and much more. Maybe they are a bit overkill since we will be not spending a lot of time developing this services but for me they became some sort of no-brainer.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J9YG6sPHicjxY31VZdlrlw.png" /><figcaption>start.spring.io with our Configuration</figcaption></figure><p>Now you can hit the Generate Project Button or use the shown hotkey. Shortly after that you should have a generated zip-File in your download folder of choice. This file contains a already prepared runnable Spring Boot Project.</p><p>I now created extracted that zip file and moved the extracted folder directly into our git repository. Also I copied the Dockerfile we prepared earlier from the template-service folder and adjusted jar-name. Mind that the default Jar contains the version number and therefore needs to be called counterservice-0.0.1-SNAPSHOT.jar. I hope that I will find a proper solution for that problem but until now it has to do it.</p><p>Now it is time to open the project in your favorite IDE. I will be using IDEA IntelliJ since it is my favorite and I could write a different story about how much I love it — but not here.</p><p>When we open the project we can see that there is already an Application class which is the starting point of our application. If we have a look into it we can see that it is annotated with <em>@SpringBootApplication. </em>This is were the magic happens. It enables SpringBootConfiguration, AutoConfiguration and the lovely ComponentScan. With this annotation the Application will automatically pick up any Component, Configuration and other spring related Beans which are hierarchical below the package in which the application class is located. Since we will be creating our packages just here — the scanner is able to pickup everything we create.</p><p>Since we want to create a REST-Endpoint we need to create a REST-Controller. I therefore created the package api<em> </em>and put a class called CounterControllerhere. <br>There is not much to do here:</p><ol><li>Add @RestController,to the top of the class.</li><li>Create a Request-Mapping for the endpoint. I prefer the more specific @GetMappingwhich is just an alias.</li><li>In order to save the state we will use a static variable to count the number of requests we have dealt since the restart of the server.<br>We will be using an AtomicLong here instead of a long or Long since the access to the variable needs to be thread-safe in case there is more than one request at a time.</li><li>Return and increase the variable after returning it</li></ol><p>The code snippet below shows how our CounterController looks like:</p><pre><strong>@RestController<br></strong>public class CounterController {<br><br>    private static AtomicLong <em>count </em>= new AtomicLong(0);<br><br>    <strong>@GetMapping</strong>(path = <strong>&quot;/count&quot;</strong>)<br>    public long getCount(){<br>        return count.getAndIncrement();<br>    }<br>}</pre><p>Hint: Hope you forgive that we created an API which is solely returning a long instead of a proper JSON Response. But I think there are other tutorials out there how to properly introduce DTOs.</p><p>After doing just that we can start our SpringBootApplication by running the CounterServiceApplication class or by executing /mvnw spring-boot:run inside our counterservice folder.</p><p>If we go hit <a href="http://localhost:8080/count">http://localhost:8080/count</a> after starting it we will be served with the number of requests the server had in prior to our call. <strong>SUCCESS!</strong></p><h4>Cleaning up</h4><p>Time to update our docker-compose.yml in the root folder of our git repository to now use our newly created microservice.</p><pre>version: &#39;3&#39;<br>services:<br>  counterservice:<br>    build: counterservice<br>    ports:<br>      - &quot;8080:8080&quot;</pre><p>And now we can run it with docker-compose up … Oh noes wait!</p><pre>ERROR: Service ‘counterservice’ failed to build:<br>ADD failed: stat /var/lib/docker/tmp/docker-builder575431593 /target/counterservice-0.0.1-SNAPSHOT.jar: no such file or directory</pre><p>Oh well, yes we could fix it with a fast mvn clean install inside the counterservice folder. But I think this is not very convenient when introducing other microservices. The cleanest solution would probably be to move the maven build also inside the container and start it there we did before.<br>The other solution we can go for is to create a multi-module maven project.</p><p>Maven allows multi-module projects which can be aggregates or source of inheritance. In our case we want to have a single pom.xml we can run to build all services we will be creating during this series. The pom.xml below is the one I put inside the root folder of our git repository.</p><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br>&lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd&quot;&gt;<br>  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;<br>  &lt;groupId&gt;com.marcuseisele.springboot_microservices&lt;/groupId&gt;<br>  &lt;artifactId&gt;parent&lt;/artifactId&gt;<br>  &lt;version&gt;1.0.0&lt;/version&gt;<br>  &lt;packaging&gt;pom&lt;/packaging&gt;<br>  <br>  &lt;modules&gt;<br>    &lt;module&gt;counterservice&lt;/module&gt;<br>  &lt;/modules&gt;<br>&lt;/project&gt;</pre><p>Now a single mvn clean package inside the root of our git repository will also create our newly created microservice. After that we can again run docker-compose up and see our microservice booting up in all its beauty. Feel free to again check <a href="http://localhost:8080/count">http://localhost:8080/count</a>.</p><h3>Recap &amp; Outlook:</h3><p>So what did we achieve in this part?</p><p>Besides creating our first service in this series we also modified the project to be a multi-module maven project. Also we updated the docker-compose.yml in a way to start our newly created service. Not a bad start I guess 😊</p><p>The next session will be covering the usage of a <strong>configuration service. </strong>Just looking at our current service I think I need to find a proper use-case for that one. At the moment our service does not use any configuration at all.</p><p>I am also looking forward to make the next session since I only know configuration services from architecture images and from reading tutorials. The services at my workspace rely on the deployment scripts to inject the proper configuration via environment variables.</p><p>As usual I am looking for feedback and don’t mind any questions if you get stuck. If you have any issues with the code and don’t mind having a peek at the intended solution: <a href="https://github.com/eiselems/spring-boot-microservices/tree/partThree_countermicroservice">here</a> is the branch I created for this session. Also feel free to raise your question in the comments below.</p><p>Thanks for following along!</p><p><a href="https://medium.com/@marcus.eisele/microservices-with-mo-part-four-the-configuration-service-7d9a5b1b4f72">Update: Link to next session — Config Service</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5fa34af2dcdc" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>