Enterprise Microservices Design [Part 5: Cross-Cutting Concerns]

5.1 Microservices Parent POM

  1. Spring Boot
  2. Spring Cloud
  3. Lombok
  4. Dozer
  5. Karate
  6. Jackson
  7. Apache Commons
  8. Feign

5.1.1 Versioning:

5.1.2 Best Practices:

  1. Always update the version of Microservices parent pom when the pom is modified. Example if the current version is 2.0.1 and we have decided to add a new dependency to the parent pom, update the version to 2.0.2 (based on guidelines in versioning section)
  2. Make sure the version is defined as properties and not hard-coded at dependency level
  3. Keep all related dependencies grouped logically and appropriate group comment label added for easy maintenance of dependency

5.2 Microservices Framework

  1. Distributed Logging
  2. Log Tracing
  3. Log Masking
  4. Error Handling
  5. Microservices Security
  6. Properties Encryption
  7. Common Utilities
  8. Configuration Management
  9. Dozer Configuration
  10. Feign Configuration
  11. Jackson Configuration
  12. Date Time Format Configuration

5.2.1 Distributed Logging

5.2.1.1 Log Tracing

  • Adds trace and span ids to the Slf4J MDC, so you can extract all the logs from a given trace or span in a log aggregator.
  • Generate and report Zipkin-compatible traces via HTTP.

5.2.1.2 Log Masking

  • Feign
  • JAXB
  • Lombok POJO classes (toString() method)
  • Application logs

5.2.2 Error handling

5.2.3 Microservices Security

5.2.4 Properties Encryption

5.2.6 Configuration Management

5.2.7 Versioning

5.2.8 Best practices

  1. Even though the framework generates the necessary logs, Please feel free to add necessary inline logs in microservices as per your need.
  2. Add any utility classes you feel appropriate to the framework so that they can be reused and readily available across multiple microservices rather than duplicating the code
  3. Always encrypt sensitive information in your application

--

--

--

Certified cloud architect having nine (9) plus years of experience with proven expertise in formulating architectural solutions for an enterprise

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Memento Pattern — Undo, Redo

Validator Nodes | Era Swap Mission & Vision

Greenfielding for a Future

Pizza with a CTO — NUMA x MeilleursAgents.com

Implementing a use case (II) - Command Pattern

Launching and Connecting to AWS EC2 instance from Windows 10 using SSH

Adding Facebook oAuth to our App

Mobile Pattern #3: Micro-services, stateless, and eventual consistency

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Ravikiran Butti

Ravikiran Butti

Certified cloud architect having nine (9) plus years of experience with proven expertise in formulating architectural solutions for an enterprise

More from Medium

Design Patterns And Design Principles Notes

Proxy Design Pattern

Building a Modern Monolithic App

EXPLORING UNIT TESTING WITH JUNIT TEST FRAMEWORK