SOA Why I hate the hype about SOA
SOA $$$$ Why I hate (the hype about) SOA What is the SOA business case?
Prelude – what is wrong with this code? public Collection find. By. Pattern(String name. Pattern) throws SQLException { Connection conn = Driver. Manager. get. Connection(this. url, this. username, this. password); Statement stmt = conn. create. Statement(); Result. Set rs = stmt. execute. Query( "SELECT name FROM name_table WHERE name like '" + name. Pattern + "'"); Collection result = new Array. List(); while (rs. next()) { result. add(rs. get. String(1)); } conn. close(); return result; }
Summary! • Use connection pooling! • Avoid SQL injection! • Don’t leak the bloody connections!
Correct code! public Collection find. By. Pattern(String name. Pattern) { String query = "SELECT name FROM name_table WHERE name like ? "; Object[] params = new Object[] { name. Pattern }; return jdbc. Template. query(query, params, new Row. Mapper() { public Object map. Row(Result. Set rs, int row. Num) throws SQLException { return rs. get. String(1); } }); }
Now: To the agenda of the day! • • • The Promise The Perception The Failure BBS architecture Lessons learned
Is SOA important? 1. “Gartner projects: ‘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. ’” [Information. Week] 2. The next (current? ) gold rush is in B 2 B
The incredible shape-changing SOA Every time you look, it look different!
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, SOA is described, asynchronous, remote, loosly coupled, orchistrated, standardbased. . . ” [someone fairly smart] • “Loose coupling”
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/Service. Oriented. Ambiguity. html
Three doors marked SOA
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”
The SOA stack Orchestration Access Layer Described Exposed Source system
The vendor stack (marchitecture) BPEL, BPMN JBI WSDL SOAP 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 Bile. Blog Source system
SOA: Understanding your Business The business of SOA is the business of your business Your essential business processes Your conceptual information model Your value proposition
Business-Focus is an Alibi “We have to find the core value of the business. . . And we selected Axis as our SOA provider and Web. Sphere as our application server. ” - J Random SOA Architect “Huh? !? ” - Me
SOA doesn't help! What does SOA tell me about information modeling? Process modeling? For the enterprise? ! What does SOA tell me to do about this information? Nothing!
Absurdity of Stateless Microapplications How much of your application deals with integration with external systems?
The Dangers of Reuse Building New Legacy on Top of Old Legacy
The Object-Service Impedence Mismatch Don't transparently expose your domain model Man-years have been spent on “SOA integration layers”
Orchestration: Example
Orchestration: The 21 st century CASE tool? Johannes' Golden Truths about Software Diagrams: – Understandable diagrams can’t be used to generate code. – Diagrams generated from code are mostly useless.
The Complexity and Inadequacy of the “Simple” Object Access Protocol (SOAP) ”The worst possible way of implementing SOA is by using web services” - Kaare Nilsen, SOA expert, Object. Ware WS-Adressing, WS-Security, WS-Reliability, WS-Reliable. Messaging, WS-Transactions, WS-I-think-I'm-gonna-be-sick
SOA's Failed Potensial: Integration How can I integrate: • Standards-based • Reasonably reliably • Inter-enterprise • Bidirectional • Asynchronously
Final fallacy: Firewalls <WEB • Why do we have firewalls? • Are SOA applications secure? • So… do we need “SOA firewalls”? SERVICES>
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
BBS architecture Slides not to be published
BBS architecture • Background: Replacing mainframe batch applications written in COBOL with Java • Requirements – – – Robustness Security Scability (roughly quantified) Operatability (quanitified) Maintainability (quantified)
At a glance
Workflow: Asynchronous Entity Service
Dependency Injection
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…
The SOA doors SOA is everything that is good SOA is everything we sell SOA is integration
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.
- Slides: 33