Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "Do I still hate SOA? JavaZone Johannes Brodwall, Steria Organized Architect Steria Norway."— Presentation transcript:

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

2

3

4

5 Crazy trucker coder is right

6

7 What do I care about?

8

9

10 People (def: Users and programmers)

11 In large projects (def: people)

12 In complex orgs (def: Where integration is paramount)

13 (Frustration)

14 (Joy)

15 How we don’t want our projects to be Architecture impacts people Teams Produce Business-value Feature oriented teams Simple technology Reference architecture Reuse Costs and benefits Strategic and tactical

16 J Random Consider John Random Developer

17 Rules Engine Team Front End Team Service Layer Team PM J Random

18 Jira J Random ”User gets DataBindingException when submitting payment (see attached SOAP msg)”

19 Test server Payment svc J Random Reproduce…

20 Test server Payment svc J Random

21 Payment Service Payment XML Payment DTO Domain Rules DTO Rules XML Rules Which of the layers is the bug in…?

22 Rules Engine Team Front End Team Service Layer Team PM J Random You sent a new field: currency

23 Rules Engine Team Front End Team Service Layer Team PM J Random You sent a new field: currency Didn’t you get the memo?

24 J Random Sigh! Payment Service Payment XML Payment DTO Domain Rules DTO Rules XML Rules

25 J Random Test server New version

26 J Random Test server New version

27 Test server New version J Random Let’s test it out

28 Test server J Random Okay Not okay It look good. Waaait….

29 Test server J Random Okay Not okay Duh! Null pointer exception!

30 J Random Test server New version

31 J Random Test server New version How did it get to this?

32 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?

33 Bad architecture

34 UI Service Data Reused service Reused library

35 Bad architecture Technol-orgy Reuse fixation Team per component Suffering

36 Rules Engine Team Front End Team Service Layer Team PM Of course the Front End guys can deal with an empty list

37 Rules Engine Team Front End Team Service Layer Team PM I better check that field is present

38 Rules Engine Team Front End Team Service Layer Team PM I wonder if anyone will use this

39 Rules Engine Team Front End Team Service Layer Team PM Done with A soon?

40 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!

41 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

42 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

43 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

44 Bahamas! Rules Engine Team Overworked! Proud dad! Front End Team Service Layer Team PM Baby ! !

45 Bahamas! Rules Engine Team Overworked! Proud dad! Front End Team Service Layer Team PM Can you guys help out? Baby

46 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!

47 Rules Engine Team Front End Team Service Layer Team PM This iteration, Product Owner just wants to improve the UI ! !

48 There is an alternative!

49 (There are many)

50 (And this is mine)

51 Organization  Architecture

52 UI Service Data Reused service Reused library

53 UI Service Data Reused service Reused library

54 A feature team Is connected to a user Has a reference stack Owns the whole stack

55 User: Human or machine

56 GUI Logic Data Service

57 Machines are people, too!

58 Simplicity

59 Avoid technolorgy (My reference architecture)

60 Fewer deployed artifacts

61 Executable jar file App Server (Jetty jar) Web application (war) Client Client Jar (Java Web Start)

62 Fewer maven modules

63 Server WAR Core classes Client JAR

64 Fewer external dependencies

65 Control instansiation

66 No DTO

67 Embedded app server

68

69 Boring choices

70 Messaging Migrations Hibernate Deployment Packaging FitNesse Database SOAP over http Entities http remoting Monitoring Unit tests Commands

71 Scenarios

72 UI overview

73 Application Frame [http://server:8088/service] Menu Work area Toolbar PersonWindow Window 2 Etc.

74 UI calls server

75 TODO: Code action listener calls server

76 UI server

77 TODO: Command calls repo

78 TODO: Repository interface

79 Repository Hibernate The real deal Very slow startup HashMap In memory fake Quick startup Used for unit tests

80 TODO: Repository interface

81

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

83

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

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

86

87

88 Integration

89 Transactional File System File Scanner File Writer Message Responder Repository Scan Move to tmp Next message Commit Delete file Find data Write response Transactional Next response Write to tmp Commit Move to target Transactional

90 Hexagonal architecture

91 Application UI FileSystm Adapter FileSystm Adapter HttpSoap Adapter HttpSoap Adapter Hibernate Repository Entities Command

92 Dissent

93 Poll vs push Programmer provides proof

94 SQL Best requirement fit

95 Server abstraction Developers show the way

96 Specification Developers required better abstractions

97 Hibernate Go to Christin’s lightning talk (T -24hrs)

98 Key points

99 Ubiquitious entities Generic repository Command oriented

100 A feature team Is connected to a user Has a reference stack Owns the whole stack

101 Reuse

102 Don’t make Strategic decision based on Tactical reasons

103 Value of reuse

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

105 Value of reuse = Cost of new dev -cost of reusability - cost of reusing - cost of governance

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

107 Relative cost of writing for reuse: 125%-300% Publishing Input validation Wider usage Documentation Testing

108 Relative cost of reuse: 10%-40%

109 Relative cost of reuse: 10%-40% Learning Not finding Bugs Finding Adapting

110 Surface to volume ratio

111 Reuse governance

112 Client A 1.0 Client B 1.0 Enterprise Payment

113 Client A 1.0 Client B 1.0 Enterprise Payment

114 Client A 2.0 Client B 1.0 Enterprise Payment 2.0

115 Client A 2.0 Client B 1.0 Enterprise Payment 2.0

116 Client A 1.0 Client B 1.0 Service 1.0 Stable (AKA dead) service

117 Client A 2.0 Client B 1.0 Service 2.0 Service1.0 Library reuse

118 Client A 2.0 Client B 1.0 Service 2.0 Adapter Multi version service

119 Client A 2.0 Client B 1.0 Magic box!! ! Service 2.0 Service bus

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

121 High value

122

123 https://www.paypal.com/cgi- bin/webscr?business=paypal%40smidig.no&cmd= _cart&upload=1¤cy_code=NOK¬ify_url= http%3A%2F%2Fstagingsmidig.heroku.com%2Fpa yment_notifications&return=http%3A%2F%2Fstagi ngsmidig.heroku.com%2Fusers%2F485&invoice=2 011t-486&amount_1=10.0&item_name_1=Earlybird- billett+til+Smidig+2011&item_number_1=1&quantit y_1=1

124 EDIFACT

125 (The UN punishes those who speak ill of XML)

126

127 High value

128 Medium value

129 java.util.Collection

130 Hibernate, Spring

131

132 Medium value

133 Low value

134 Apache commons

135 java.net.HttpURLConnection

136 Low value

137 Negativ value

138 Dozer

139 The library the other team made because they didn’t like Dozer

140 The ”Save Customer” service

141 Negativ value

142 Strategic reuse

143 High value Often services New functionality

144 Tactical reuse

145 Low value Often component Reduce cost Opportunistic

146 Don’t make Strategic decision based on Tactical reasons

147 Conclusion

148 What does this have to do with SOA?

149 (Very little)

150 Architectural choices Affect people Conway’s law

151 Reuse Tactical vs strategic

152 Feature oriented team

153 As a programmer 1.Meet the user 2.Own the whole stack 3.Speak your mind

154 As an architect 1.Organize teams per feature 2.Simple reference architecture 3.Welcome dissent

155 Do you agree?

156 You haven’t learned a thing!

157 Please disagree


Download ppt "Do I still hate SOA? JavaZone Johannes Brodwall, Steria Organized Architect Steria Norway."

Similar presentations


Ads by Google