25
SOA Service Oriented Architecture Friday, May 17, 13

Service Oriented Architecture

Embed Size (px)

DESCRIPTION

PintLabs talk from php|tek 2013

Citation preview

Page 1: Service Oriented Architecture

SOAService Oriented Architecture

Friday, May 17, 13

Page 2: Service Oriented Architecture

Who We Are

Friday, May 17, 13

Page 3: Service Oriented Architecture

What is SOA

• System Architectural Pattern

• 3 Parts - Provider, Broker, Requester

Friday, May 17, 13

Page 4: Service Oriented Architecture

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

Page 5: Service Oriented Architecture

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

Page 6: Service Oriented Architecture

Service Requester

• Requests the desired web service form the Broker

• Calls services from the Provider once connected

Friday, May 17, 13

Page 7: Service Oriented Architecture

Theory & Principles of SOA

• Interoperability on different systems over a communication protocol

• Service Statelessness

• Service Encapsulation

• Service Granularity

• Service Discoverability

Friday, May 17, 13

Page 8: Service Oriented Architecture

BreweryDB & SOA

Friday, May 17, 13

Page 9: Service Oriented Architecture

BreweryDB 1.0

• Website with API

• Maintainability - Tightly coupled

• Data Model was small

• Data structure inconsistencies

Friday, May 17, 13

Page 10: Service Oriented Architecture

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

Page 11: Service Oriented Architecture

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

Page 12: Service Oriented Architecture

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

Page 13: Service Oriented Architecture

BreweryDB API

• Service Broker

• Authentication

• Return formats

• Authorization

• Resource routing

• Error handling

Friday, May 17, 13

Page 14: Service Oriented Architecture

Designing an API

• Endpoint structure

• Error handling

• Status codes

• Versioning

• Return types

• Request limits

• Authentication

Friday, May 17, 13

Page 15: Service Oriented Architecture

BreweryDB Consumers

• Service Requesters

• Single interface to our data

• Documentation

• Provisioning of accounts

Friday, May 17, 13

Page 16: Service Oriented Architecture

What we Learned about SOA

• Maintainability

• Allows for fast iterations

• Initial up front work is expensive

• Not always the answer

Friday, May 17, 13

Page 17: Service Oriented Architecture

Hurdles

• Enumerated Fields

• Website Authentication

• Emails

• Scaling & Performance

Friday, May 17, 13

Page 18: Service Oriented Architecture

Questions?

Friday, May 17, 13

Page 19: Service Oriented Architecture

Review on joind.in

http://pntlbs.co/tek13soa

Friday, May 17, 13

Page 20: Service Oriented Architecture

ImplementationBuilding BreweryDB

Friday, May 17, 13

Page 21: Service Oriented Architecture

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

Page 22: Service Oriented Architecture

Solving the rest of the Problem

Friday, May 17, 13

Page 23: Service Oriented Architecture

PLA

• Administration of data

• Enumerated data fields

• Data moderation

• Analytics

Friday, May 17, 13

Page 24: Service Oriented Architecture

BreweryDB.com

• Authentication of users

• Communication with end users

• Documentation

• API Key provisioning

Friday, May 17, 13

Page 25: Service Oriented Architecture

PocketBeer

BreweryMap

PintLabsAdmin

BreweryMap

BreweryDB

API

DB

Search

Friday, May 17, 13