Below you will find pages that utilize the taxonomy term “microservices”
Blog
Journeys in Java, Level 10: Service Discovery with Eureka
Photo credit Gaining complexity in a microservices system certainly isn’t for the faint of heart (though neither is complexity in monoliths!). When there are many services that need to communicate with one another, we might need to coordinate multiple services communicating with multiple other services. We also might code for varying environments such as local, development server, or the cloud.
How do services know where to find one another? How can we avoid problems when a service is unavailable?
read moreBlog
Journeys in Java, Level 9: Docker compose all the things
Photo credit Our microservices project contains quite a few pieces now. We have two databases, three API services, a user-view service for books, and a service to host our configuration. With so many pieces to manage, it would be nice to have something that orchestrates the individual services into a system, such as Docker Compose.
Back in our Level 5 rendition, we did exactly this for our smaller version of the project.
read moreBlog
Journeys in Java, Level 8: Add MongoDB to Spring Cloud Config
Photo credit In our last blog post, we used Spring Cloud Config to provide database credentials to a microservice application connecting to a cloud-hosted Neo4j database. This post will backport this concept to our existing MongoDB database instance and its related microservices.
We will add our MongoDB credentials to the config server, so that it will be the central place for both our Neo4j and MongoDB database access. However, each service only has access to the credentials that it needs to operate, which provides some level of security through "separation of concerns" (versus universal access).
read moreBlog
Journeys in Java, Level 7: Externalize Microservice Configuration
Photo credit Our decided next step for this project takes us in a new direction by adding externalized configuration for our applications. We already saw how to do something similar with MongoDB database credentials in Docker Compose to access a local database container, but what do we do when the database is hosted on public cloud or contains sensitive data? We probably don’t want to publish our credentials anywhere or even prevent accidental publishing.
read moreBlog
Journeys in Java, Level 6: Build a Microservice with Neo4j
Photo credit For our next adventure in Java microservices, we want to expand our system for book review data. While books and authors are well-suited for a document database such as MongoDB, once you add reviews to the mix, the importance of the relationships makes this project better suited for a graph database. This way, we can utilize relationships between the different entities to improve analysis based on the structure of the connections.
read moreBlog
Journeys in Java, Level 5: Manage Microservices with Docker Compose
Photo credit We continue building our microservices system by adding a coordination layer to handle spinning multiple services up and down. In previous blog posts, we grew from two Spring Boot applications to three applications + a database container. As we continue to scale and broaden our system, we will need something to coordinate service and ensure consistent communication (avoid human error).
We will do this through docker-compose, an orchestration tool that manages containerized applications.
read moreBlog
Journeys in Java, Level 4: Building an Empire of Microservices
Photo credit This blog post is the fourth iteration in a series of posts about building microservices in Java. The initial post started with a single string message passed between two locally-running applications, and we are gradually adding services and functionality along the way.
In this level 4 installment, we will add a new service that will manage book authors. It will call a database containing a data domain of books and retrieve authors and their information.
read moreBlog
Journeys in Java, Level 3: Building an Empire of Microservices
Photo credit We are still in the beginning stages of building microservices with Java, but we have already seen how to send and receive communications between two Spring Boot applications. In the first blog post of this series, our two applications transmitted a message string of "Hello, World!". In the second blog post, we took it one step further by embedding a MongoDB database into our service1, added a data domain (books) with four pre-populated entries, and transmitted the Book information between the two applications.
read moreBlog
Journeys in Java, Level 2: Building an Empire of Microservices
Photo credit In my last blog post, we began building microservices in Java with two Spring Boot applications, passing a "Hello, World!" string from one application to the other. We focused on reduced complexity, minimum previous knowledge, and few components. Next, we can slowly add pieces that simulate microservices projects in the real world.
One way to do this is by adding a data domain. Applications often model some scenario in the real world such as maintaining office building temperatures, finding connected devices on a network, or recommending a tv show.
read moreBlog
Journeys in Java, Level 1: Building an Empire of Microservices
Photo credit Microservices have been used and deployed in businesses and projects for awhile, and there is plenty of content available for architecting them into a system. For my next project, I want to dive into the world of microservices and begin building my own little virtual empire from different kinds of services to find out the complexities, best practices, power, and trouble that comes with them. I will share all my learnings along the way, as well.
read more