77
Autonomous Autonomous Computing Computing Fiefdoms and Fiefdoms and Emissaries Emissaries Pat Helland Pat Helland Software Architect Software Architect SQL Server SQL Server Microsoft Corporation Microsoft Corporation

Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

  • View
    334

  • Download
    3

Embed Size (px)

Citation preview

Page 1: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

Autonomous Autonomous ComputingComputingFiefdoms and EmissariesFiefdoms and EmissariesPat HellandPat HellandSoftware ArchitectSoftware ArchitectSQL ServerSQL ServerMicrosoft CorporationMicrosoft Corporation

Page 2: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation
Page 3: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

OutlineOutline

IntroductionIntroduction Autonomous Computing: The BasicsAutonomous Computing: The Basics Working With Autonomous FiefdomsWorking With Autonomous Fiefdoms Working Across FiefdomsWorking Across Fiefdoms ConclusionConclusion

Page 4: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

Legal StuffLegal Stuff

The following page has definitions excerpted The following page has definitions excerpted from Bookshelf 99from Bookshelf 99

ex·cerpt ex·cerpt (ĕkʹsûrpt´) ex·cerpt ex·cerpt (ĕkʹsûrpt´) nounnounA passage or segment taken from a longer work, such as a A passage or segment taken from a longer work, such as a literary or musical composition, a document, or a film. literary or musical composition, a document, or a film.

Excerpted from The American Heritage Dictionary of Excerpted from The American Heritage Dictionary of the English Language, Third Edition Copyright © 1992the English Language, Third Edition Copyright © 1992 by Houghton Mifflin Company. Electronic version licensed by Houghton Mifflin Company. Electronic version licensed from Lernout & Hauspie Speech Products N.V., further from Lernout & Hauspie Speech Products N.V., further reproduction and distribution restricted in accordance with reproduction and distribution restricted in accordance with the Copyright Law of the United States. All rightsthe Copyright Law of the United States. All rights reserved. reserved.

Page 5: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

SnapshotSnapshot A photograph take with a small hand-held camera.A photograph take with a small hand-held camera.

TerminologyTerminology

EmissaryEmissary An agent sent on a mission to represent or advance An agent sent on a mission to represent or advance the interests of another.the interests of another.

FiefdomFiefdom 1. The estate or domain of a feudal lord. 2. Something over 1. The estate or domain of a feudal lord. 2. Something over which one dominant person or group exercises controlwhich one dominant person or group exercises control

Not controlled by others or by outside forces; independentNot controlled by others or by outside forces; independentAutonomousAutonomous

StableStable Resistant to change of position or condition; steadfast. Resistant to change of position or condition; steadfast. Immutable; permanent; enduring. A place where horses live.Immutable; permanent; enduring. A place where horses live.

UncertaintyUncertainty Unsure about someone or something. Unsure about someone or something. A lack of assurance or conviction.A lack of assurance or conviction.

IdemIdem Something that has been mentioned previously; the same.Something that has been mentioned previously; the same.

PotentPotent Possessing inner or physical strength; powerful.Possessing inner or physical strength; powerful.

Page 6: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

OutlineOutline

IntroductionIntroduction What’re We Gonna Talk About?What’re We Gonna Talk About? Computing Through the DecadesComputing Through the Decades

Autonomous Computing: The BasicsAutonomous Computing: The Basics Working With Autonomous FiefdomsWorking With Autonomous Fiefdoms Working Across FiefdomsWorking Across Fiefdoms ConclusionConclusion

Page 7: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

What Is Autonomous Computing?What Is Autonomous Computing? Autonomous Computing starts with Autonomous Computing starts with

independent computer systemsindependent computer systems These are independently controlled and These are independently controlled and

managedmanaged They don’t trust outsidersThey don’t trust outsiders

We are going to examine the We are going to examine the consequences of this independenceconsequences of this independence How do such machines interact?How do such machines interact? How is data handled?How is data handled? How can we accomplish work in such an How can we accomplish work in such an

environment?environment?

Page 8: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

What’s This .NET Stuff?What’s This .NET Stuff?

.NET is about building loosely-coupled .NET is about building loosely-coupled solutions that span autonomous systemssolutions that span autonomous systems Part of the solution may run locallyPart of the solution may run locally Part is available as services running elsewherePart is available as services running elsewhere Those services may, in turn, use other servicesThose services may, in turn, use other services

How do you build a loosely-coupled app?How do you build a loosely-coupled app? What do the pieces look like? What do the pieces look like? How do they communicate?How do they communicate? How do you build the pieces?How do you build the pieces? How do you do cooperative work across How do you do cooperative work across

independent systems?independent systems?

Page 9: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

OutlineOutline

IntroductionIntroduction What’re We Gonna Talk About?What’re We Gonna Talk About? Computing Through the DecadesComputing Through the Decades

Autonomous Computing: The BasicsAutonomous Computing: The Basics Working With Autonomous FiefdomsWorking With Autonomous Fiefdoms Working Across FiefdomsWorking Across Fiefdoms ConclusionConclusion

Page 10: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

The 50’s: Scheduling TimeThe 50’s: Scheduling Time

In the 1950’s, you would schedule time on In the 1950’s, you would schedule time on the computer…the computer… I have the machine from 3PM until 6PMI have the machine from 3PM until 6PM Wipe it clean, load your data, do your work, save Wipe it clean, load your data, do your work, save

your results, wipe it clean…your results, wipe it clean…

Data transfer between machines was rareData transfer between machines was rare

Page 11: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

The 60’s: Batch ProcessingThe 60’s: Batch Processing

In the 1960’s batch processing arrivedIn the 1960’s batch processing arrived You’d submit your work on a deck of cardsYou’d submit your work on a deck of cards Come back later & pick up your listing…Come back later & pick up your listing… Lots of concurrent batch jobsLots of concurrent batch jobs

