Tuesday, March 26, 2019

Distributed Spring Integration

Recently, I was given an opportunity to code a use case that required the need to use EIP in a distributed environment. While trying to use the "Splitter" and "Aggregator" patterns, I had a chance to review the source code implementation of many of the components used to implement these using Spring Integration.

Highly recommended reading:
  • http://presos.dsyer.com/decks/locks-and-leaders.html
  • https://github.com/SpringOnePlatform2016/dsyer-locks-and-leaders
  • http://martin.kleppmann.com/2016/02/08/how-to-do-distributed-locking.html
Several points that helped my design implementation using "distributed locks":
  • Distributed locks always have a "shelf life" (so it's really a "lease")
  • Expiration of a "lock" is essential.
  • Use an EIP framework that supports components that remain simple.
  • Potential need to move deployments models to a platform environment following a microservices architecture.
So keeping these in mind, Spring Integration fit well. The key objects used were:
Both XML and Spring POJO Configuration style worked well for managing these via Spring Profiles, and thanks to Spring Boot, keeping these simple was a breeze.

No comments: