Slide 1

Slide 1 text

Conspect Consulting & ICT Spring Boot and Cloud for Legacy Applications 10 mei 2016

Slide 2

Slide 2 text

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

Slide 3

Slide 3 text

Conspect…

Slide 4

Slide 4 text

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

Slide 5

Slide 5 text

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

Slide 6

Slide 6 text

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

Slide 7

Slide 7 text

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

Slide 8

Slide 8 text

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

Slide 9

Slide 9 text

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

Slide 10

Slide 10 text

By Day • Software Developer / Architect / Consultant By Night • Husband & Father • Lifeguard (Instructor) • Scuba Instructor • Author Who Am I

Slide 11

Slide 11 text

Disclaimer This slide intentionally left blank

Slide 12

Slide 12 text

Spring Boot and Spring Cloud for Legacy Applications

Slide 13

Slide 13 text

Spring Boot and Spring Cloud for Legacy Applications

Slide 14

Slide 14 text

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

Slide 15

Slide 15 text

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.

Slide 16

Slide 16 text

Spring Boot and Spring Cloud for Legacy Applications

Slide 17

Slide 17 text

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

Slide 18

Slide 18 text

Spring Boot and Spring Cloud for Legacy Applications

Slide 19

Slide 19 text

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

Slide 20

Slide 20 text

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

Slide 21

Slide 21 text

Strangler Application / Pattern Legacy

Slide 22

Slide 22 text

Strangler Application / Pattern book-service Legacy Proxy /book/** /**

Slide 23

Slide 23 text

Strangler Application / Pattern DEMO

Slide 24

Slide 24 text

• 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

Slide 25

Slide 25 text

Twelve Factor App

Slide 26

Slide 26 text

DEMO

Slide 27

Slide 27 text

• Manual Usage (after all it is “just” configuration) • Add the appropriate listener or @Enable* annotation Introduce Spring Cloud Client : How To

Slide 28

Slide 28 text

DEMO Introduce Spring Cloud Client : How To

Slide 29

Slide 29 text

• 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

Slide 30

Slide 30 text

• 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

Slide 31

Slide 31 text

DEMO Introduce Spring Cloud : How To

Slide 32

Slide 32 text

• 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

Slide 33

Slide 33 text

DEMO Introduce Spring Boot : How To

Slide 34

Slide 34 text

• Dependency Versions • Deprecated or Removed Support • Incompatible libraries • AutoConfiguration Introduce Spring Boot : Challenges

Slide 35

Slide 35 text

• Dependency Versions • Spring is 99% backwards compatible • Check the documentation what changed • Generally also applies to other Spring Portfolio Projects Introduce Spring Boot : Challenges

Slide 36

Slide 36 text

• Deprecated or Removed Support • Locate old sources and include in your own project • Refactor to newer version Introduce Spring Boot : Challenges

Slide 37

Slide 37 text

• Incompatible libraries • Library API changed • Unsupported libraries Introduce Spring Boot : Challenges

Slide 38

Slide 38 text

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

Slide 39

Slide 39 text

DEMO Introduce Spring Boot : How To

Slide 40

Slide 40 text

Twitter: twitter.com/mdeinum YouTube: youtube.com/user/ConspectLive LinkedIn: nl.linkedin.com/in/mdeinum GitHub: github.com/mdeinum SpeakerDeck: speakerdeck.com/mdeinum Learn More. Stay Connected