Data was exchanged using card decks and magnetic-Data was exchanged using card decks and magnetic-tapestapes

Page 12: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

The 70’s: Timesharing ArrivesThe 70’s: Timesharing Arrives As we move into the 1970’s Timesharing & As we move into the 1970’s Timesharing &

OLTP (Online Transaction Processing) OLTP (Online Transaction Processing) appearappear People sit online at terminalsPeople sit online at terminals

Files were exchanged using magnetic-tapes Files were exchanged using magnetic-tapes & occasionally over Wide Area Networks& occasionally over Wide Area Networks

Page 13: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

The 80’s: PCs & Client-ServerThe 80’s: PCs & Client-Server

In the 1980’s Local Area Networks arriveIn the 1980’s Local Area Networks arrive Systems inside a workgroup are connectedSystems inside a workgroup are connected Constrained access to the mainframe Constrained access to the mainframe

from the LANfrom the LAN

Systems on the LAN are in the same companySystems on the LAN are in the same company

Page 14: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

The 90’s: Computing & the WebThe 90’s: Computing & the Web

People & businesses communicate across People & businesses communicate across the Webthe Web For the first time, requests arrive For the first time, requests arrive

from untrusted sourcesfrom untrusted sources

WebWeb

Page 15: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

OutlineOutline

IntroductionIntroduction Autonomous Computing: The BasicsAutonomous Computing: The Basics

Fiefdoms and Autonomous ComputingFiefdoms and Autonomous Computing Emissaries: Helping Interact With FiefdomsEmissaries: Helping Interact With Fiefdoms Rethinking DataRethinking Data Rethinking the “N-Tier” ModelRethinking the “N-Tier” Model Fiefdoms & EmissariesFiefdoms & Emissaries

Working With Autonomous FiefdomsWorking With Autonomous Fiefdoms Working Across FiefdomsWorking Across Fiefdoms ConclusionConclusion

Page 16: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

The Web is Autonomous ComputingThe Web is Autonomous Computing

The Web is lots of autonomous The Web is lots of autonomous fiefdomsfiefdoms

Define the term Fiefdom as:Define the term Fiefdom as: Computing function and applications Computing function and applications

which behaves as an independent entitywhich behaves as an independent entity Has private dataHas private data An autonomous unit --- managed An autonomous unit --- managed

independentlyindependently• Usually one (or a few) machinesUsually one (or a few) machines

Fiefdoms don’t trust outsiders...Fiefdoms don’t trust outsiders...

Page 17: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

Requesting Service from a FiefdomRequesting Service from a Fiefdom

Fiefdoms don’t trust Fiefdoms don’t trust stuff from the outsidestuff from the outside Incoming requests will Incoming requests will

be inspectedbe inspected Fields will be validatedFields will be validated Identity will be Identity will be

authenticatedauthenticated

Data from outside Data from outside requests is never requests is never trustedtrusted It must fit within It must fit within

prescribed values prescribed values or it is rejectedor it is rejected

Please,Please,kindly considerkindly consider

my humblemy humblerequest….request….

Page 18: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

Private Data and FiefdomsPrivate Data and Fiefdoms

A fiefdom keeps its A fiefdom keeps its data privatedata private No one outside can No one outside can

read or write the dataread or write the data Only well defined Only well defined

requests are serviced requests are serviced from the outsidefrom the outside• These requests do not These requests do not

describe the contents describe the contents of the fiefdom’s dataof the fiefdom’s data

• Provide services, Provide services, not data accessnot data access

RequestRequest

Page 19: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

Transactions and FiefdomsTransactions and Fiefdoms

Fiefdoms are (almost always) built using Fiefdoms are (almost always) built using transactions internallytransactions internally It may use 2-phase commit across the nodes of a It may use 2-phase commit across the nodes of a

clustercluster

A fiefdom (usually) will not agree to share a A fiefdom (usually) will not agree to share a transaction with an outsidertransaction with an outsider

TransactionTransaction

TransactionTransaction

Page 20: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

OutlineOutline

IntroductionIntroduction Autonomous Computing: The BasicsAutonomous Computing: The Basics

Fiefdoms and Autonomous ComputingFiefdoms and Autonomous Computing Emissaries: Helping Interact With FiefdomsEmissaries: Helping Interact With Fiefdoms Rethinking DataRethinking Data Rethinking the “N-Tier” ModelRethinking the “N-Tier” Model Fiefdoms & EmissariesFiefdoms & Emissaries

Working With Autonomous FiefdomsWorking With Autonomous Fiefdoms Working Across FiefdomsWorking Across Fiefdoms ConclusionConclusion

Page 21: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

EmissariesEmissaries

Fiefdoms may come with emissaries.Fiefdoms may come with emissaries. It knows how to fill out a request for the fiefdomIt knows how to fill out a request for the fiefdom It understands the rules of the fiefdom and how to It understands the rules of the fiefdom and how to

(probably) get the request accepted(probably) get the request accepted• Think of a mortgage broker… not the final approving Think of a mortgage broker… not the final approving

party…party…

Emissaries have two purposes:Emissaries have two purposes: Displaying information to usersDisplaying information to users Preparing requests to send to fiefdomsPreparing requests to send to fiefdoms

Emissaries are not trusted by the fiefdomEmissaries are not trusted by the fiefdom The contents of the request is still The contents of the request is still

inspected for correctnessinspected for correctness

Page 22: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

Emissaries and Snapshot DataEmissaries and Snapshot Data

An emissary will frequently An emissary will frequently come with reference data.come with reference data. This information will support This information will support

the emissary in doing its jobthe emissary in doing its job

Imagine an emissary that Imagine an emissary that helps you order from Searshelps you order from Sears It will arrive with the Fall It will arrive with the Fall

