Surviving SOA

74
Surviving SOA Delivering (somewhat) continuously on a hostile planet @TomAkehurst

Transcript of Surviving SOA

!

Surviving SOA Delivering (somewhat) continuously on a hostile planet!

!@TomAkehurst

You can’t always get what you want…!

The OrgLarge, horizontally sliced programme

The OrgLarge, horizontally sliced programme !Fixed-price contracts (inflexibility)

The OrgLarge, horizontally sliced programme !Fixed-price contracts (inflexibility) !DevOps and testers in separate teams

The OrgLarge, horizontally sliced programme !Fixed-price contracts (inflexibility) !DevOps and testers in separate teams !Theory X (leading to endemic risk/change aversion)

The Process“Agile” but….

The Process“Agile” but…. !Lack of feedback and improvement mechanisms

The Process“Agile” but…. !Lack of feedback and improvement mechanisms !Enabling technical practices neglected

The Process“Agile” but…. !Lack of feedback and improvement mechanisms !Enabling technical practices neglected !Very infrequent live releases, tons of WIP

The Process“Agile” but…. !Lack of feedback and improvement mechanisms !Enabling technical practices neglected !Very infrequent live releases, tons of WIP !Long cycle times, but nobody seemed to notice

The TechnologyBig vendor SOA + BPM !Old skool J2EE containers !!

The TechnologyBig vendor SOA + BPM !Old skool J2EE containers !SOAP !

The TechnologyBig vendor SOA + BPM !Old skool J2EE containers !SOAP !Shoddy inherited codebase !!

Database

Database

ETL

Database

The SOAP Layer

ETL

Database

The SOAP Layer

The MoreSOAP Layer

ETL

Database

The SOAP Layer

The MoreSOAP Layer

ETL

Database

The SOAP Layer

The MoreSOAP Layer

ETL

Our thing

The PipelineNo pre-test integration environments !Very locked-down test environments !!!!

The PipelineNo pre-test integration environments !Very locked-down test environments !Separate test team per test environment - ReleaseTesting3 !!!

The PipelineNo pre-test integration environments !Very locked-down test environments !Separate test team per test environment - ReleaseTesting3

!Test automation team building vast Selenium suite !

ENERGIZED WORK / Metal Box Factory Unit 323 30 Great Guildford Street London SE1 0HS / www.energizedwork.com

!!!

Survival!!

What does (as) good (as we can manage) look like?

What does (as) good (as we can manage) look like?Keep our own cycle time down, but don’t locally optimise

What does (as) good (as we can manage) look like?Keep our own cycle time down, but don’t locally optimise !Minimise the risks we can control, manage those we can’t

What does (as) good (as we can manage) look like?Keep our own cycle time down, but don’t locally optimise !Minimise the risks we can control, manage those we can’t !Don’t compromise on quality (even if others are)

The BasicsTDD + ATDD !Trunk-based development !Build discipline !Small batches (commits, pushes, releases)

Service Mocking

Service MockingFast functional tests

Service MockingFast functional tests !Parallel development with service teams

Service MockingFast functional tests !Parallel development with service teams !Reduce need for a dev/int environment

Service MockingFast functional tests !Parallel development with service teams !Reduce need for a dev/int environment !Fault injection

Sham data

Sham dataHigh fidelity demos !Serendipitous bug discovery + better exploratory testing

Sham dataHigh fidelity demos !Serendipitous bug discovery + better exploratory testing !Generative-style tests

App JVM

App

Hermetic Testing

Test JVM

WireMock

SpockSham

Geb/Selenium

phantomjsGenerate SOAP stubs

SOAP

Templates

SOAP minus WSDL

SOAP minus WSDLgroovy-ws-lite - XML builders for SOAP messages, not generated source

SOAP minus WSDLgroovy-ws-lite - XML builders for SOAP messages, not generated source !Tolerant reader

SOAP minus WSDLgroovy-ws-lite - XML builders for SOAP messages, not generated source !Tolerant reader !Reduced need for synchronised releases

SOAP minus WSDLgroovy-ws-lite - XML builders for SOAP messages, not generated source !Tolerant reader !Reduced need for synchronised releases !Use WSDL for unit tests (with off switch)

Telemetry

TelemetrySOAP request/response history

TelemetrySOAP request/response history !Metrics

TelemetrySOAP request/response history !Metrics !Service check

TelemetrySOAP request/response history !Metrics !Service check !Scenario (integration) tests

Exploratory Testing as Peer ReviewSneaky tunnel to the test environment !Guided by common gotchas list !Reduce pressure on bottleneck - the testers

Hermetic Demo EnvironmentLaptop install via USB key !Sham data for realism !Early feedback

Did it work?We didn’t work weekends (everyone else did)

Did it work?We didn’t work weekends (everyone else did) !Able to react quickly to late, complex changes

Did it work?We didn’t work weekends (everyone else did) !Able to react quickly to late, complex changes !Defect rate so low that business sponsors thought there was a reporting problem

Did it work?Integration bugs due to bad assumptions about semantics persisted !!!

Did it work?Integration bugs due to bad assumptions about semantics persisted !Manual testing remained a bottleneck

Did it work?Integration bugs due to bad assumptions about semantics persisted !Manual testing remained a bottleneck !Failed to significantly influence practices outside our team

ENERGIZED WORK / Metal Box Factory Unit 323 30 Great Guildford Street London SE1 0HS / www.energizedwork.com

!!!

Next time we’ll…!!

…shun container securityTight coupling !Frequent nasty surprises on deployment to test environments !Hard to mock effectively for testing

…keep the build time downHeavy-heavy-heavyweight framework (Grails) !Selenium overuse !Build breakage frequency increased with duration !Temptation to skimp on new test cases !Adding concurrency afterwards is hard

…choose a better optimised tech stack

Wire protocol supporting loose coupling and evolution !Small framework - fast startup, small footprint under no load !Embedded container - fast, simple deployments, no compatibility hassles !Minimise need for browser-driven tests

If you only take away one thing

Don’t settle for the lowest common denominator - CD can be practiced in hostile environments, and it’s worth it!

ENERGIZED WORK / Metal Box Factory Unit 323 30 Great Guildford Street London SE1 0HS / www.energizedwork.com

!!!

Ta!!!!!

@TomAkehurst!https://github.com/tomakehurst