do i still hate soa?

157
Do I still hate SOA? JavaZone Johannes Brodwall, Steria Organized Architect Steria Norway

Upload: riva

Post on 23-Feb-2016

33 views

Category:

Documents


0 download

DESCRIPTION

Do I still hate SOA?. JavaZone Johannes Brodwall, Steria Organized Architect Steria Norway. Crazy trucker coder is right. What do I care about ?. People ( def : Users and programmers). In large projects ( def : 10-100 people ). In complex orgs - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Do I still hate SOA?

Do I still hate SOA?

JavaZoneJohannes Brodwall, Steria Organized Architect

Steria Norway

Page 2: Do I still hate SOA?
Page 3: Do I still hate SOA?
Page 4: Do I still hate SOA?
Page 5: Do I still hate SOA?

Crazy trucker coder is right

Page 6: Do I still hate SOA?
Page 7: Do I still hate SOA?

What do I care about?

Page 8: Do I still hate SOA?
Page 9: Do I still hate SOA?
Page 10: Do I still hate SOA?

People(def: Users and programmers)

Page 11: Do I still hate SOA?

In large projects(def: 10-100 people)

Page 12: Do I still hate SOA?

In complex orgs(def: Where integration is

paramount)

Page 13: Do I still hate SOA?

(Frustration)

Page 14: Do I still hate SOA?

(Joy)

Page 15: Do I still hate SOA?

How we don’t want our projects to beArchitecture impacts people

Teams Produce Business-valueFeature oriented teams Simple technology

Reference architecture

Reuse Costs and benefits

Strategic and tactical

Page 16: Do I still hate SOA?

J Random

Consider John Random Developer

Page 17: Do I still hate SOA?

Rules Engine Team

Front End Team

Service Layer Team

PM

J Random

Page 18: Do I still hate SOA?

Jira

J Random

”User gets DataBindingException

when submitting payment (see attached SOAP msg)”

Page 19: Do I still hate SOA?

Test server

Payment svc

J Random

Reproduce…

Page 20: Do I still hate SOA?

Test server

Payment svc

J Random

Page 21: Do I still hate SOA?

J Random

Payment Service

Payment XML

Payment DTO

Domain

Rules DTO

Rules XML

Rules

Which of the layers is the bug in…?

Page 22: Do I still hate SOA?

Rules Engine Team

Front End Team

Service Layer Team

PM

J Random

You sent a new field: currency

Page 23: Do I still hate SOA?

Rules Engine Team

Front End Team

Service Layer Team

PM

J Random

You sent a new field: currency

Didn’t you get the memo?

Page 24: Do I still hate SOA?

J Random

Sigh!

Payment Service

Payment XML

Payment DTO

Domain

Rules DTO

Rules XML

Rules

Page 25: Do I still hate SOA?

J Random

Test serverNew version

Page 26: Do I still hate SOA?

J Random

Test server

New version

Page 27: Do I still hate SOA?

Test server

New version

J Random

Let’s test it out

Page 28: Do I still hate SOA?

Test server

J Random

Okay

Okay

OkayOkay

OkayOkay

Okay

Okay

Not okay

It look good. Waaait….

Page 29: Do I still hate SOA?

Test server

J Random

Okay

Okay

OkayOkay

OkayOkay

Okay

Okay

Not okay

Duh! Null pointer exception!

Page 30: Do I still hate SOA?

J Random

Test serverNew version

Page 31: Do I still hate SOA?

J Random

Test server

New version

How did it get to this?

Page 32: Do I still hate SOA?

J Random

What does the program do?

I’m just a small cog in a big

machine

What’s up with all this data shuffling?

Page 33: Do I still hate SOA?

Bad architecture

Page 34: Do I still hate SOA?

UI UI UI UI

Service Service Service Service

Data Data Data Data

Reused service Reused library

Page 35: Do I still hate SOA?

Bad architecture

Technol-orgy Reuse fixation

Team per component

Suffering

Page 36: Do I still hate SOA?

Rules Engine Team

Front End Team

Service Layer Team

PM

Of course the Front End guys can deal with

an empty list

Page 37: Do I still hate SOA?

Rules Engine Team

Front End Team

Service Layer Team

PM

I better check that field is

present

I better check that field is

presentI better check that field is

present

Page 38: Do I still hate SOA?

Rules Engine Team

Front End Team

Service Layer Team

PMI wonder if anyone will

use this

Page 39: Do I still hate SOA?

Rules Engine Team

Front End Team

Service Layer Team

PM

Done with A soon?

Page 40: Do I still hate SOA?

Rules Engine Team

Front End Team

Service Layer Team

PM

Done with A soon?

I’m done, I just have to wait for

the rules engine!

Page 41: Do I still hate SOA?

Rules Engine Team

Front End Team

Service Layer Team

PM

Done with A soon?

I’m done, I just have to wait for

the rules engine!… and then test it

Page 42: Do I still hate SOA?

Rules Engine Team

Front End Team

Service Layer Team

PM

Done with A soon?

I’m done, I just have to wait for

the rules engine!… and then test it

… and then fix that tiny bug

Page 43: Do I still hate SOA?

Rules Engine Team

Front End Team

Service Layer Team

PM

Done with A soon?

I’m done, I just have to wait for

the rules engine!

I better hurry with B, everyone’s

waiting

Page 44: Do I still hate SOA?

Bahamas!

Rules Engine Team

Overworked!

Proud dad!

Front End Team

Service Layer Team

PM

Baby

!

Page 45: Do I still hate SOA?

Bahamas!

Rules Engine Team

Overworked!

Proud dad!

Front End Team

Service Layer Team

PM

Can you guys help out?

Baby

Page 46: Do I still hate SOA?

Bahamas!

Rules Engine Team

Overworked!

Proud dad!

Front End Team

Service Layer Team

PM

Can you guys help out?

Baby

Would love to help, but I don’t

know rules engine

Overworked!

Page 47: Do I still hate SOA?

Rules Engine Team

Front End Team

Service Layer Team

PM

This iteration, Product Owner just wants to improve the UI

!

Page 48: Do I still hate SOA?

There is an alternative!

Page 49: Do I still hate SOA?

(There are many)

Page 50: Do I still hate SOA?

(And this is mine)

Page 51: Do I still hate SOA?

Organization Architecture

Page 52: Do I still hate SOA?

UI UI UI UI

Service Service Service Service

Data Data Data Data

Reused service Reused library

Page 53: Do I still hate SOA?

UI UI UI UI

Service Service Service Service

Data Data Data Data

Reused service Reused library

Page 54: Do I still hate SOA?

A feature teamIs connected to a userHas a reference stackOwns the whole stack

Page 55: Do I still hate SOA?

User:Human or machine

Page 56: Do I still hate SOA?

GUI

Logic

Data

Service

Page 57: Do I still hate SOA?

Machines are people, too!

Page 58: Do I still hate SOA?

Simplicity

Page 59: Do I still hate SOA?

SimplicityAvoid technolorgy

(My reference architecture)

Page 60: Do I still hate SOA?

Fewer deployed artifacts

Page 61: Do I still hate SOA?

Executable jar file

App Server (Jetty jar)

Web application (war)

ClientClient Jar (Java

Web Start)

Page 62: Do I still hate SOA?

Fewer maven modules

Page 63: Do I still hate SOA?

Server WAR

Core classes

Client JAR

Page 64: Do I still hate SOA?

Fewer external dependencies

Page 65: Do I still hate SOA?

Control instansiation

Page 66: Do I still hate SOA?

No DTO

Page 67: Do I still hate SOA?

Embedded app server

Page 68: Do I still hate SOA?
Page 69: Do I still hate SOA?

Boring choices

Page 70: Do I still hate SOA?

Messaging

MigrationsHibernate

Deployment

Packaging

FitNesse

Database

SOAP over httpEntitieshttp remoting

MonitoringUnit tests

Commands

Page 71: Do I still hate SOA?

Scenarios

Page 72: Do I still hate SOA?

UI overview