catalog under its armcatalog under its arm

ReferenceReferenceDataData

Page 23: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

Emissaries & Single User DataEmissaries & Single User Data

Emissaries gather Emissaries gather information needed to information needed to prepare requestsprepare requests For example, a shopping For example, a shopping

basket accumulates the basket accumulates the items to purchaseitems to purchase

ReferenceReferenceDataData

Per-UserPer-UserStateState

Page 24: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

OutlineOutline

IntroductionIntroduction Autonomous Computing: The BasicsAutonomous Computing: The Basics

Fiefdoms and Autonomous ComputingFiefdoms and Autonomous Computing Emissaries: Helping Interact With FiefdomsEmissaries: Helping Interact With Fiefdoms Rethinking DataRethinking Data Rethinking the “N-Tier” ModelRethinking the “N-Tier” Model Fiefdoms & EmissariesFiefdoms & Emissaries

Working With Autonomous FiefdomsWorking With Autonomous Fiefdoms Working Across FiefdomsWorking Across Fiefdoms ConclusionConclusion

Page 25: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

Mission Critical DataMission Critical Data

The “current” data is always kept inside The “current” data is always kept inside the fiefdomthe fiefdom It is the mission critical data that describes the It is the mission critical data that describes the

business of the fiefdombusiness of the fiefdom This information is typically This information is typically

updated within a transactionupdated within a transaction Locks are held only for Locks are held only for

the duration of the duration of the transactionthe transaction

Transactions are not Transactions are not shared outside shared outside the fiefdomthe fiefdom

Page 26: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

Snapshot DataSnapshot Data Once data is unlocked, it must be assumed to be a Once data is unlocked, it must be assumed to be a

snapshotsnapshot Snapshot data was accurate and up-to-date at some time in Snapshot data was accurate and up-to-date at some time in

the past… it is not necessarily still currentthe past… it is not necessarily still current We must assume that snapshot data is no longer current…We must assume that snapshot data is no longer current…

1 sec old1 sec old

1 min old1 min old

1 hour old1 hour old

1 day old1 day old

1 week old1 week old1 month old1 month old

CurrentCurrent

Page 27: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

Stable DataStable Data

Stable data is meaningful across Stable data is meaningful across space and timespace and time Anything to do with “current” is not stableAnything to do with “current” is not stable Timestamping can make data stableTimestamping can make data stable Other techniques can make data stableOther techniques can make data stable

• Given an IID (Interface-ID), Given an IID (Interface-ID), type-lib info is stabletype-lib info is stable

Stable data is never invalidStable data is never invalid It may be cached without worries for cache It may be cached without worries for cache

consistencyconsistency It may be uninteresting, It may be uninteresting,

but it is never wrong…but it is never wrong…

Page 28: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

All Web Data Is a SnapshotAll Web Data Is a Snapshot

All web data is a snapshotAll web data is a snapshot Fiefdoms don’t hold locks when working with Fiefdoms don’t hold locks when working with

outsiders…outsiders… This means they have unlocked their data…This means they have unlocked their data…

it might have changed…it might have changed…

CurrentCurrent

Page 29: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

OutlineOutline

IntroductionIntroduction Autonomous Computing: The BasicsAutonomous Computing: The Basics

Fiefdoms and Autonomous ComputingFiefdoms and Autonomous Computing Emissaries: Helping Interact With FiefdomsEmissaries: Helping Interact With Fiefdoms Rethinking DataRethinking Data Rethinking the “N-Tier” ModelRethinking the “N-Tier” Model Fiefdoms & EmissariesFiefdoms & Emissaries

Working With Autonomous FiefdomsWorking With Autonomous Fiefdoms Working Across FiefdomsWorking Across Fiefdoms ConclusionConclusion

Page 30: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

RenderingRendering May accept HTML or some other rendering formatMay accept HTML or some other rendering formatProduces bits on the screen.Produces bits on the screen.

Labeling The Tiers Labeling The Tiers

RenderingRenderingMay accept HTML or some other rendering formatMay accept HTML or some other rendering formatProduces bits on the screen.Produces bits on the screen.

Present-Present-ationation

Maps the interactions with the emissary into pages Maps the interactions with the emissary into pages to be displayed to the user. Typically producesto be displayed to the user. Typically producesHTML.HTML.

Present-Present-ationation

Maps the interactions with the emissary into pages Maps the interactions with the emissary into pages to be displayed to the user. Typically produces to be displayed to the user. Typically produces HTML. HTML.

EmissaryEmissaryLogicLogic

EmissaryEmissaryDataData

Knows how to fill out requests to be Knows how to fill out requests to be submitted to the fiefdom. Possibly has submitted to the fiefdom. Possibly has snapshot data for submitting requests.snapshot data for submitting requests.

EmissaryEmissaryLogicLogic

EmissaryEmissaryDataData

Knows how to fill out requests to be Knows how to fill out requests to be submitted to the fiefdom. Possibly hassubmitted to the fiefdom. Possibly hassnapshot data for submitting requests.snapshot data for submitting requests.

FiefdomFiefdomDataData

FiefdomFiefdomLogicLogic

Business logic implementing the fiefdom.Business logic implementing the fiefdom.Doesn’t trust anyone. Takes requests intoDoesn’t trust anyone. Takes requests intothe fiefdom. Keeps mission critical data.the fiefdom. Keeps mission critical data.

FiefdomFiefdomDataData

FiefdomFiefdomLogicLogic

Business logic implementing the fiefdom.Business logic implementing the fiefdom.Doesn’t trust anyone. Takes requests intoDoesn’t trust anyone. Takes requests intothe fiefdom. Keeps mission critical data.the fiefdom. Keeps mission critical data.

Page 31: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

Slicing at the FrontSlicing at the Front

