Service-Oriented Architectures
-
Upload
desiree-simpson -
Category
Documents
-
view
21 -
download
1
description
Transcript of Service-Oriented Architectures
![Page 1: Service-Oriented Architectures](https://reader035.fdocuments.us/reader035/viewer/2022080916/56812c4a550346895d90ce4c/html5/thumbnails/1.jpg)
Service-Oriented Architectures
Andrew Whitaker
CSE451
![Page 2: Service-Oriented Architectures](https://reader035.fdocuments.us/reader035/viewer/2022080916/56812c4a550346895d90ce4c/html5/thumbnails/2.jpg)
Today’s Theme
How do you allow hundreds of developers to work on a single website?
![Page 3: Service-Oriented Architectures](https://reader035.fdocuments.us/reader035/viewer/2022080916/56812c4a550346895d90ce4c/html5/thumbnails/3.jpg)
Amazon.com: The Beginning
Initially, one web server (Obidos) and one database
Obidos DatabaseInternet
Details: Front end consists of a web server (Apache) and “business logic” (Obidos)
![Page 4: Service-Oriented Architectures](https://reader035.fdocuments.us/reader035/viewer/2022080916/56812c4a550346895d90ce4c/html5/thumbnails/4.jpg)
Amazon: Success Disaster!
Obidos
Obidos
Obidos
Obidos
Obidos
Loadbalancer
Amazon.com
Internet
Database
Database
Use redundancy to scale-up, improve availability
![Page 5: Service-Oriented Architectures](https://reader035.fdocuments.us/reader035/viewer/2022080916/56812c4a550346895d90ce4c/html5/thumbnails/5.jpg)
Obidos
Obidos was a single monolithic C application that comprised most of Amazon.com’s functionality
During scale-up, this model began to break down
![Page 6: Service-Oriented Architectures](https://reader035.fdocuments.us/reader035/viewer/2022080916/56812c4a550346895d90ce4c/html5/thumbnails/6.jpg)
Problem #1: Branch Management
Merging code across branches becomes untenable
HelloWorld.c
developmentrelease
Blue changes depend on Red changes (which maydepend on other changes…)
![Page 7: Service-Oriented Architectures](https://reader035.fdocuments.us/reader035/viewer/2022080916/56812c4a550346895d90ce4c/html5/thumbnails/7.jpg)
Problem #2: Debugging
On a failure, we would like to inspect what happened “recently” But, the change log contains numerous updates
from many groups
Bigger problem: lack of isolation Change by one group can impact others
![Page 8: Service-Oriented Architectures](https://reader035.fdocuments.us/reader035/viewer/2022080916/56812c4a550346895d90ce4c/html5/thumbnails/8.jpg)
Problem #3: Linker Failure
Obidos grew so large that standard build tools were failing
![Page 9: Service-Oriented Architectures](https://reader035.fdocuments.us/reader035/viewer/2022080916/56812c4a550346895d90ce4c/html5/thumbnails/9.jpg)
Service-Oriented Architecture (1)
First, decompose the monolithic web site into a set of smaller modules Called services
Examples: Recommendation service Price service Catalogue service And MANY others
![Page 10: Service-Oriented Architectures](https://reader035.fdocuments.us/reader035/viewer/2022080916/56812c4a550346895d90ce4c/html5/thumbnails/10.jpg)
Sidebar: Modularity
Information hiding (Parnas 1972): The purpose of a module is to hide secrets
Benefits of modularity Groups can work independently
Less “synchronization overhead” Ease of change
We are free to change the hidden secrets Ease of comprehension
Can study the system at a high level of abstraction
public interface List { } // This can be an array, a linked-list, // or something else
![Page 11: Service-Oriented Architectures](https://reader035.fdocuments.us/reader035/viewer/2022080916/56812c4a550346895d90ce4c/html5/thumbnails/11.jpg)
Systems and Information Hiding
There is often a tension between performance and information hiding
In OS’s, performance often wins:
struct buffer { // DO NOT MOVE these fields! // They are accessed by inline assembly that // assumes the current ordering. struct buffer* next; struct buffer* prev; int size; …
}
![Page 12: Service-Oriented Architectures](https://reader035.fdocuments.us/reader035/viewer/2022080916/56812c4a550346895d90ce4c/html5/thumbnails/12.jpg)
Service Oriented Architectures (2)
Modularity + a network
Services live on disjoint sets of machinesServices communicate using RPC
Remote procedure call
![Page 13: Service-Oriented Architectures](https://reader035.fdocuments.us/reader035/viewer/2022080916/56812c4a550346895d90ce4c/html5/thumbnails/13.jpg)
Remote Procedure Call
RPC exposes a programming interface across machines:
interface PriceService { float getPrice(long uniqueID);}
Client Server
PriceImpl
getPrice()
![Page 14: Service-Oriented Architectures](https://reader035.fdocuments.us/reader035/viewer/2022080916/56812c4a550346895d90ce4c/html5/thumbnails/14.jpg)
SOA, Visualized
Website
ShoppingCart
Price
RecommendationCatalogue
•All services reside on separate machines•All invocations are remote procedure calls
![Page 15: Service-Oriented Architectures](https://reader035.fdocuments.us/reader035/viewer/2022080916/56812c4a550346895d90ce4c/html5/thumbnails/15.jpg)
Benefits of SOA
Modularity and service isolation This extends all the way down to the OS,
programming language, build tools, etc.
Better visibility Administrators can monitor the interactions
between services
Better resource accounting Who is using which resources?
![Page 16: Service-Oriented Architectures](https://reader035.fdocuments.us/reader035/viewer/2022080916/56812c4a550346895d90ce4c/html5/thumbnails/16.jpg)
Amazon as a Platform
SOA allows third-parties to use some (but not all) of the Amazon platform
Front-endwebsite
Catalogue
Sleds.com
OrderProcessing
ShoppingCarts
Amazon.com
![Page 17: Service-Oriented Architectures](https://reader035.fdocuments.us/reader035/viewer/2022080916/56812c4a550346895d90ce4c/html5/thumbnails/17.jpg)
Performance Issues
A webpage can require dozens of service calls RPC system must be high performance
Metrics of interest: Throughput Latency
Both average and the variance
![Page 18: Service-Oriented Architectures](https://reader035.fdocuments.us/reader035/viewer/2022080916/56812c4a550346895d90ce4c/html5/thumbnails/18.jpg)
SLAs
Service performance is dictated by contracts called Service Level Agreements e.g., Service Foo must
Have 4 9’s of availability Have a median latency of 50 ms Have a 3 9’s latency of 200 ms
![Page 19: Service-Oriented Architectures](https://reader035.fdocuments.us/reader035/viewer/2022080916/56812c4a550346895d90ce4c/html5/thumbnails/19.jpg)
Issues
DiscoveryLoad Balancing