springone 2016 in a nutshell

49
SpringOne 2016 in a nutshell @JeroenResoort @jdriven_nl Tim te Beek

Upload: jeroen-resoort

Post on 23-Jan-2018

233 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: SpringOne 2016 in a nutshell

SpringOne 2016in a nutshell

@JeroenResoort @jdriven_nlTim te Beek

Page 2: SpringOne 2016 in a nutshell
Page 3: SpringOne 2016 in a nutshell

How is Las Vegas?

Page 4: SpringOne 2016 in a nutshell
Page 5: SpringOne 2016 in a nutshell
Page 6: SpringOne 2016 in a nutshell

How is Las Vegas?It’s Hot! 35 degrees Celsius…

Page 7: SpringOne 2016 in a nutshell

How is Las Vegas?It’s Hot! 35 degrees Celsius… at 05:00 in the morning…

Page 8: SpringOne 2016 in a nutshell

How is Las Vegas?It’s Hot! 35 degrees Celsius… at 05:00 in the morning…

45 degrees Celsius during daytime!

Page 9: SpringOne 2016 in a nutshell
Page 10: SpringOne 2016 in a nutshell

● 2000+ attendees● 184 speakers● Great speakers, great talks● 9 parallel tracks● Superb venue

Page 11: SpringOne 2016 in a nutshell

TodayA variety of subjects

● Spring Boot 1.4● Spring Framework 5.0● PCF Dev● Microservices and DDD● The talent pool● Consumer driven contracts● Spring cloud Sleuth and Zipkin

Page 12: SpringOne 2016 in a nutshell

What’s new in Spring boot 1.4Uses Spring Framework 4.3

Run Unit Tests with only a ‘slice’ of Spring easily

● @WebMvcTest, @DataJpaTest, @JsonTest● Only setup controller for specific test● Setup MockMvc automatically● Less boilerplate code

Page 13: SpringOne 2016 in a nutshell

What’s new in Spring boot 1.4FailureAnalyzer

● Many common failures get easy to read failure messages● You can write your own analyzers

Spring REST Docs

● Combines hand-written documentation written with Asciidoctor and auto-generated snippets produced with Spring MVC Test

● Guarantees your documentation is in line with your API

Page 14: SpringOne 2016 in a nutshell

What’s new in Spring boot 1.4See keynote session by Stephane Nicoll and Josh Long

https://www.youtube.com/watch?v=7U90Lfxatpk

Page 15: SpringOne 2016 in a nutshell

Microservices and Domain Driven DesignMicroservices and DDD go hand in hand

DDD Aggregates are a useful concept when designing microservices

When communicating across contexts you use Events

Forget about ACID and XA transactions

Use event sourcing

Check the talk by Chris Richardson when it comes online!

Page 16: SpringOne 2016 in a nutshell

Spring Framework 5.0Roadmap:

● 5.0 RC1: Dec 2016● 5.0 GA: Q1 2017

Upgrades: JDK8+, Servlets 3.1+, JMS 2.0+, JPA 2.1+, JUnit 5

JDK9 compatibility

Startup performance

Junit 5

Page 17: SpringOne 2016 in a nutshell

Spring Framework 5.0HTTP/2

Lambda-oriented HTTP routing and processing

Reactive streams support Backpressure

Use Spring Reactor or RxJava

Page 18: SpringOne 2016 in a nutshell

Why reactive?

Page 19: SpringOne 2016 in a nutshell

Why reactive?

Page 20: SpringOne 2016 in a nutshell
Page 21: SpringOne 2016 in a nutshell
Page 22: SpringOne 2016 in a nutshell

More on ReactiveDon’t miss the reactive workshop by Bas and Riccardo at JFall!

"Making the paradigm-shift to Reactive Programming with Spring 5 Web Reactive"

Page 23: SpringOne 2016 in a nutshell

Pivotal:

“We Transform How The World Builds Software”

Page 24: SpringOne 2016 in a nutshell

Keynote session: “Help Developers Do What They Love”by Onsi Fakhouri

Summarises quite nicely the main subjects of the conference

Page 25: SpringOne 2016 in a nutshell

How to transform your business into a software business?

Organisation structure

Cultural change

Continuous delivery. Continuously experimenting and taking risk.

Page 26: SpringOne 2016 in a nutshell

How to transform your business into a software business?

ComCast has made this journey, they are now doing 4000 deployments a day

Page 27: SpringOne 2016 in a nutshell

PCF Dev Run a cloud foundry locally from your laptop

Easy to install: download file and execute

Some additional steps required to run offline

To update to a new version you will need to download and install again

Page 28: SpringOne 2016 in a nutshell
Page 29: SpringOne 2016 in a nutshell

PCF Dev Demo time

Page 30: SpringOne 2016 in a nutshell

Using 100% of the talent poolDon’t ignore women and people of other ethnicity

A Tale of Two Ladies: On Generating Opportunity for Women in Tech - Cornelia Davis

Inclusion through Lending Privilege - Anjuan Simmons

