1 tplite is back! jim gray microsoft research gray/talks/ high performance transaction processing...

22
1 TPlite is Back! Jim Gray Microsoft Research http://research.microsoft.com/~gray/talk s/ High Performance Transaction Processing Workshop, Asilomar, CA., 27 September 2005,

Upload: edward-crawford

Post on 02-Jan-2016

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 1 TPlite is Back! Jim Gray Microsoft Research gray/talks/ High Performance Transaction Processing Workshop, Asilomar, CA.,

1

TPlite is Back!

Jim GrayMicrosoft Research

http://research.microsoft.com/~gray/talks/High Performance Transaction Processing Workshop,

Asilomar, CA., 27 September 2005,

Page 2: 1 TPlite is Back! Jim Gray Microsoft Research gray/talks/ High Performance Transaction Processing Workshop, Asilomar, CA.,

2

Summary Statement

• Database system’s have changed– Is a web service

(listens to port 80, does wsdl+soap,…)– Hosts a programming environment

(J2EE VM or .NET CLR or… )

• So, Client-Server (a.k.a. tplite) – is possible– Has always been easier than 3-tier.

Page 3: 1 TPlite is Back! Jim Gray Microsoft Research gray/talks/ High Performance Transaction Processing Workshop, Asilomar, CA.,

3

Outline

• History: Everyone Went to 3-tier (and why)

• New news (DB + Languages + WS-*):– Extensible DBs have arrived.– Full blown programming environment inside– Fewer technologies:

• DB integrated with language.• Web service integrated with class/method.

• Fears– DMZ and attack surface.

Page 4: 1 TPlite is Back! Jim Gray Microsoft Research gray/talks/ High Performance Transaction Processing Workshop, Asilomar, CA.,

4

Work Distribution Spectrum

• Presentation and plug-ins

• Workflow manages session & invokes objects

• Application Objects

• Database

Fat

ThinFat

Thin

Database

App Objects

workflows

Presentation

Page 5: 1 TPlite is Back! Jim Gray Microsoft Research gray/talks/ High Performance Transaction Processing Workshop, Asilomar, CA.,

5

Transaction Processing Evolution to 3 Tier

• Mainframe Batch processing (centralized)

• Dumb terminals & Remote Job Entry

• Intelligent terminals database backends

• Workflow SystemsObject Request BrokersApplication Generators

Mainframe

cards

Active

green screen3270

Server

TP Monitor

ORB

Page 6: 1 TPlite is Back! Jim Gray Microsoft Research gray/talks/ High Performance Transaction Processing Workshop, Asilomar, CA.,

6

PC Evolution to Three Tier

• Stand-alone PC (centralized)

• PC + File & print servermessage per I/O

• PC + Database server message per SQL statement

• PC + App server message per transaction

• ActiveX Client, ORB ActiveX server, Xscript

disk I/OIO request

reply

SQL Statement

Transaction

Page 7: 1 TPlite is Back! Jim Gray Microsoft Research gray/talks/ High Performance Transaction Processing Workshop, Asilomar, CA.,

7

Web Evolution to Three Tier

• Character-mode clients, smart servers

• GUI Browsers - Web file servers

• GUI Plugins - Web dispatchers - CGI

• Smart clients - Web dispatcher (ORB)pools of app servers (ISAPI, Viper)workflow scripts at client & server

archie ghophergreen screen

WebServer

Mosaic

WAIS

DHTML

AJAX

Page 8: 1 TPlite is Back! Jim Gray Microsoft Research gray/talks/ High Performance Transaction Processing Workshop, Asilomar, CA.,

8

The Pattern: Three Tier Computing

• Clients do presentation, gather input

• Clients do some workflow (Xscript)

• Clients send high-level requests to ORB

• ORB dispatches workflows

• Server-side workflow scripts orchestrate distributed App objects

• State stored in DBDatabase

App Objects

workflow

Presentation

Page 9: 1 TPlite is Back! Jim Gray Microsoft Research gray/talks/ High Performance Transaction Processing Workshop, Asilomar, CA.,

9

Why Did Everyone Go To Three-Tier?

• Manageability– App rules must be with data– Middleware operations tools

• Performance (scalability)– Server resources are precious– ORB dispatches requests to server pools– DBMS was DREADFUL at connections

• Connection pools

• Technology & Physics– Put UI processing near user– Put shared data processing near shared data

DatabaseDatabase

App App ObjectsObjects

workflowworkflow

PresentationPresentation

Page 10: 1 TPlite is Back! Jim Gray Microsoft Research gray/talks/ High Performance Transaction Processing Workshop, Asilomar, CA.,

10

Multiplexing• DB client connection:

– Mega-instruction set up– Mega-byte state

• TP mon or Web Server or ORB– Lightweight connection setup– Multiplex many clients to few DB connections

(connection pool)– Act as ORB (manage & dispatch server pools). – Act as object container.

ORB DB

Page 11: 1 TPlite is Back! Jim Gray Microsoft Research gray/talks/ High Performance Transaction Processing Workshop, Asilomar, CA.,

11

Complexity: Dark Side of 3-Tier

• 3 programming environments

• Lots of configuration choices

• Lots of interface problems

• SQL, PL/SQL, T-SQL, … in DB

• It isn’t simple!!

Page 12: 1 TPlite is Back! Jim Gray Microsoft Research gray/talks/ High Performance Transaction Processing Workshop, Asilomar, CA.,

12

Outline