This is classic HTML 3.2 This is classic HTML 3.2 browser supportbrowser support Do most of the work at the serverDo most of the work at the server Send HTML to the clientSend HTML to the client Maximum “reach”Maximum “reach”

RenderingRendering

EmissaryEmissaryLogic & Logic &

DataData

Present-Present-ationation

FiefdomFiefdomLogic & Logic &

DataData

Page 32: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

Pushing Down the EmissaryPushing Down the Emissary

Can run the emissary down on Can run the emissary down on the clientthe client Emissaries use snapshot dataEmissaries use snapshot data The data is never incorrect…The data is never incorrect… It’s possible you’re missing some data It’s possible you’re missing some data

you want but you will always know ityou want but you will always know it

We can download the code and We can download the code and snapshot datasnapshot data Run the emissary on the clientRun the emissary on the client Send the fiefdom requests over the wireSend the fiefdom requests over the wire

Present-Present-ationation

RenderingRendering

EmissaryEmissaryLogic & Logic &

DataData

FiefdomFiefdomLogic & Logic &

DataData

Page 33: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

The Web FarmThe Web Farm

Can run the emissary separate from Can run the emissary separate from the fiefdomthe fiefdom Talks over HTML 3.2 to the browserTalks over HTML 3.2 to the browser Talks to a dedicated machine with fiefdom Talks to a dedicated machine with fiefdom

logic and datalogic and data

Scalable solutionScalable solution Offloads the precious fiefdomOffloads the precious fiefdom Emissary can be replicated Emissary can be replicated

on webfarm for scaleon webfarm for scale

Present-Present-ationation

RenderingRendering

EmissaryEmissaryLogic & Logic &

DataData

FiefdomFiefdomLogic & Logic &

DataData

Page 34: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

Scaling the Web FarmScaling the Web Farm

k

k

A-JA-J

Ref DataRef Data

Per-UserPer-User

Ref DataRef Data

K-RK-R

Ref DataRef Data

Per-UserPer-User

S - ZS - Z

Ref DataRef Data

Per-UserPer-User

SharedSharedWritableWritable

DataData

De-Militarized-ZoneDe-Militarized-Zone

ProtectedProtectedIntra-NetIntra-Net

k

k

Page 35: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

Management of Reference DataManagement of Reference Data Part of the Emissary code Part of the Emissary code

must keep the Reference must keep the Reference Data advancingData advancing It’s It’s alwaysalways a bit stale… a bit stale… Need to keep dribbling the Need to keep dribbling the

changes forwardchanges forward

kk

kkSharedSharedWritableWritable

DataData

De-Militarized-ZoneDe-Militarized-Zone Protected Intra-NetProtected Intra-Net

Ref DataRef Data

A-JA-J

Ref DataRef Data

K-RK-R

Ref DataRef Data

S-ZS-Z

Ref DataRef Data

Page 36: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

All the tiers in one fiefdomAll the tiers in one fiefdom

Contrast With Classic TiersContrast With Classic Tiers

Present-Present-ationation

RenderingRendering

EmissaryEmissaryLogic & Logic &

DataData

FiefdomFiefdomLogic & Logic &

DataData

Present-Present-ationation

BusinessBusinessLogicLogic

DataData

Rendering &Rendering &Presentation Presentation

CombinedCombined

Logic & DataLogic & Dataare in theare in theFiefdomFiefdom

No conceptNo conceptof Emissariesof Emissaries

Page 37: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

OutlineOutline

IntroductionIntroduction Autonomous Computing: The BasicsAutonomous Computing: The Basics

Fiefdoms and Autonomous ComputingFiefdoms and Autonomous Computing Emissaries: Helping Interact With FiefdomsEmissaries: Helping Interact With Fiefdoms Rethinking DataRethinking Data Rethinking the “N-Tier” ModelRethinking the “N-Tier” Model Fiefdoms & EmissariesFiefdoms & Emissaries

Working With Autonomous FiefdomsWorking With Autonomous Fiefdoms Working Across FiefdomsWorking Across Fiefdoms ConclusionConclusion

Page 38: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

Fiefdoms & EmissariesFiefdoms & Emissaries Fiefdoms use multi-user writable dataFiefdoms use multi-user writable data

The business logic protects its integrityThe business logic protects its integrity

Emissaries use:Emissaries use: Read-only reference data, andRead-only reference data, and Single-user writable data (e.g. a shopping basket)Single-user writable data (e.g. a shopping basket)

Read-OnlyRead-OnlyReferenceReference

Per-UserPer-UserWritableWritable

SharedSharedWritableWritable

Read-OnlyRead-OnlyReferenceReference

Per-UserPer-UserWritableWritable

Page 39: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

OutlineOutline

IntroductionIntroduction Autonomous Computing: The BasicsAutonomous Computing: The Basics Working With Autonomous FiefdomsWorking With Autonomous Fiefdoms

Requesting ServicesRequesting Services Dialogs: Reliable Service RequestsDialogs: Reliable Service Requests The Flow of Data in an Autonomous WorldThe Flow of Data in an Autonomous World Monologs: Reliable Publication of SnapshotsMonologs: Reliable Publication of Snapshots Offline WorkOffline Work

Working Across FiefdomsWorking Across Fiefdoms ConclusionConclusion

Page 40: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

Computing With MessagesComputing With Messages Incoming work arrives in a messageIncoming work arrives in a message The response leaves in a messageThe response leaves in a message

FiefdomFiefdomLogicLogic DataData

Page 41: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

Classic OLTP & 3-TierClassic OLTP & 3-Tier Sometimes online workers are part of the fiefdomSometimes online workers are part of the fiefdom

They are trusted and work using online transactionsThey are trusted and work using online transactions This is classic OLTP and 3-tierThis is classic OLTP and 3-tier Less & less common with IntranetLess & less common with Intranet

