https://youtu.be/1HdtILoL6O4

 

Introduction to microservices
◼️ Microservices compose a complex application using small, independent, replaceable processes that communicate via language agnostic APIs
◼️The twelve factor applications could be used for microservices
◼️ Microservices should be stateless
◼️ Microservices better have a small footprint for cloud
◼️ Microservices better have an externalized configuration
◼️ Microservices should have parity between dev and prod environment to keep a short delivery lifecycle

 

Java EE evolution
◼️ Java EE could appear bloat of features
◼️ Profiles could help, and some servers features too: Open Liberty, Wildfly Swarm fractions
◼️ Eclipse MicroProfile provides core capabilities for building fault tolerant, scalable microservices

 

Docker and microservices
◼️ Container = isolation of virtual machine + startup time and footprint of process
◼️ Docker file describes what  you want you build consist of
◼️ The concept of microservices is polyglot
◼️ image = consistent packaging mechanism + meta-data defining externals
◼️ layers = shorter build times + less i/o and disk usage
◼️ API = consistent interface for handling logs, metrics, volumes, networking,...
◼️ r/o = optional immutability

 

Packaging considerations

◼️ externally configurable? Immutable? Maintainable? Consistent? Maximize re-use/sharing? Application/Middleware separation? Organizational fit?

◼️ Wars/ Runnable Jars and containers: what's the best fit

  • Docker is better for polyglot
  • Docker provides consistency beyond Java
  • Maximizing commonality in Docker layers increases: Re-use/ performance/ Maintainability
  • War might be best organizational fit, irrespective of Docker
  • If you're not polyglot then jar may suffice

 

openAPIS

◼️ It is simple standard API description format

◼️ OpenAPi is useful for Microservices because

  • communication is key: APIs need to be well documented
  • testing
  • microservices driven by desire for short lifecycles (auto-generated code)
  • polyglot, multi-vendor environment

◼️OpenAPI code generation is done by open source tools or provided by built-in vendor support

 

Conclusion
◼️ Consider the individual capabilities in Java EE
◼️ Choose your runtime to fit your capability needs
◼️ With Docker as the polyglot packaging model, jar is a distraction
◼️ MicroProfile adds programming model essentials, remove boilerplate
◼️ Swagger/ Open API for polyglot API management

 

 

http://WASdev.net/documents/microservices