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

Spring Boot and Spring Cloud for Legacy Applications

Spring Boot and Spring Cloud for Legacy Applications

Marten Deinum

May 10, 2016
Tweet

More Decks by Marten Deinum

Other Decks in Technology

Transcript

  1. Wie is Conspect? ➢ ICT & Consulting organisatie ➢ Opgericht

    in 2001 ➢ Gevestigd in Almere ➢ 100 professionals ➢ Conspect levert kwaliteit op het gebied van Agile Development en Business Analytics ➢ Conspect staat voor Plezier, Passie en Partnership ➢ Conspect is ICT met een lach! linkedin.com/company/conspect
  2. Vraag 1 Wat zijn de kernwaarden van Conspect? A. Plezier,

    Passie en Partnership B. Money, Money, Money C. B
  3. Vraag 1 Wat zijn de kernwaarden van Conspect? A. Plezier,

    Passie en Partnership B. Money, Money, Money C. B
  4. Vraag 2 Wat is de titel van het 2e boek

    van Marten Deinum? A. The summer is magic B. Spring is in the air C. Spring Recipes
  5. Vraag 2 Wat is de titel van het 2e boek

    van Marten Deinum? A. The summer is magic B. Spring is in the air C. Spring Recipes
  6. Vraag 3 Wat is de tekenbonus bij Conspect? A. Tekenbonus?

    Ik kan niet voetballen. B. € 3000,- C. Die schenk ik aan een goed doel.
  7. Vraag 3 Wat is de tekenbonus bij Conspect? A. Tekenbonus?

    Ik kan niet voetballen. B. € 3000,- C. Die schenk ik aan een goed doel.
  8. By Day • Software Developer / Architect / Consultant By

    Night • Husband & Father • Lifeguard (Instructor) • Scuba Instructor • Author Who Am I
  9. Legacy Applications “In computing a legacy system is an old

    method, technology, computer system, or application program,"of, relating to, or being a previous or outdated computer system." Often a pejorative term, referencing a system as "legacy" often implies that the system is out of date or in need of replacement.” - Wikipedia
  10. The Application Bookstore from Pro Spring MVC • Spring Framework

    3.2 • JPA with Hibernate 4.2 • Using Tiles and JSP • XStream • Jackson • Configuration using XML and JavaConfig • Deployed as a WAR • No Monitoring/Metrics/Health etc.
  11. Spring Boot Spring Boot makes it easy to create stand-alone,

    production- grade Spring based Applications that you can "just run". We take an opinionated view of the Spring platform and third-party libraries so you can get started with minimum fuss. Most Spring Boot applications need very little Spring configuration. - Spring Boot Documentation
  12. Spring Cloud Spring Cloud provides tools for developers to quickly

    build some of the common patterns in distributed systems (e.g. configuration management, service discovery, circuit breakers, intelligent routing, micro-proxy, control bus, one-time tokens, global locks, leadership election, distributed sessions, cluster state). Coordination of distributed systems leads to boiler plate patterns, and using Spring Cloud developers can quickly stand up services and applications that implement those patterns. They will work well in any distributed environment, including the developer's own laptop, bare metal data centres, and managed platforms such as Cloud Foundry. - Spring Cloud Documentation
  13. Strangler Application / Pattern "The most important reason to consider

    a strangler application over a cut-over rewrite is reduced risk. A strangler can give value steadily and the frequent releases allow you to monitor its progress more carefully. Many people still don't consider a strangler since they think it will cost more - I'm not convinced about that. Since you can use shorter release cycles with a strangler you can avoid a lot of the unnecessary features that cut over rewrites often generate." - Martin Fowler, ThoughtWorks
  14. • Zuul Proxy not a full reverse proxy • No

    rewrite of Location header in case of redirects • Custom ZuulFilter • Put NGINX in front Strangler Application / Pattern : Challenges
  15. • Manual Usage (after all it is “just” configuration) •

    Add the appropriate listener or @Enable* annotation Introduce Spring Cloud Client : How To
  16. • Spring Boot 1.3.x not compatible with older versions •

    Spring Cloud 1.1 not compatible (yet) with Spring Boot 1.4 • Configuration, Discovery combo can be tricky to setup • Requires some digging into the sources Introduce Spring Cloud : Challenges
  17. • Add Spring Boot Dependency • Use Spring Boot Starters

    for managing the dependencies • Use Spring Boot for launching the application • “Make JAR not WAR” — Josh Long • Start with existing working configuration • Cleanup the configuration Introduce Spring Boot : How To
  18. • Add Spring Boot Dependency • Use Spring Boot Starters

    for managing the dependencies • Use Spring Boot for launching the application • “Make JAR not WAR” — Josh Long • Start with existing working configuration • Cleanup the configuration Introduce Spring Boot : How To
  19. • Dependency Versions • Deprecated or Removed Support • Incompatible

    libraries • AutoConfiguration Introduce Spring Boot : Challenges
  20. • Dependency Versions • Spring is 99% backwards compatible •

    Check the documentation what changed • Generally also applies to other Spring Portfolio Projects Introduce Spring Boot : Challenges
  21. • Deprecated or Removed Support • Locate old sources and

    include in your own project • Refactor to newer version Introduce Spring Boot : Challenges
  22. • Auto Configuration • Can be a blessing • Can

    be a curse • But not magic, just @Configuration classes. Introduce Spring Boot : Challenges