FiefdomFiefdomLogicLogic DataData

Page 42: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

Making Requests IdempotentMaking Requests Idempotent

Requests get lost…Requests get lost… Gotta retry them to handle lost requestsGotta retry them to handle lost requests

Requests arrive more than once…Requests arrive more than once… Those pesky retries may actually arriveThose pesky retries may actually arrive

Idempotent means it’s OK to arrive multiple Idempotent means it’s OK to arrive multiple timestimes As long as the request is processed at least once, As long as the request is processed at least once,

the correct behavior occursthe correct behavior occurs

In today’s internet, you must design your In today’s internet, you must design your requests to be idempotentrequests to be idempotent

Page 43: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

Challenges With Idempotent Challenges With Idempotent RequestsRequests

Any request may arrive multiple timesAny request may arrive multiple times Sometimes after quite a whileSometimes after quite a while You might be a few messages farther along when You might be a few messages farther along when

an old one arrivesan old one arrives

The combinatoric complexity can be The combinatoric complexity can be staggeringstaggering This leads people to build very simple This leads people to build very simple

applications since only then can they cope with applications since only then can they cope with the failure complexity…the failure complexity…

Page 44: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

OutlineOutline

IntroductionIntroduction Autonomous Computing: The BasicsAutonomous Computing: The Basics Working With Autonomous FiefdomsWorking With Autonomous Fiefdoms

Requesting ServicesRequesting Services Dialogs: Reliable Service RequestsDialogs: Reliable Service Requests The Flow of Data in an Autonomous WorldThe Flow of Data in an Autonomous World Monologs: Reliable Publication of SnapshotsMonologs: Reliable Publication of Snapshots Offline WorkOffline Work

Working Across FiefdomsWorking Across Fiefdoms ConclusionConclusion

Page 45: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

DialogsDialogs Dialogs provide two-way messagingDialogs provide two-way messaging

Between two services (either fiefdom or emissary)Between two services (either fiefdom or emissary) Dialogs offer:Dialogs offer:

Guaranteed deliveryGuaranteed delivery Full-duplex or half-duplexFull-duplex or half-duplex Long-livedLong-lived Exactly-once and in-order deliveryExactly-once and in-order delivery

Crisp failure semantics:Crisp failure semantics: If can’t delivery any message, dialog will failIf can’t delivery any message, dialog will fail If dialog fails, both sides see the dialog failureIf dialog fails, both sides see the dialog failure

ServiceService

DialogDialog

ServiceService

Page 46: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

Multiple Related MessagesMultiple Related Messages

Dialogs may be used to send different messages Dialogs may be used to send different messages that are related to each otherthat are related to each other When the second message arrives it is automatically When the second message arrives it is automatically

correlated to the firstcorrelated to the first When the answer returns, it is correlated to the requestWhen the answer returns, it is correlated to the request

Ordering is preserved across different messages in Ordering is preserved across different messages in the same dialogthe same dialog

ServiceService

DialogDialog

AA BB CCServiceService

Page 47: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

Long-Running Related WorkLong-Running Related Work

As services communicate, their work is spread As services communicate, their work is spread across space and timeacross space and time The processing of the response may take place days after The processing of the response may take place days after

the requestthe request

This make implementation of the service challengingThis make implementation of the service challenging

““Customer”Customer”ServiceService

DialogDialog ““P-O”P-O”ServiceService

DialogDialog ““CreditChk”CreditChk”ServiceService

Transaction T1Transaction T1

““Buy Stuff”Buy Stuff”

Transaction T2Transaction T2

““Check If Flake”Check If Flake”

Transaction T3Transaction T3““He’s OK”He’s OK”Transaction T4Transaction T4

““Confirm Sale”Confirm Sale”Transaction T5Transaction T5

Page 48: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

OutlineOutline

IntroductionIntroduction Autonomous Computing: The BasicsAutonomous Computing: The Basics Working With Autonomous FiefdomsWorking With Autonomous Fiefdoms

Requesting ServicesRequesting Services Dialogs: Reliable Service RequestsDialogs: Reliable Service Requests The Flow of Data in an Autonomous WorldThe Flow of Data in an Autonomous World Monologs: Reliable Publication of SnapshotsMonologs: Reliable Publication of Snapshots Offline WorkOffline Work

Working Across FiefdomsWorking Across Fiefdoms ConclusionConclusion

Page 49: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

Content SyndicationContent Syndication

To fill out requests, an emissary needs To fill out requests, an emissary needs snapshot reference data snapshot reference data The fiefdom must publish this reference dataThe fiefdom must publish this reference data

Content Syndication is the buzzword for the Content Syndication is the buzzword for the publication of reference datapublication of reference data

Joe’sJoe’sPrice list forPrice list forJoe’s FiefdomJoe’s FiefdomValid Mar 3, 02Valid Mar 3, 02thru Mar 6, 02thru Mar 6, 02

Page 50: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

Using Syndicated ContentUsing Syndicated ContentIn Requests for ServiceIn Requests for Service

Emissaries use syndicated content to Emissaries use syndicated content to prepare requests for serviceprepare requests for service The processing of the request must be The processing of the request must be

designed to tolerate some stalenessdesigned to tolerate some staleness

Joe’sJoe’sPrice list forPrice list forJoe’s FiefdomJoe’s FiefdomValid Mar 3, 02Valid Mar 3, 02thru Mar 6, 02thru Mar 6, 02

Page 51: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

The Flow of DataThe Flow of Data Data flows in a big cycle:Data flows in a big cycle:

The fiefdom published reference dataThe fiefdom published reference data This reference data is used in requests for serviceThis reference data is used in requests for service The processing of requests may impact the new The processing of requests may impact the new

reference data that is published laterreference data that is published later