Page 73: Do I still hate SOA?

Application Frame [http://server:8088/service]Menu

Work area

Toolbar

PersonWindowPersonWindowWindow 2Window 2Etc.

Page 74: Do I still hate SOA?

UI calls server

Page 75: Do I still hate SOA?

TODO: Code action listener calls server

Page 76: Do I still hate SOA?

UI server

Page 77: Do I still hate SOA?

TODO: Command calls repo

Page 78: Do I still hate SOA?

TODO: Repository interface

Page 79: Do I still hate SOA?

RepositoryHibernateThe real dealVery slow startup

HashMapIn memory fake

Quick startupUsed for unit tests

Page 80: Do I still hate SOA?

TODO: Repository interface

Page 81: Do I still hate SOA?
Page 82: Do I still hate SOA?

private Specification<Person> getSpecification() { return new FilterSpecification<Person>() { @Override public void populate(EntityFilter filter) { filter.propertyEqualsOrNull( "country", country); filter.propertyMatchesOrNull( "name", namePattern); } };}

Page 83: Do I still hate SOA?
Page 84: Do I still hate SOA?

@RunWith(RepositoryTestRunner.class)public class PersonWindowTest { private Repository repository; private PersonWindow personWindow; public PersonWindowTest(Repository repo) { this.repository = repo; this.personWindow = new PersonWindow(repo); }

Page 85: Do I still hate SOA?

@Testpublic void should_find_people() { Person person = new Person(“John Random"); repository.insert(person); personWindow.getSearchButton().doClick(); assertEquals(personWindow.getTableCell(0,1), person.getName());}

Page 86: Do I still hate SOA?
Page 87: Do I still hate SOA?
Page 88: Do I still hate SOA?

Integration

Page 89: Do I still hate SOA?

Transactional

File System File Scanner File Writer Message

Responder Repository

Scan

Move to tmp

Next message

CommitDelete file

Find data

Write response

Transactional

Next responseWrite to tmp

Commit

Move to targetTransactional

Page 90: Do I still hate SOA?

Hexagonal architecture

Page 91: Do I still hate SOA?

Application

UI

FileSystmAdapter

HttpSoapAdapter

Hibernate

Repository

Entities

Command

Page 92: Do I still hate SOA?

Dissent

Page 93: Do I still hate SOA?

Poll vs pushProgrammer provides proof

Page 94: Do I still hate SOA?

SQLBest requirement fit

Page 95: Do I still hate SOA?

Server abstractionDevelopers show the way

Page 96: Do I still hate SOA?

SpecificationDevelopers required better

abstractions

Page 97: Do I still hate SOA?

HibernateGo to Christin’s lightning talk

(T -24hrs)

Page 98: Do I still hate SOA?

Key points

Page 99: Do I still hate SOA?

Ubiquitious entitiesGeneric repositoryCommand oriented

Page 100: Do I still hate SOA?

A feature teamIs connected to a userHas a reference stackOwns the whole stack

Page 101: Do I still hate SOA?

Reuse

Page 102: Do I still hate SOA?

Don’t make

Strategic decisionbased on

Tactical reasons

Page 103: Do I still hate SOA?

Value of reuse

Page 104: Do I still hate SOA?

Value of reuse =Cost of new dev – cost of reuse

Page 105: Do I still hate SOA?

Value of reuse =Cost of new dev

-cost of reusability - cost of reusing

- cost of governance

Page 106: Do I still hate SOA?

Relative cost of writing for reuse:125%-300%

Page 107: Do I still hate SOA?

Relative cost of writing for reuse:125%-300%

Publishing

Input validation

Wider usage

Documentation

Testing

Page 108: Do I still hate SOA?

Relative cost of reuse:10%-40%

Page 109: Do I still hate SOA?

Relative cost of reuse:10%-40%

Learning

Not finding

Bugs

Finding

Adapting

Page 110: Do I still hate SOA?

Surface to volume ratio

Page 111: Do I still hate SOA?

Reuse governance

Page 112: Do I still hate SOA?

Client A 1.0 Client B 1.0

Enterprise Payment

Page 113: Do I still hate SOA?

Client A 1.0 Client B 1.0

Enterprise Payment

Page 114: Do I still hate SOA?

Client A 2.0 Client B 1.0

Enterprise Payment 2.0

Page 115: Do I still hate SOA?

Client A 2.0 Client B 1.0

Enterprise Payment 2.0

Page 116: Do I still hate SOA?

Client A 1.0 Client B 1.0

Service 1.0

Stable (AKA dead) service

Page 117: Do I still hate SOA?

Client A 2.0 Client B 1.0

Service 2.0

Service1.0

Library reuse

Page 118: Do I still hate SOA?

Client A 2.0 Client B 1.0

Service 2.0

Adapter

Multi version service

Page 119: Do I still hate SOA?

Client A 2.0 Client B 1.0

Magic box!! !

Service 2.0

Service bus

Page 120: Do I still hate SOA?

Value of reuse =Cost of new dev – cost of reuse

Page 121: Do I still hate SOA?

High value

Page 122: Do I still hate SOA?
Page 123: Do I still hate SOA?

https://www.paypal.com/cgi-bin/webscr?business=paypal%40smidig.no&cmd=_cart&upload=1&currency_code=N

OK&notify_url=http%3A%2F%2Fstagingsmidig.heroku.com

%2Fpayment_notifications&return=http%3A%2F%2Fstagingsmidig.heroku.com%2Fusers

%2F485&invoice=2011t-486&amount_1=10.0&item_name_1=Earlybird-

billett+til+Smidig+2011&item_number_1=1&quantity_1=1

Page 124: Do I still hate SOA?

EDIFACT

Page 125: Do I still hate SOA?

EDIFACT(The UN punishes those

who speak ill of XML)

Page 126: Do I still hate SOA?
Page 127: Do I still hate SOA?

High value

Page 128: Do I still hate SOA?

Medium value

Page 129: Do I still hate SOA?

java.util.Collection

Page 130: Do I still hate SOA?

Hibernate, Spring

Page 131: Do I still hate SOA?
Page 132: Do I still hate SOA?

Medium value

Page 133: Do I still hate SOA?

Low value

Page 134: Do I still hate SOA?

Apache commons

Page 135: Do I still hate SOA?

java.net.HttpURLConnection

Page 136: Do I still hate SOA?

Low value

Page 137: Do I still hate SOA?

Negativ value

Page 138: Do I still hate SOA?

Dozer

Page 139: Do I still hate SOA?

The library the other team made because

they didn’t like Dozer

Page 140: Do I still hate SOA?

The ”Save Customer” service

Page 141: Do I still hate SOA?

Negativ value

Page 142: Do I still hate SOA?

Strategic reuse

Page 143: Do I still hate SOA?

Strategic reuseHigh value

Often servicesNew functionality

Page 144: Do I still hate SOA?

Tactical reuse

Page 145: Do I still hate SOA?

Tactical reuseLow value

Often componentReduce cost

Opportunistic

Page 146: Do I still hate SOA?

Don’t make

Strategic decisionbased on

Tactical reasons

Page 147: Do I still hate SOA?

Conclusion

Page 148: Do I still hate SOA?

What does this have to do with SOA?

Page 149: Do I still hate SOA?

What does this have to do with SOA?(Very little)

Page 150: Do I still hate SOA?

Architectural choicesAffect peopleConway’s law

Page 151: Do I still hate SOA?

ReuseTactical vs strategic

Page 152: Do I still hate SOA?

Feature oriented team

Page 153: Do I still hate SOA?

As a programmer1. Meet the user

2. Own the whole stack3. Speak your mind

Page 154: Do I still hate SOA?

As an architect1. Organize teams per feature

2. Simple reference architecture3. Welcome dissent

Page 155: Do I still hate SOA?

Do you agree?

Page 156: Do I still hate SOA?

You haven’t learned a thing!

Page 157: Do I still hate SOA?

Please [email protected]

http://johannesbrodwall.comhttp://sterkblanding.no

http://twitter.com/jhannes