Top Banner
Portuguêsversãoembreve http://amzn.to/cqBBiq http://oreil.ly/aaewge
73
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Rest in Practice, Brazil 2010

Portuguêsversãoembreve

http://amzn.to/cqBBiqhttp://oreil.ly/aaewge

Page 2: Rest in Practice, Brazil 2010

REST in Practice

Jim Webber

http://jim.webber.name

Twitter: @jimwebber

Page 3: Rest in Practice, Brazil 2010

Or: A Billion Transactions Per MonthUsing the Web for Enterprise Heavy Lifting

Jim Webber

http://jim.webber.name

Twitter: @jimwebber

Page 4: Rest in Practice, Brazil 2010
Page 5: Rest in Practice, Brazil 2010

Today’s Enterprise Architecture

Accounting Marketing

SupportProduct Development

Page 6: Rest in Practice, Brazil 2010
Page 7: Rest in Practice, Brazil 2010

“SOA: Principles of Service Design underwent a thorough technical review involving over 60 reviewers from different vendors, organizations, and professions across North America, Europe, and Asia. The book has been formally endorsed by members of major SOA vendors, including IBM, Microsoft, Oracle, BEA, and Intel.”

-- Thomas Erl

Page 8: Rest in Practice, Brazil 2010

Tomorrow’s Enterprise Architecture

BPM Services

Business Service

Data Service

Business Service

Data Service

Data Service

Business Service

Data Service

Data Service

Page 9: Rest in Practice, Brazil 2010

Nirvana Enterprise Architecture, or…

BPM Service

Business Service

Business Service

ESB

Basic Service

Basic Service

Basic Service

Basic Service

Basic Service

Business Service

Page 10: Rest in Practice, Brazil 2010

ESB - Erroneous Spaghetti Box?

Enterprise Service Bus

Page 11: Rest in Practice, Brazil 2010
Page 12: Rest in Practice, Brazil 2010
Page 13: Rest in Practice, Brazil 2010
Page 14: Rest in Practice, Brazil 2010

But we still do it.

Page 15: Rest in Practice, Brazil 2010

Why?

Because it’s “less risky”

Page 16: Rest in Practice, Brazil 2010

Why?

Because that’s what the market does

Page 17: Rest in Practice, Brazil 2010

Why?

Because we need the -ilities

Page 18: Rest in Practice, Brazil 2010

So let’s talk about those -ilities

Page 19: Rest in Practice, Brazil 2010
Page 20: Rest in Practice, Brazil 2010
Page 21: Rest in Practice, Brazil 2010

Web

Sca

le!

Page 22: Rest in Practice, Brazil 2010

Trad

itio

nal

En

terp

rise

Se

curi

ty

Page 23: Rest in Practice, Brazil 2010

End to End Secure Messaging

End to End Secure Conversations

Page 24: Rest in Practice, Brazil 2010

Security Tokens and claims

Federating access with tokens

Page 25: Rest in Practice, Brazil 2010
Page 26: Rest in Practice, Brazil 2010

…you wouldn’tuse it at home!

Page 27: Rest in Practice, Brazil 2010
Page 28: Rest in Practice, Brazil 2010
Page 29: Rest in Practice, Brazil 2010
Page 30: Rest in Practice, Brazil 2010

Bottleneck

No trustCrash

recovery?

Denial of

Service

Page 31: Rest in Practice, Brazil 2010
Page 32: Rest in Practice, Brazil 2010

<?xml version="1.0" encoding="UTF-8"?>

<definitions name="HelloService"

targetNamespace="http://www.ecerami.com/wsdl/HelloService.wsdl"

xmlns="http://schemas.xmlsoap.org/wsdl/"

xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"

xmlns:tns="http://www.ecerami.com/wsdl/HelloService.wsdl"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<message name="SayHelloRequest">

<part name="firstName" type="xsd:string"/>

</message>

<message name="SayHelloResponse">

<part name="greeting" type="xsd:string"/>

</message>

<portType name="Hello_PortType">

<operation name="sayHello">

<input message="tns:SayHelloRequest"/>

<output message="tns:SayHelloResponse"/>

</operation>

</portType>

<binding name="Hello_Binding" type="tns:Hello_PortType">

<soap:binding style="rpc"

transport="http://schemas.xmlsoap.org/soap/http"/>

<operation name="sayHello">

<soap:operationsoapAction="sayHello"/>

<input>

<soap:body

encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"

namespace="urn:examples:helloservice"

use="encoded"/>

</input>

<output>

<soap:body

encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"

namespace="urn:examples:helloservice"

use="encoded"/>

</output>

</operation>

</binding>

<service name="Hello_Service">

<documentation>WSDL File for HelloService</documentation>

<port binding="tns:Hello_Binding" name="Hello_Port">

<soap:address

location="http://localhost:8080/soap/servlet/rpcrouter"/>

</port>

</service>

</definitions>

Hel

lo W

orl

d!

Page 33: Rest in Practice, Brazil 2010

The Web is a coordination platform

Me

dia

Ty

pes

Page 34: Rest in Practice, Brazil 2010
Page 35: Rest in Practice, Brazil 2010

A Case Study

Client

• UK-based telecoms service provider

• Global customers (no easy downtime)

Problem

• Scalability and system resilience issues

• Huge growth curve to from a million to a billion messages per month

• Costs

Page 36: Rest in Practice, Brazil 2010

Platform Architecture

CarrierCarrier

CarrierCarrier

Gateway

Voice to Text

Algorithms

Integration

Database

Post

Processing

Shared

