Upload
jason-austin
View
11
Download
0
Tags:
Embed Size (px)
DESCRIPTION
PintLabs talk from php|tek 2013
Citation preview
SOAService Oriented Architecture
Friday, May 17, 13
Who We Are
Friday, May 17, 13
What is SOA
• System Architectural Pattern
• 3 Parts - Provider, Broker, Requester
Friday, May 17, 13
Service Provider
• All about Data
• Creates a web service
• Provides access to data layer to the Service Broker
• Determines which services to expose
Friday, May 17, 13
Service Broker
• All about routing. Think Traffic Cop
• Responsible for making the service available to any Service Requester
• Connects the Requester to the Provider
Friday, May 17, 13
Service Requester
• Requests the desired web service form the Broker
• Calls services from the Provider once connected
Friday, May 17, 13
Theory & Principles of SOA
• Interoperability on different systems over a communication protocol
• Service Statelessness
• Service Encapsulation
• Service Granularity
• Service Discoverability
Friday, May 17, 13
BreweryDB & SOA
Friday, May 17, 13
BreweryDB 1.0
• Website with API
• Maintainability - Tightly coupled
• Data Model was small
• Data structure inconsistencies
Friday, May 17, 13
BreweryDB 2.0 Requirements
• API First
• A single way for everyone to consume the data model
• Separate display from the data model
• Consistency in all responses
Friday, May 17, 13
BreweryDB SOA
• Service Provider is our Data Model
• MySQL + Elasticsearch + Models
• Service Broker is our API
• Endpoints
• Service Requesters are everyone that uses BreweryDB
Friday, May 17, 13
BreweryDB Data Model
• Service Provider
• Validation
• Consistent input and output structure of data
• Decoupled from response format (XML, JSON, PHP)
• Decoupled from access control
• Builds data relationships
Friday, May 17, 13
BreweryDB API
• Service Broker
• Authentication
• Return formats
• Authorization
• Resource routing
• Error handling
Friday, May 17, 13
Designing an API
• Endpoint structure
• Error handling
• Status codes
• Versioning
• Return types
• Request limits
• Authentication
Friday, May 17, 13
BreweryDB Consumers
• Service Requesters
• Single interface to our data
• Documentation
• Provisioning of accounts
Friday, May 17, 13
What we Learned about SOA
• Maintainability
• Allows for fast iterations
• Initial up front work is expensive
• Not always the answer
Friday, May 17, 13
Hurdles
• Enumerated Fields
• Website Authentication
• Emails
• Scaling & Performance
Friday, May 17, 13
Questions?
Friday, May 17, 13
Review on joind.in
http://pntlbs.co/tek13soa
Friday, May 17, 13
ImplementationBuilding BreweryDB
Friday, May 17, 13
Development Timeline
• Planning took roughly 3 months
• Development of data model in a weekend.
• Took an additional 6 months to finish the API
Friday, May 17, 13
Solving the rest of the Problem
Friday, May 17, 13
PLA
• Administration of data
• Enumerated data fields
• Data moderation
• Analytics
Friday, May 17, 13
BreweryDB.com
• Authentication of users
• Communication with end users
• Documentation
• API Key provisioning
Friday, May 17, 13
PocketBeer
BreweryMap
PintLabsAdmin
BreweryMap
BreweryDB
API
DB
Search
Friday, May 17, 13