RequestsRequests

SnapshotsSnapshots

Page 52: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

Content AggregationContent Aggregation

Another buzzword is Content AggregationAnother buzzword is Content Aggregation You process syndicated content from multiple sources to You process syndicated content from multiple sources to

glean interesting dataglean interesting data For example, which supplier has the best price, quality, For example, which supplier has the best price, quality,

and availabilityand availability

Some emissaries perform sophisticated processing Some emissaries perform sophisticated processing to aggregate contentto aggregate content

AggregatedAggregatedContentContent

Page 53: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

OutlineOutline

IntroductionIntroduction Autonomous Computing: The BasicsAutonomous Computing: The Basics Working With Autonomous FiefdomsWorking With Autonomous Fiefdoms

Requesting ServicesRequesting Services Dialogs: Reliable Service RequestsDialogs: Reliable Service Requests The Flow of Data in an Autonomous WorldThe Flow of Data in an Autonomous World Monologs: Reliable Publication of SnapshotsMonologs: Reliable Publication of Snapshots Offline WorkOffline Work

Working Across FiefdomsWorking Across Fiefdoms ConclusionConclusion

Page 54: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

MonologsMonologs A monolog is 1-to-many messagingA monolog is 1-to-many messaging

The publisher sends ordered messagesThe publisher sends ordered messages There may be many subscribing servicesThere may be many subscribing services

A subscriber will:A subscriber will: Receive messages exactly-once, in-orderReceive messages exactly-once, in-order Receive every message or is told of failureReceive every message or is told of failure

SubscribersSubscribers

PublisherPublisher

MonologMonolog

Page 55: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

Monolog Failure SemanticsMonolog Failure Semantics

Monologs offer GUARANTEED deliveryMonologs offer GUARANTEED delivery Every message will be delivered exactly onceEvery message will be delivered exactly once Every message will be delivered in the order it was sentEvery message will be delivered in the order it was sent

If any message cannot be delivered exactly-once If any message cannot be delivered exactly-once and in-order, the subscription will failand in-order, the subscription will fail This is a notification to the subscribing programThis is a notification to the subscribing program It is delivered under a transactionIt is delivered under a transaction

After failure, a brand-new subscription After failure, a brand-new subscription may be obtainedmay be obtained This is especially useful for CHECKPOINTED monologs as This is especially useful for CHECKPOINTED monologs as

they provide a well-defined semantic for restartthey provide a well-defined semantic for restart• See next slide!See next slide!

Page 56: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

Monologs With CheckpointsMonologs With Checkpoints

In CHECKPOINTED MONOLOGs, the In CHECKPOINTED MONOLOGs, the publisher periodically issues a checkpointpublisher periodically issues a checkpoint This is a defined restart point for new subscribersThis is a defined restart point for new subscribers BEGIN-CKPT, bunch-of-messages, END-CKPTBEGIN-CKPT, bunch-of-messages, END-CKPT

New subscribers start at a recent checkpointNew subscribers start at a recent checkpoint They see the BEGIN, messages, ENDThey see the BEGIN, messages, END Then they see subsequent messagesThen they see subsequent messages

Ongoing subscribers skip checkpointsOngoing subscribers skip checkpoints They are designed as places to start new They are designed as places to start new

subscriptionssubscriptions

Page 57: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

What’s a Checkpoint?What’s a Checkpoint? A A checkpointcheckpoint is a well-defined starting place for new is a well-defined starting place for new

subscriptionssubscriptions Publishers explicitly define checkpointsPublishers explicitly define checkpoints Checkpoints include messages just for new subscribersCheckpoints include messages just for new subscribers Existing subscribers skip over checkpointsExisting subscribers skip over checkpoints Only monologs annotated as CHECKPOINTED may have Only monologs annotated as CHECKPOINTED may have

checkpointscheckpoints

MonologMonolog

……

Checkpoint#3Checkpoint#3

……

Checkpoint#2Checkpoint#2

……

Checkpoint#1Checkpoint#1

…… ……

…………

Page 58: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

OutlineOutline

IntroductionIntroduction Autonomous Computing: The BasicsAutonomous Computing: The Basics Working With Autonomous FiefdomsWorking With Autonomous Fiefdoms

Requesting ServicesRequesting Services Dialogs: Reliable Service RequestsDialogs: Reliable Service Requests The Flow of Data in an Autonomous WorldThe Flow of Data in an Autonomous World Monologs: Reliable Publication of SnapshotsMonologs: Reliable Publication of Snapshots Offline WorkOffline Work

Working Across FiefdomsWorking Across Fiefdoms ConclusionConclusion

Page 59: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

Offline and Online: Offline and Online: Points on a SpectrumPoints on a Spectrum

All online emissary work is really a flavor of offlineAll online emissary work is really a flavor of offline The data is always a snapshotThe data is always a snapshot Offline just requires caching more snapshot Offline just requires caching more snapshot

reference datareference data

The fiefdom must cope with stale requestsThe fiefdom must cope with stale requests All requests will be somewhat stale…All requests will be somewhat stale…

Sub-second access Sub-second access to the fiefdomto the fiefdom

DisconnectedDisconnectedfor daysfor days

Staleness of the Staleness of the snapshot data used tosnapshot data used to

prepare the request to the fiefdomprepare the request to the fiefdom

Page 60: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

Emissaries & Offline ProcessingEmissaries & Offline Processing

An emissary works with 2 kinds of data:An emissary works with 2 kinds of data: Snapshots of data published by a fiefdom, andSnapshots of data published by a fiefdom, and Per-client informationPer-client information

You can package up an emissary, along with its You can package up an emissary, along with its snapshot data and download it to a smart clientsnapshot data and download it to a smart client On the client, the emissary prepares requestsOn the client, the emissary prepares requests

