Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Modernizing systems with Microservices, Hystrix...

Modernizing systems with Microservices, Hystrix and RxJava

This Talk was given at the JEEConf in Kiev, 23th May 2015

As a software developer you are not very often in the situation where you develop a completely new system from scratch based on recent techonologies. More often just small features have to be integrated in already existing systems. A change of the basic software architecture and an introduction of new programming paradigms are very difficult in this context. It is all the more important to make the modernization of a legacy systems an ongoing part of the feature-driven development process. In this talk I will show step by step how to transform a big, monolithic legacy system towards a modern microservice based architecture. And I will demonstrate how two open libraries from Netflix can support this process. Hystrix will help us to improve the overall stability of the system and RxJava will help us to handle asynchronous processes in a more elegant way. Based on examples I will show how the suggested modernization process could be realised.

Holger Kraus

May 23, 2015
Tweet

More Decks by Holger Kraus

Other Decks in Technology

Transcript

  1. Wir lösen das – persönlich! Modernizing systems with Microservices, Hystrix

    and RxJava Holger Kraus JEEConf, Kiev, May 23, 2015 !
  2. © 2015 innoQ Deutschland GmbH Current problems ‣ Maintenance is

    difficult ‣ New features need a lot of time ‣ Very unstable ‣ Outdated technology ‣ Doesn’t scale ‣ Frustrated developers
  3. © 2015 innoQ Deutschland GmbH Stability patterns ‣ Timeouts ‣

    Circuit Breaker ‣ Bulkheads ! 
 … Fail Fast, Steady State , Handshaking, Test Harness, Decoupling Middleware
  4. © 2015 innoQ Deutschland GmbH Bulkheads and IT ‣ Thread

    pools ‣ Database connection pools ‣ Instances ‣ Server ‣ Data center
  5. © 2015 innoQ Deutschland GmbH ‣ Library from Netflix ‣

    Resilience Library ‣ Command Pattern ‣ Metrics ‣ Dashboard Hystrix
  6. © 2015 innoQ Deutschland GmbH Current problems ‣ Maintenance is

    difficult ‣ New features need a lot of time ‣ Very unstable ‣ Outdated technology ‣ Doesn’t scale ‣ Frustrated developers
  7. © 2015 innoQ Deutschland GmbH Monozon is a typical Monolith

    ‣ hidden dependencies ‣ module boundaries are not clear ‣ distributed business processes ‣ just one technical platform ‣ Everything depends on everything
  8. © 2015 innoQ Deutschland GmbH We need a clear cut!

    https://www.flickr.com/photos/taefit/8528632756
  9. © 2015 innoQ Deutschland GmbH Our mission: Creating smaller systems

    that are ‣ understandable ‣ enhanceable ‣ have clear boundaries and responsibilities ‣ allow technological diversity
  10. © 2015 innoQ Deutschland GmbH Micro architecture ‣ Separate (redundant)

    persistence ‣ Internal, separate logic ‣ Domain models & implementation strategies ‣ Separate UI ‣ Separate development and evolution ‣ Separate deployment, separate infrastructure ‣ Limited interaction with other systems
  11. © 2015 innoQ Deutschland GmbH Domain architecture ‣ System boundaries

    reflect business dependencies ‣ defines who is responsible for which data ‣ follows the principle of ‣ loose coupling ‣ high cohesion
  12. © 2015 innoQ Deutschland GmbH Ask the monolith ‣ identify

    Bounded Contexts ‣ define boundaries explicitly ‣ The experience with the monolith helps to create clear system boundaries
  13. © 2015 innoQ Deutschland GmbH Macro architecture ‣ defines standards

    across systems ‣ UI integration ‣ communication protocols ‣ representation formats ‣ data redundancy ‣ logging, monitoring, security
  14. © 2015 innoQ Deutschland GmbH Consequences ‣ Transactions contexts are

    bound to just one system ‣ Data should be just changed by the systems that are responsible for it ‣ Processes need Data that are spread over various systems
  15. © 2015 innoQ Deutschland GmbH Time for RxJava! ‣ Reactive

    Extensions for the JVM ‣ Asynchronous streams ‣ Elements of ‣ Iterator patter ‣ Observable pattern ‣ Functional programming
  16. © 2015 innoQ Deutschland GmbH Summary ‣ Use Hystrix to

    stabilize your system! ‣ Use RxJava to increase the amount of asynchronous processes in an easy way! ‣ Introduce Microservices to get control over your system again!