• History: Everyone Went to 3-tier (and why)

• New news (DB + Languages + WS-*):– Extensible DBs have arrived.– Full blown programming environment inside– Fewer technologies:

• DB integrated with language.• Web service integrated with class/method.

• Fears– DMZ and attack surface.

Page 13: 1 TPlite is Back! Jim Gray Microsoft Research gray/talks/ High Performance Transaction Processing Workshop, Asilomar, CA.,

13

DB Systems Get VMs • DB has language VM

execution environment• Language guys are

“embracing” DB • Class is a web service:

Generate WSDL• VERY simple

– programming – debugging

• Fewer languages & Tools to learn

• See SQLJ or LINQ or… EJB

NetworkNetwork

Thread PoolThread Pool

QueueQueue

ConnectionsConnections

ContextContext SecuritySecurity

Shared Data

ReceiverReceiver

Service logic

Co

nfig

ura

tion

Co

nfig

ura

tion

Ma

na

ge

me

nt

Ma

na

ge

me

nt

A Server

Page 14: 1 TPlite is Back! Jim Gray Microsoft Research gray/talks/ High Performance Transaction Processing Workshop, Asilomar, CA.,

14

The New World – Programs + Data• It finally happened

– Languages have sets (lists, dictionaries, …)– Table inherits from iEnumerable

• List <employee> E = new Employee();• for each e in E {}

– Rows are objects– Query answers are collections– Supports transactions– Push a button and you have a web service.

Page 15: 1 TPlite is Back! Jim Gray Microsoft Research gray/talks/ High Performance Transaction Processing Workshop, Asilomar, CA.,

15

SqlConnection c = new SqlConnection(…); c.Open(); SqlCommand cmd = new SqlCommand( @“SELECT c.Name, c.Phone

FROM Customers c WHERE c.City = @p0”

); cmd.Parameters[“@po”] = “London”; DataReader dr = c.Execute(cmd); while (dr.Read()) { string name = r.GetString(0); string phone = r.GetString(1); DateTime date = r.GetDateTime(2); } r.Close();

Old Data Access in API’s

Queries in quotes

Arguments loosely bound

Results loosely typed

Compiler cannot help catch mistakes

Page 16: 1 TPlite is Back! Jim Gray Microsoft Research gray/talks/ High Performance Transaction Processing Workshop, Asilomar, CA.,

16

Integrated Data Access

public class Customer {public class Customer { public int Id;public int Id; public string Name;public string Name; public string Phone;public string Phone; … … }}

Table<Customer> customers = …;Table<Customer> customers = …;

foreach(c in customers.Where(City == “London”)) {foreach(c in customers.Where(City == “London”)) { Console.WriteLine(“Name: {0} Phone: {1}”, c.Name, Console.WriteLine(“Name: {0} Phone: {1}”, c.Name, c.Phonec.Phone););}}

Classes describe data

Tables are real objects

Query is natural part of the language

Results are strongly typed

Page 17: 1 TPlite is Back! Jim Gray Microsoft Research gray/talks/ High Performance Transaction Processing Workshop, Asilomar, CA.,

17

Web Services• Now trivial to publish your data.

• Just say: “Make this method a web service.”

• Everything else is automatic

• Performance is easy to understand– Simplest configuration – Simplest management

• Minimal data movement

• Fewest round trips.

Page 18: 1 TPlite is Back! Jim Gray Microsoft Research gray/talks/ High Performance Transaction Processing Workshop, Asilomar, CA.,

18

DBs are FederatingSo Now Do Connection Management• DB needs to

– talk to peers scaleout

– Talk to foreigners data integration

• So, it is a client formultiplexing & connection pooling

• So, now they get it, (they finally had to write an app)and they are doing it.

• So, DB now does multiplexing

DBClient

Oth

er D

ata

So

urc

es

us

Fo

reig

ner

s

Page 19: 1 TPlite is Back! Jim Gray Microsoft Research gray/talks/ High Performance Transaction Processing Workshop, Asilomar, CA.,

19

Outline • History: Everyone Went to 3-tier (and why)

• New news (DB + Languages + WS-*):– Extensible DBs have arrived.– Full blown programming environment inside– Fewer technologies:

• DB integrated with language.• Web service integrated with class/method.

• Fears– DMZ and attack surface.

Page 20: 1 TPlite is Back! Jim Gray Microsoft Research gray/talks/ High Performance Transaction Processing Workshop, Asilomar, CA.,

20

Fears

• DB has large attack surface

• Web servers act as DMZ to Internet.

• Premise: – We can lock-down the DBMS interfaces– Only show “public” web services to outside.

Page 21: 1 TPlite is Back! Jim Gray Microsoft Research gray/talks/ High Performance Transaction Processing Workshop, Asilomar, CA.,

21

Summary Statement

• Database system’s have changed– Is a web service

(listens to port 80, does wsdl+soap,…)– Hosts a programming environment

(J2EE VM or .NET CLR or… )

• So, Client-Server (a.k.a. TPlite) – is possible– Has always been easier than 3-tier.– Integration of DB and Language makes it

VERY natural

Page 22: 1 TPlite is Back! Jim Gray Microsoft Research gray/talks/ High Performance Transaction Processing Workshop, Asilomar, CA.,

22

Distributed ExecutionThreads and Messages

• Thread is Execution unit(software analog of cpu+memory)

• Threads execute at a node

• Threads communicate via– Shared memory (local)– Messages (local and remote)

threads

shared memory

messages