Filesystem

Bottleneck Nightmare!Where’s my

file gone?

Shoehorn it in that

other program

Fix things up

here

Page 37: Rest in Practice, Brazil 2010
Page 38: Rest in Practice, Brazil 2010

The £10 Million Solution

CarrierCarrier

CarrierCarrier

Gateway

Voice to Text

Algorithms

“Queue”

Database

Post

Processing

Shared

Filesystem

Enterprise Service Bus

*

* Solution does not include actual implementation

Page 39: Rest in Practice, Brazil 2010
Page 40: Rest in Practice, Brazil 2010

ThoughtWorks was given the output from a previous enterprise consultancy…

…and told to “do that, but cheaper”

Page 41: Rest in Practice, Brazil 2010
Page 42: Rest in Practice, Brazil 2010

Thinkdifferently!

(or even just stop and think)

Page 43: Rest in Practice, Brazil 2010

Architecture is still important

Page 44: Rest in Practice, Brazil 2010

Agile EA: Prioritise Service Delivery

CarrierCarrier

CarrierCarrier

Gateway

Voice to Text

Algorithms

Integration

Database

Post

Processing

Shared

Filesystem

Start by fixing

storage

Page 45: Rest in Practice, Brazil 2010
Page 46: Rest in Practice, Brazil 2010
Page 47: Rest in Practice, Brazil 2010
Page 48: Rest in Practice, Brazil 2010
Page 49: Rest in Practice, Brazil 2010

Storage Manager Project Delivery

Small team

3 Week Inception

14 iterations

Java solution

Performance testing throughout

– See Jones and Kua paper, Agile 2009

Continuously built and deployed for testing

Page 50: Rest in Practice, Brazil 2010

Web-friendly Architecture(mostly wallet-friendly too!)

Storage Manager

Jboss/Tomcat

GPFS SAN

Cacheable!

Optimised disk

access!

Optimised server

config

Free!

Encapsulates

storage detail!

Fast!

Spend £ on the

right

Infrastructure

Page 51: Rest in Practice, Brazil 2010
Page 52: Rest in Practice, Brazil 2010
Page 53: Rest in Practice, Brazil 2010

What is going on here?

What is going on with these peaks?

Page 54: Rest in Practice, Brazil 2010

Hypothesis

Directories are becoming full, slowing random access to files

Page 55: Rest in Practice, Brazil 2010

Prediction

A single directory will result in linearly degrading performance

Page 56: Rest in Practice, Brazil 2010
Page 57: Rest in Practice, Brazil 2010

Outcome

Adapt the directory structure to take advantage of the underlying file

system

Page 58: Rest in Practice, Brazil 2010

Improving Enterprise Architecture

CarrierCarrier

CarrierCarrier

Gateway

Voice to Text

Algorithms

Integration

Database

Post

Processing

Storage

Manager

Reduced

Load

Just shoehorn it in

that other

program

“She’ll be

right”

Scalable!

Page 59: Rest in Practice, Brazil 2010

Storage Manager Benefits

• Immediate reduced load on integration database

• Enabled removal of code from systems

• Delivered business value by keeping customers happy

• “The best software we have ever deployed”

– Operations director I’ll come back to this

Page 60: Rest in Practice, Brazil 2010
Page 61: Rest in Practice, Brazil 2010

What if…

We took our inspiration from successful Web-scale companies?

Page 62: Rest in Practice, Brazil 2010

What if…

And took the time to understand our SLAs?

Page 63: Rest in Practice, Brazil 2010

What if…

And picked the right technology solution?

Not just the one we’re being sold?

Page 64: Rest in Practice, Brazil 2010

What if…

We built a scalable compute platform?

Page 65: Rest in Practice, Brazil 2010
Page 66: Rest in Practice, Brazil 2010

Grid Project Delivery

Larger team

3.5 Week Inception

18 iterations

Java solution

Performance testing throughout

Continuously built and deployed for testing

Page 67: Rest in Practice, Brazil 2010

Web-friendly Architecture(very wallet-friendly!)

Grid Manager

Embedded Jetty

Grid Manager

Embedded Jetty

Grid Manager

Embedded Jetty

Grid Manager

Embedded Jetty

Grid Manager

Embedded Jetty

ASR ASR ASR ASR

Grid Pipeline

ASR ASR ASR ASR

Grid Pipeline

Just

HTTP

Fault

Tolerant

Fault

Tolerant

Just

HTTP

Sustainable

container for

business logic

£0Software

Infrastructure

Page 68: Rest in Practice, Brazil 2010

Improving Enterprise Architecture

CarrierCarrier

CarrierCarrier

Gateway

Grid

Integration

Database

Post

Processing

Storage

Manager

Massively

Reduced

Load

“She’ll be

right”

Scalable!

Scalable,

sustainable!

Scalable Processing Platform

Page 69: Rest in Practice, Brazil 2010

Grid Benefits

• Scalable, resilient platform

• Aligned with business goals

• Further reduced load on integration database

• Set architectural patterns

• Deliver business value by processing more messages at lower cost than ever before

• “The best software we have ever deployed”– Operations director Better every time!

Page 70: Rest in Practice, Brazil 2010

R$27,300,000Up-Front Cost of Bus Architecture

Page 71: Rest in Practice, Brazil 2010

R$2,730,000Actual Cost of Completed Project

Page 72: Rest in Practice, Brazil 2010

R$0Cost of Middleware

Page 73: Rest in Practice, Brazil 2010

The Web works

And its economies of scale eclipse your vendors’

http://amzn.to/cqBBiq