Date post: | 01-Apr-2015 |
Category: |
Documents |
Upload: | sabastian-chace |
View: | 216 times |
Download: | 2 times |
Why I hate(the hype about) SOA
What is the SOA business case?
SOA
$$$$
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;}
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!
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); } });}
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.’” [InformationWeek]
2. The next (current?) gold rush is in B2B
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, blah,blah, SOA is described, asynchronous,
remote, loosly coupled, orchistrated, standard-based...” [someone fairly smart]
• “Loose coupling”
Fowler on SOA
“I've heard people say the nice thing about SOA isthat 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
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
Exposed
Source system
Validate fileSend message
to user[failed]
Wait for duedate
Check credit
[no credit]
Processpayment
Described
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
SOA: Understanding your Business
The business of SOA is the business of your business
Your essential business processesYour 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 WebSphere 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 modelMan-years have been spent on “SOA integration layers”
Orchestration: Example
Validate fileSend message
to user[failed]
Wait for duedate
Check credit
[no credit]
Processpayment
Orchestration: The 21st 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, ObjectWare
WS-Adressing, WS-Security, WS-Reliability, WS-ReliableMessaging, 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
• Why do we have firewalls?• Are SOA applications secure?
• So… do we need “SOA firewalls”?
<WEB 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
Mottak ProcessingTriggered
actionRequest
Processing chain
Response Distribution
billingaccess control
domain modelrepositoryentityRepository
Database
external domain repository
Processing
otherdependency
Persistence
receipt
Service-Repository
WebController
View
onlinebilling
access control
Workflow: Asynchronous Entity Service
Response Processingqueue
Database
queue
Database
Response Processing
Dependency Injection
Incoming File Channel
File Adapter(infrastructure)
Icky file management stuff(ick! Ick!)
Claim check queue
FileDatabase
Adapter
File destination
Service Framework
Application service
File destination
Report service
Adapter
Integration queu
e
Print and distribution
Outgoing file adapter
External subsystem
Icky fileprotocols
Filedestination
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.