Page 31: SpringOne 2016 in a nutshell
Page 32: SpringOne 2016 in a nutshell
Page 33: SpringOne 2016 in a nutshell

Using 100% of the talent poolEducation

Perception

Unconscious bias

Page 34: SpringOne 2016 in a nutshell

Consumer driven contractsInteresting way of defining contracts

See http://martinfowler.com/articles/consumerDrivenContracts.html

Consumer contracts express a subset of the system's business function capabilities in terms of the consumer's expectations of the provider contract.

Page 35: SpringOne 2016 in a nutshell
Page 36: SpringOne 2016 in a nutshell

Consumer driven contractsInteresting way of defining contracts

See http://martinfowler.com/articles/consumerDrivenContracts.html

Consumer contracts express a subset of the system's business function capabilities in terms of the consumer's expectations of the provider contract.

Spring Cloud Contract helps you with that

Page 37: SpringOne 2016 in a nutshell

Spring Cloud ContractSee https://cloud.spring.io/spring-cloud-contract/

Spring Cloud Contract Verifier is a tool that enables Consumer Driven Contract (CDC) development of JVM-based applications. It is shipped with Contract Definition Language (DSL). Contract definitions are used to produce following resources:

● JSON stub definitions to be used by WireMock (HTTP Server Stub) when doing integration testing on the client code (client tests). Test code must still be written by hand, test data is produced by Spring Cloud Contract Verifier

● Acceptance tests (in JUnit or Spock) used to verify if server-side implementation of the API is compliant with the contract (server tests). Full test is generated by Spring Cloud Contract Verifier

Page 38: SpringOne 2016 in a nutshell

Latency analysis and distributed tracing● Service architecture isn’t simple anymore

○ Multiple servers, instances, possible paths

● Troubleshooting becomes murder-mystery○ Is POST /things slow?

○ Where did this happen?

○ Which event was it?

○ Is it abnormal?

● Clues are scattered and hard to relate

Page 39: SpringOne 2016 in a nutshell

Spring Cloud Sleuth - SpanSpan - individual operation, contains timestamped events and tags

Unique, generated id

Page 40: SpringOne 2016 in a nutshell

Spring Cloud Sleuth - TraceTrace - end-to-end latency graph, composed of spans

Another unique, generated id

Page 41: SpringOne 2016 in a nutshell

Spring Cloud Sleuth - Log correlationLogs get Mapped Diagnostic Context tags of span and trace IDs

Correlate requests across services with Logstash / Kibana

Send traces to Zipkin for latency visualization

Page 42: SpringOne 2016 in a nutshell

Spring Cloud Sleuth - How to1. Add `spring-cloud-starter-sleuth` to classpath

2. Check instrumentationa. Out of the box: HTTP, Messaging, Feign, Zuul, Hystrics, @Async, Runnable/Callable

3. Send to Zipkin with `spring-cloud-starter-sleuth-zipkin`a. HTTP to localhost:9411 by default

4. Tweak sampling percentagea. 10% by default

Page 43: SpringOne 2016 in a nutshell

Visualize traces with Zipkin

Page 44: SpringOne 2016 in a nutshell

Zipkin - How toJust a jar, available from GitHub

Data stored in memory, cassandra, elasticsearch or mysql

Available as-a-service in PCF

Page 45: SpringOne 2016 in a nutshell

Sleuth / Zipkin summary● Log correlation allows you to match logs for a given trace

● Distributed tracing allows you to quickly see latency issues in your system

● Zipkin is a great tool to visualize the latency graph and system dependencies

● Spring Cloud Sleuth integrates with Zipkin and grants you log correlation

Page 46: SpringOne 2016 in a nutshell

What more?Spring cloud task and Spring cloud data flow (evolution of Spring Batch and Spring XD)

Google and Microsoft promoting their cloud platforms as cloud foundry compatible

Page 47: SpringOne 2016 in a nutshell

Watch listYoutube channel from Pivotal contains keynotes sessions and some other talks:https://www.youtube.com/watch?v=xdw_9dADM-4&list=PLAdzTan_eSPQ1fuLSBhyB4eEZF7JQM0Mx

Recommended talks:

● Simplifying the Future - Adrian Cockcroft - https://www.youtube.com/watch?v=DGK6jjamzfY● A Tale of Two Ladies: On Generating Opportunity for Women in Tech - Cornelia Davis -

https://www.youtube.com/watch?v=2lFv3qknbqQ● Cloud Native Java - Josh Long - https://www.youtube.com/watch?v=5q8B6lYhFvE● Developing microservices with aggregates - Chris Richardson ● Consumer Driven Contracts and your microservice architecture - Marcin Grzejszczak● From Imperative To Reactive Web Apps - Rossen Stoyanchev● A lot more...

(hope they come online soon!)

Page 48: SpringOne 2016 in a nutshell

“Open source is a positive-sum game”Sam Ramji, CEO at Cloud Foundry

Page 49: SpringOne 2016 in a nutshell

SpringOne 2016in a nutshell

@JeroenResoort @jdriven_nlTim te Beek