Requests are queued up until reconnectionRequests are queued up until reconnection

Page 61: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

Bringing Enough Content AlongBringing Enough Content Along

““Online” applications don’t need to bring Online” applications don’t need to bring along snapshot reference dataalong snapshot reference data They go fetch it on demandThey go fetch it on demand

Offline applications need to bring reference Offline applications need to bring reference data with themdata with them Organizing what to bring and how to group it Organizing what to bring and how to group it

together is a new challengetogether is a new challenge

Page 62: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

OutlineOutline

IntroductionIntroduction Autonomous Computing: The BasicsAutonomous Computing: The Basics Working With Autonomous FiefdomsWorking With Autonomous Fiefdoms Working Across FiefdomsWorking Across Fiefdoms

Tentative WorkTentative Work Canceling and Confirming Tentative WorkCanceling and Confirming Tentative Work Bounding UncertaintyBounding Uncertainty

ConclusionConclusion

Page 63: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

Transactions Don’t Work Across Transactions Don’t Work Across FiefdomsFiefdoms

Fiefdoms will not agree to share transactions with Fiefdoms will not agree to share transactions with outsidersoutsiders No self-respecting fiefdom would hold locks waiting for No self-respecting fiefdom would hold locks waiting for

some other fiefdomsome other fiefdom

How can work get coordinated across fiefdoms???How can work get coordinated across fiefdoms???

TransactionTransaction

TransactionTransaction

Page 64: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

Tentative OperationsTentative Operations

Sometimes fiefdoms will accept requests for Sometimes fiefdoms will accept requests for tentative operationstentative operations Similar to a reservation, this can be cancelled Similar to a reservation, this can be cancelled

later on….later on….

If the operation is cancelled, the invoked If the operation is cancelled, the invoked service must deal with the effectsservice must deal with the effects

TentativeTentativeOpOp

CancellationCancellation

Page 65: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

Semantics of Tentative OperationsSemantics of Tentative Operations

Because a tentative operation may be cancelled Because a tentative operation may be cancelled later, they must be commutativelater, they must be commutative Commutative means reorderable… Commutative means reorderable…

• When we cancel, we compensateWhen we cancel, we compensate• Other stuff may have happened in betweenOther stuff may have happened in between

It is important to ensure that the operation and the It is important to ensure that the operation and the cancellation are commutativecancellation are commutative

TentativeTentativeOpOpCancelCancel

TentativeTentativeOpOp

11

22

33

Page 66: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

OutlineOutline

IntroductionIntroduction Autonomous Computing: The BasicsAutonomous Computing: The Basics Working With Autonomous FiefdomsWorking With Autonomous Fiefdoms Working Across FiefdomsWorking Across Fiefdoms

Tentative WorkTentative Work Canceling and Confirming Tentative WorkCanceling and Confirming Tentative Work Bounding UncertaintyBounding Uncertainty

ConclusionConclusion

Page 67: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

Semantics of CancellationSemantics of Cancellation

When a tentative operation is cancelled, When a tentative operation is cancelled, somehow, the invoked service must somehow, the invoked service must compensate for the operationcompensate for the operation This is not an undoThis is not an undo It is another operation that makes things right…It is another operation that makes things right…

Part of supporting tentative operations is to Part of supporting tentative operations is to ensure the operation is cancelableensure the operation is cancelable Again, commutativity is the main technique used Again, commutativity is the main technique used

to support cancelable operationsto support cancelable operations• You can reorder the cancellation with other workYou can reorder the cancellation with other work

Page 68: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

Relinquishing the Right to Relinquishing the Right to CancelCancel

When an invoking fiefdom chooses to never When an invoking fiefdom chooses to never cancel, it may confirm the operationcancel, it may confirm the operation When you confirm, you give up the right to cancelWhen you confirm, you give up the right to cancel

Every tentative operation will be either Every tentative operation will be either confirmed or cancelledconfirmed or cancelled

Page 69: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

OutlineOutline

IntroductionIntroduction Autonomous Computing: The BasicsAutonomous Computing: The Basics Working With Autonomous FiefdomsWorking With Autonomous Fiefdoms Working Across FiefdomsWorking Across Fiefdoms

Tentative WorkTentative Work Canceling and Confirming Tentative WorkCanceling and Confirming Tentative Work Bounding UncertaintyBounding Uncertainty

ConclusionConclusion

Page 70: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

Increasing & Decreasing Increasing & Decreasing UncertaintyUncertainty

Each tentative operation increases your uncertaintyEach tentative operation increases your uncertainty You get more and more confused each time you accept a You get more and more confused each time you accept a

tentative operationtentative operation

Each confirmation or cancellation decreases your Each confirmation or cancellation decreases your uncertaintyuncertainty It resolves the confusion imparted by the tentative It resolves the confusion imparted by the tentative

operation it is confirming or cancelingoperation it is confirming or canceling

UncertaintyUncertaintyMoreMoreUncertainUncertain

LessLessUncertainUncertain

TentativeTentativeOperationOperation

CancellationCancellationor Confirmationor Confirmation

Page 71: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

Bounded UncertaintyBounded Uncertainty You can track the worst case situations for data You can track the worst case situations for data

values you are managingvalues you are managing If you keep inventory, you can know the lowest possible and If you keep inventory, you can know the lowest possible and

highest possible valueshighest possible values Tentative operations move lowest and highest values apartTentative operations move lowest and highest values apart

• This increases uncertaintyThis increases uncertainty Confirmations and cancellations move lowest and highest Confirmations and cancellations move lowest and highest

values togethervalues together• This decreases uncertaintyThis decreases uncertainty

Knowing the bounds, you have Bounded UncertaintyKnowing the bounds, you have Bounded Uncertainty

Widget InventoryWidget Inventory

Pro

babi

lity

Pro

babi

