Docker, Java, Microservices

Java Spring Boot Microservices from a .NET/C# perspective

In order to get a better grasp of the Saga pattern, I found myself “productively diverted” to taking a Java Spring Boot Microservices course. It took me the better part of 4 weeks and well over 120 hours worth of time outside of work. I guess it was a matter of “how bad do I want to learn this?”.

I’m not commited to a particular technology stack even tho my latest jobs have been in .NET environments over primarily since late 2005. I used to do Java from 1998 to 2005 with JSP/Servlets/Swing and some JNI. When I moved over into .NET, Spring had not yet come out so I missed that whole part with Java. This is not to say I would not be honored to work at a place where I could learn and get into Spring Boot with Microservices providing the prospective employer(s) know that I am not a guru in Spring Boot but would keep working hard to get better and better.

In this video, I will relate my experience/perspectives on Microservices with Java Spring Boot and this awesome course I took.

I got permission from the instructor’s aid to talk about this course and show some things. I learned a lot and it was worth the time.

Using docker and docker-compose for the system of microservices

Here’s the course

https://www.udemy.com/course/spring-boot-microservices-with-spring-cloud-beginner-to-guru

Docker, Domain Driven Design, Java, Microservices

Reactive Microservice app in Java Spring Boot

I used to do Java for about 7 years from 2018 to 2005 but have been pretty much .net since then. So I missed out on the “spring craze”. Being that I’m really interested in microservices and saw there was a course on Pluralsight about the Reactive Manifesto, I was interested in it. Examples were in Java so I thought it would be a good refresher. Java itself does not give me the difficulties. It’s setting up the IDEs (Eclipse and/or Intellij) along with mvn as that’s a bit different than how it’s done in .NET/C# 🙂

A video on this is coming up but here are notes.

Architectural Patterns

Hexagonal Architecture – Ports and Adapters
Programming to an interface (see as an electrical outlet)
Several db’s but same port

Layered Architecture
Multiple components arranged in a stack
Presentation
Integration
Business
Database

Monoliths
Still effective today. Single units implemented as layered architectures.
Continuous delivery is difficult
Cascading failures affecting all segments

Microservices
Single responsibility model. Hexagonal approach with each microservice a port with the corresponding client/adapter.
Modular components.
S
Isolated DB with a “shared nothing” architecture.
Requires careful coordination.

Reactive Manifesto Published in 2014

Responsive
Respond in a timely manner
Resilent
Systems ability to stay responsive in the event of failures
Elastic
Ability to stay responsive under increasing load
Message Driven
Loose coupling between services establishing boundaries between service components…

Idempotency

Repeating the same operation does not cause adverse affects of the state of the system/resource. It’s important to examine state of the resource on each request to determine if the operation is valid.

Continue reading “Reactive Microservice app in Java Spring Boot”