Presentation is loading. Please wait.

Presentation is loading. Please wait.

Why I hate (the hype about) SOA What is the SOA business case? SOA $$$$

Similar presentations


Presentation on theme: "Why I hate (the hype about) SOA What is the SOA business case? SOA $$$$"— Presentation transcript:

1 Why I hate (the hype about) SOA What is the SOA business case? SOA $$$$

2 Prelude – what is wrong with this code? public Collection findByPattern(String namePattern) throws SQLException { Connection conn = DriverManager.getConnection(this.url, this.username, this.password); Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery( "SELECT name FROM name_table WHERE name like '" + namePattern + "'"); Collection result = new ArrayList(); while (rs.next()) { result.add(rs.getString(1)); } conn.close(); return result; }

3 Summary! Use connection pooling! Avoid SQL injection! Don’t leak the bloody connections! Every time you leak a connection… God kills a kitten. Please: Think of the kitten!

4 Correct code! public Collection findByPattern(String namePattern) { String query = "SELECT name FROM name_table WHERE name like ?"; Object[] params = new Object[] { namePattern }; return jdbcTemplate.query(query, params, new RowMapper() { public Object mapRow(ResultSet rs, int rowNum) throws SQLException { return rs.getString(1); } }); }

5 Now: To the agenda of the day! What is SOA? Overdesign SOA promises –Integration –Orchestration –Reuse BBS architecture Lessons learned

6 Is SOA important? “Gartner projects that ‘by 2008, more than 75 percent of then-current application packages either will be natively SOA or will expose SOA interfaces through a wrapping layer of interfaces.’ ” [InformationWeek] The next (current) gold rush is in B2B (do I address this?)

7 What is SOA? SOA is ”A collection of Services that communicate with each other” [Cryer.com] ”[SOA] is an integrated software infrastructure and design approach, leveraging Web computing standards, for delivering business functions as shared and reusable services.” [sun] ”SOA is web services” [unattributed] ”blah, blah,blah, SOA is described, asynchronous, remote, loosly coupled, orchistrated, standard- based...” [someone fairly smart] Loose coupling

8 Fowler on SOA “I've heard people say the nice thing about SOA is that it separates data from process, that it combines data and process, that it uses web standards, that it's independent of web standards, that it's asynchronous, that it's synchronous, that the synchronicity doesn't matter.... “ http://martinfowler.com/bliki/ServiceOrientedAmbiguity.html

9 Three doors marked SOA

10 Why SOA? Business strategy: –Focus on service delivery (agile?) Technical strategy: –Focus on integration: New applications quickly, reuse old applications –and orchestration: Modelling the business (”even a business person can do it!”) Market strategy –Everything that’s good -> everything we sell (this is the SOA trap) –Consulting services (”non-technical architects”) –”Gartner architecture”

11 The SOA stack Orchestration Access Layer Exposed Source system Described

12 The vendor stack (marchitecture) BPEL, BPMN JBI SOAP Source system WSDL A service in the SOA world seems to contain the usual layer upon layer of gunk. At the lowest level we have our meat, the bit that actually does Stuff. This can be EJB or whatnot. Next up we have BPEL (I dozed off briefly so I really don't remember how the two tie together), then above that we have that old dead horse, web services. - The BileBlog A service in the SOA world seems to contain the usual layer upon layer of gunk. At the lowest level we have our meat, the bit that actually does Stuff. This can be EJB or whatnot. Next up we have BPEL (I dozed off briefly so I really don't remember how the two tie together), then above that we have that old dead horse, web services. - The BileBlog

13 Claimed SOA(t) advantages Integration Orchestration Reuse I am not going to talk about –Synchronous/asynchronous –The horrors of XSLT –Enterprise service bus (on queue to rule them all…)

14 Integration: Web Service Alias “ ” Promised benefits: –Integration between various platforms Problems –Service qualities: Reliability, Security, Asynchrony, Transaction –Platform independence is a truth with modifications –Competing standards (few implementations) Dangers –Performance –Synchronous web services –Limited applicability ”The worst possible way of implementing SOA, is using web services” - Kaare Nilsen, SOA expert, ObjectWare

15 Orchestration: Example

16 Orchestration (and a little ESB) Promised benefits: –Visual modeling of workflow Problems: –Most applications not applicable for workflow! –Visual != Simple –Most architects can’t design asynchronously The two golden truths about diagramming: Communicative diagrams can’t be used to generate code. Diagrams generated from code are mostly useless. BPEL will fail for the same reasons as CASE ”The only problem with buses is that they never come along when you want them, and when they do 2 come at the same time.” Posted by Anonymous on the BileBlog

17 Reuse: Web services wrappers Design for reuse by the world is wasteful Reuse by remote interfaces is inferior Exposing services that were not designed for it is extremely risky: –Security (e.g. SQL injection) –Scalability (e.g. connection pooling) –Robustness (e.g. correct error handling) Your code has hundreds of these defects!

18 Designing with SOA… Hard to design correctly Many existing services are “in-line” DAOs Designing for asynchrony is hard (data-access, workflow) Building coarse-grained is hard

19 Final fallacy: Firewalls Why do we have firewalls? Are SOA applications secure? So… do we need “SOA firewalls”? <WEB SERVICES>

20 Conclusion SOA has a fairly substantial cost Don’t use it if you don’t need it! You probably don’t need it When do you need it? –If you are Amazon, ebay, or google –If your customers are paying you for it

21 BBS architecture Slides not to be published

22 BBS architecture Background: Replacing mainframe batch applications written in COBOL with Java Requirements –Robustness –Security –Scability (roughly quantified) –Operatability (quanitified) –Maintainability (quantified)

23 At a glance

24 Some nice tidbits Web layer –Co-located with business layer –Standardized dialogs and (MVC) controllers (based on RoR) Batch layer –Message oriented (scalable, robust, flexible) –Transparent Heavy focus on domain layer

25 Workflow design All exchanges RobustInOnly All exchanges deliver a Domain Object External integration is segregated in adapter classes –Primary files – everything we get in is from files Result: All service call is done through simple java object calls

26 Transparent claim check

27 Dependency injection Realizes SOA vision of loose coupling Interfaces are loosely coupled –More dynamic interfaces can be an anti-pattern Endpoints are specified by Spring configuration –Implies ”static” routing – but this is seldom a problem! –Dynamic routing is dumb in many instances

28 Dependency Injection

29 Aspect Oriented Services What can be realized as services What is missing from Web Services today –Transactions –Reliability –Security The field of AOP is largely unexplored –Billing…

30 Aspects Progress tracking Exception management Billing (experimental) Statistics Debugging Exception collation (future)

31 How do we get the SOA benefits? Integration –Standardized protocols (Bankens Standardiseringskontor, cirka 1990…) Orchestration –Remove temporal coupling –Simple, static workflow –Driven by single, simple events Reuse –Code and design reuse (patterns) –Primarily in-process (rocket science: method invocations…)

32 The SOA doors SOA is everything that is good SOA is everything we sell SOA is integration

33 Conclusion Your most pressing architectural risks are not solved by SOA SOA’s vision is not new The SOA stack may not be your best bet The vision can be archived by old technology with a new twist for real benefits Build simple, robust, and for today! SOA might not be wrong for you, but I recommend ignoring it until you know you need it.


Download ppt "Why I hate (the hype about) SOA What is the SOA business case? SOA $$$$"

Similar presentations


Ads by Google