lity

MaximumMaximumWidgetsWidgetsPossiblePossible

MinimumMinimumWidgetsWidgetsPossiblePossible

Page 72: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

Acting on Bounded Acting on Bounded UncertaintyUncertainty Knowing bounds on uncertainty allows many Knowing bounds on uncertainty allows many

different business rules:different business rules: Refuse an order which may (in the worst case) Refuse an order which may (in the worst case)

result in widgets overflowing the warehouseresult in widgets overflowing the warehouse Calculate probability of worst case overflowing Calculate probability of worst case overflowing

the warehousethe warehouse• Cost of temporary storage vs. Cost of temporary storage vs.

value of accepting order…value of accepting order…

Order food for hotel restaurant based on Order food for hotel restaurant based on reservations and probabilitiesreservations and probabilities

May result in interesting work by applying May result in interesting work by applying risk management algorithms…risk management algorithms…

Page 73: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

OutlineOutline

IntroductionIntroduction Autonomous Computing: The BasicsAutonomous Computing: The Basics Working With Autonomous FiefdomsWorking With Autonomous Fiefdoms Working Across FiefdomsWorking Across Fiefdoms ConclusionConclusion

Page 74: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

Rambling Philosophy…Rambling Philosophy… Atomic transaction are singularitiesAtomic transaction are singularities

Locking makes them appear to be at a single point in timeLocking makes them appear to be at a single point in time Two-phase commit removes distribution concernsTwo-phase commit removes distribution concerns

The new challenges happen when spreading work The new challenges happen when spreading work across space and timeacross space and time Different fiefdoms are in different spatial locationsDifferent fiefdoms are in different spatial locations Work across different messages gets processed at different Work across different messages gets processed at different

timestimes Commutativity helps relax space and timeCommutativity helps relax space and time

By reordering with acceptable answers, it’s OKBy reordering with acceptable answers, it’s OK• Note that DB write is not commutativeNote that DB write is not commutative

Emissaries don’t have concurrency problemsEmissaries don’t have concurrency problems They only deal with read-only and single-user dataThey only deal with read-only and single-user data They make things “stick” by sending requests to fiefdomsThey make things “stick” by sending requests to fiefdoms

• The fiefdom must have commutative requests… it sorts out the The fiefdom must have commutative requests… it sorts out the interleaving of workinterleaving of work

Page 75: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

SnapshotSnapshot A photograph take with a small hand-held camera.A photograph take with a small hand-held camera.

EmissaryEmissary An agent sent on a mission to represent or advance An agent sent on a mission to represent or advance the interests of another.the interests of another.

FiefdomFiefdom 1. The estate or domain of a feudal lord. 2. Something over 1. The estate or domain of a feudal lord. 2. Something over which one dominant person or group exercises controlwhich one dominant person or group exercises control

Not controlled by others or by outside forces; independentNot controlled by others or by outside forces; independentAutonomousAutonomous

StableStable Resistant to change of position or condition; steadfast. Resistant to change of position or condition; steadfast. Immutable; permanent; enduring. A place where horses live.Immutable; permanent; enduring. A place where horses live.

UncertaintyUncertainty Unsure about someone or something. Unsure about someone or something. A lack of assurance or conviction.A lack of assurance or conviction.

IdemIdem Something that has been mentioned previously; the same.Something that has been mentioned previously; the same.

PotentPotent Possessing inner or physical strength; powerful.Possessing inner or physical strength; powerful.

BoundedBoundedUncertaintyUncertainty

The management of ongoing work to track tentative The management of ongoing work to track tentative operations and their confirmation and cancellation.operations and their confirmation and cancellation.

StableStableDataData

Data that doesn’t change… it’s meaning is clear anytime Data that doesn’t change… it’s meaning is clear anytime and anywhere. Appropriate for messages and snapshots.and anywhere. Appropriate for messages and snapshots.

SnapshotSnapshotDataData

A copy of data sent out to an emissary as a references source.A copy of data sent out to an emissary as a references source.For example, a price-list.For example, a price-list.

EmissaryEmissary Code that goes out into the world to assist in working with Code that goes out into the world to assist in working with a fiefdom.a fiefdom.

FiefdomFiefdom An autonomous computing entity with private data and logic. An autonomous computing entity with private data and logic.

A style of computing supporting the interaction of A style of computing supporting the interaction of independent systems.independent systems.

AutonomousAutonomousComputingComputing

IdempotentIdempotentRequestRequest

A request message that may be repeatedly processed A request message that may be repeatedly processed while still giving behavior the same as a single execution.while still giving behavior the same as a single execution.Essential to cope with retries…Essential to cope with retries…

TerminologyTerminology

Page 76: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

SummarySummary

Autonomous Computing Autonomous Computing Allows distrusting systems to cooperateAllows distrusting systems to cooperate Defines a framework for the distribution of data to use in Defines a framework for the distribution of data to use in

messagesmessages Loosely-coupled collections of tightly coupled servicesLoosely-coupled collections of tightly coupled services Explains web, offline, B2B, B2C, long-running work, etc.Explains web, offline, B2B, B2C, long-running work, etc.

The .NET architecture is really about autonomous The .NET architecture is really about autonomous computingcomputing Services, messages, content-syndication…Services, messages, content-syndication…

Autonomous Computing describes how to build Autonomous Computing describes how to build loosely-coupled .NET applicationsloosely-coupled .NET applications We should be designing platforms and tools to support We should be designing platforms and tools to support

this model!this model!

Page 77: Autonomous Computing Fiefdoms and Emissaries Pat Helland Software Architect SQL Server Microsoft Corporation

© 2002 Microsoft Corporation. All rights reserved.© 2002 Microsoft Corporation. All rights reserved.This presentation is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS SUMMARY.This presentation is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS SUMMARY.