The Whirlwind Tour.ppt

上传人:fuellot230 文档编号:373369 上传时间:2018-10-05 格式:PPT 页数:84 大小:480KB
下载 相关 举报
The Whirlwind Tour.ppt_第1页
第1页 / 共84页
The Whirlwind Tour.ppt_第2页
第2页 / 共84页
The Whirlwind Tour.ppt_第3页
第3页 / 共84页
The Whirlwind Tour.ppt_第4页
第4页 / 共84页
The Whirlwind Tour.ppt_第5页
第5页 / 共84页
亲,该文档总共84页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述

1、The Whirlwind Tour,Chapter 1a,2,Transactions: Where It All Started,Cuneiform documents now number about half a million, three- quarters of them more or less directly related to the history of law - dealing, as they do, with contracts, acknowledgment of debts, receipts, inventories, and accounts, as

2、well as containing records and minutes of judgments rendered in courts, business letters, administrative and diplomatic correspondence, laws, international treaties, and other official transactions. The total evidence enables the historian to reach back as far as the beginnings of writing, to the da

3、wn of history. . Moreover, because of the inconvenience of writing in stone or clay, Mesopotamians wrote only when economic or political necessity demanded it.(Encyclopaedia Britannica, 1974 edition),3,From Transactions to Transaction Processing Systems - I,Database. An abstract system state, repres

4、ented as marks on clay tablets, was maintained. Today, we would call this the database. Transactions. Scribes recorded state changes with new records (clay tablets) in the database. Today, we would call these state changes transactions.,The Sumerian way of doing business involved two components:,4,F

5、rom Transactions to Transaction Processing Systems - II,The real state is represented by an abstraction, called the database, and the transformation of the real state is mirrored by the execution of a program, called a transaction, that transforms the database.,5,Transactions Are In .,Each time you

6、make a phone call, there is a call setup transaction that allocates some resources to your conversation; the call teardown is a second transaction, freeing those resources. The call setup increasingly involves complex algorithms to find the callee (800 numbers could be anywhere in the world) and to

7、decide who is to be billed (800 and 900 numbers have complex billing). The system must deal with features like call forwarding, call waiting, and voice mail. After the call teardown, billing may involve many phone companies.,Communications:,6,Transactions Are In .,Each time you purchase gas using a

8、credit card, the point-of-sale terminal connects to the credit card companys computer. In case that fails, it may alternatively try to debit the amount to your account by connecting to your bank.This generalizes to all kinds of point-of-sale terminals such as cash registers, ATMs, etc.When banks bal

9、ance their accounts with each other (electronic fund transfer), they use transactions for reliability and recoverability.,Finance:,7,Transactions Are In .,Making reservations for a trip requires many related bookings and ticket purchases from airlines, hotels, rental car companies, and so on.From th

10、e perspective of the customer, the whole trip package is one purchase. From the perspective of the multiple systems involved, many transactions are executed: One per airline reservation (at least), one for each hotel reservation, one for each car rental, one for each ticket to be printed, on for set

11、ting up the bill, etc. Along the way, each inquiry that may not have resulted in a reservation is a transaction, too.,Travel:,8,Transactions Are In .,Order entry, job and inventory planning and scheduling, accounting, and so on are classical application areas of transaction processing. Computer inte

12、grated manufacturing (CIM) is a key technique for improving industrial productivity and efficiency. Just-in-time inventory control, automated warehouses, and robotic assembly lines each require a reliable data storage system to represent the factory state.,Manufacturing:,9,Transactions Are In .,This

13、 application area includes all kinds of physical machinery that needs to interact with the real world, either as a sensor, or as an actor. Traditionally, such systems were custom made for each individual plant, starting from the hardware. The usual reason for that was that 20 years ago off-the-shelf

14、 systems could not guarantee real-time behavior that is critical in these applications. This has changed, and so has the feasibility of building entire systems from scratch. Standard software is now used to ensure that the application will be portable.,Real-Time Systems:,10,A Transaction Processing

15、System,A transaction processing system (TP-system) provides tools to ease or automate application programming, execution, and administration of complex, distributed applications. Transaction processing applications typically support a network of devices that submit queries and updates to the applica

16、tion. Based on these inputs, the application maintains a database representing some real-world state. Application responses and outputs typically drive real-world actuators and transducers that alter or control the state. The applications, database, and network tend to evolve over several decades. I

17、ncreasingly, the systems are geographically distributed, heterogeneous (they involve equipment and software from many different vendors), continuously available (there is no scheduled downtime), and have stringent response time requirements.,11,ACID Properties: First Definition,Atomicity: A transact

18、ions changes to the state are atomic: either all happen or none happen. These changes include database changes, messages, and actions on transducers. Consistency: A transaction is a correct transformation of the state. The actions taken as a group do not violate any of the integrity constraints asso

19、ciated with the state. This requires that the transaction be a correct program. Isolation: Even though transactions execute concurrently, it appears to each transaction T, that others executed either before T or after T, but not both. Durability: Once a transaction completes successfully (commits),

20、its changes to the state survive failures.,12,Structure of a Transaction Program,The application program declares the start of a new transaction by invoking BEGIN_WORK(). All subsequent operations will be covered by the transaction. Eventually, the application program will call COMMIT_WORK(), if a n

21、ew consistent state has been reached. This makes sure the new state becomes durable. If the application program cannot complete properly (violation of consistency constraints), it will invoke ROLLBACK_WORK(), which appeals to the atomicity of the transaction, thus removing all effects the program mi

22、ght have had so far. If for some reason the application fails to call either commit or rollback (there could be an endless loop, a crash, a forced process termination), the transaction system will automatically invoke ROLLBACK_WORK() for that transaction.,13,The End Users View of a Transaction Proce

23、ssing System,14,The Administrators/Operators View of a TP System,15,Performance Measures of Interactive Transactions,Performance/ Small/Simple Medium ComplexTransaction _Instr./transaction 100k 1M 100MDisk I/O / TA 1 10 1000Local msgs. (B) 10 (5KB) 100 (50KB) 1000 (1MB)Remote msgs. (B) 2 (300B) 2 (4

24、KB) 100 (1MB)Cost/TA/second 10k$/tps 100k$/tps 1M$/tpsPeak tps/site 1000 100 1,16,Client-Server Computing: The Classical Idea,17,Client-Server Computing: The CORBA Idea,Client on WS Presentation Services etc,IDL Stub,IDL Skeleton,Object Implementation: Jims Mailbox,Request: Delete,Object Request Bro

25、ker,18,Client-Server Computing: The WWW Idea,WWW- Browser,Java-Applet+Java Database Connection (JDBC) Driver Code,HTTP,Server,Java- applet,JDBC- driver code,Database Server,proprietary protocol,JDBC-ODBC- bridge,ODBC driver,prop. protocol,JDBC network driver,public protocol,(e.g. TCP/IP),JDBC driver

26、,19,Using Transactional Remote Procedure Calls (TRPCs),20,Terms We Have Introduced So Far,Resource manager: The system comes with an array of transactional resource managers that provide ACID operations on the objects they implement. Database systems, persistent programming languages, and queue mana

27、gers are typical examples. Durable state: Application state represented as durable data stored by the resource managers. TRPC: Transactional remote procedure calls allow the application to invoke local and remote resource managers as though they were local. They also allow the application designer t

28、o decompose the application into client and server processes on different computers. Transaction program: Inquiries and state transfor-mations are written as programs in conventional or specialized programming languages. The programmer brackets the successful execution of the program with a Begin-Co

29、mmit pair and brackets a failed execution with a Begin-Rollback pair.,21,Terms We Have Introduced So Far,Atomicity: At any point before the commit, the application or the system may abort the transaction, invoking rollback. If the transaction is aborted, all of its changes to durable objects will be

30、 undone (reversed), and it will be as though the transaction never ran. Consistency: The work within a Begin-Commit pair must be a correct transformation. Isolation: While the transaction is executing, the resource managers ensure that all objects the transaction reads are isolated from the updates

31、of concurrent transactions. Durability: Once the commit has been successfully executed, all the state transformations of that transaction are made durable and public.,22,The World According to the Resource Manager,23,Where To Split Client/Server?,Presentation,Flow Control,Application Logic (=busines

32、s objects),Data Access,Thin,Thin,Fat,Fat,24,Client/Server Infrastructure,Client,Server,Middleware,GUIOOUISystem Mgmt.OS,ObjectsGroup- wareTP-Mon.DBMSOS,SQL,ORB,TRPC,Security,Transport,Mail,WWW,Files,etc.,25,Transactional Core Services,26,The X/Open TP-Model,27,The X/Open Distributed Transaction Proc

33、essing Model,28,The OTS Model,transaction originator,recoverable server,Transaction service,transmitted with request,creation termination,invocation,commit coordination,29,Transaction Processing System Feature List,Application development featuresApplication generators; graphical programming interfa

34、ces; screen painters; compilers; CASE tools; test data generators; starter system with a complete set of administrative and operations functions, security, and accounting. Repository featuresDescription of all components of the system, both hardware and software. Description of the dependencies amon

35、g components (bill-of-material). Description of all changes to all components to keep track of different versions. The repository is a database. Its role in the system must be complete, extensible, active and allow for local autonomy. TP-Monitor FeaturesProcess management; server classes; transactio

36、nal remote procedure calls; request-based authentication and authorization; support for applications and resource managers in implementing ACID operations on durable objects.,30,Transaction Processing System Feature List,Data communications featuresUniform I/O interfaces; device independence; virtua

37、l terminal; screen painter support; support for RPC and TRPC; support for context-oriented communication (peer-to-peer). Database featuresData independence; data definition; data manipulation; data control; data display; database operations. Operations featuresArchiving; reorganization; diagnosis; r

38、ecovery; disaster recovery; change control; security; system extension. Education and testing featuresImbedded education; online documentation; training systems; national language features; test database generators; test drivers.,31,Data Communications Protocols,32,Presentation Management,33,SQL Dat

39、a Definition,34,SQL Data Manipulation,35,Summary of Chapter 1,A transaction processing system is a large web of application generators, system design and operation tools, and the more mundane language, database, network, and operations software. The repository and the applications that maintain it a

40、re the mechanisms needed to manage the TP system. The repository is a transaction processing application. It represents the system configuration as a database and supplies change control by transactions that manipulate the configuration and the repository. The transaction concept, like contract law,

41、 is intended to resolve the situation when exceptions arise. The first order of business in designing a system is, therefore, to have a clear model of system failure modes. What breaks? How often do things break?,Chapter 1b,Basic Terminology,37,A Word About Words (Chapter 2),Humpty Dumpty: “When I u

42、se a word, it means exactly what I chose it to mean; nothing more nor less.” Alice: “The question is, whether you can make words mean so many different things.” Humpty Dumpty: “The question is, which is to be master, thats all.”,Lewis Carroll,38,Basic Computer Terms,To get any confusion that might b

43、e caused by the many synonyms in our field out of the way, let us adopt the following conventions for the rest of this class:domain = data type = . field = column = attribute = . record = tuple = object = entity = . block = page = frame = slot = . file = data set = table = . process = task = thread

44、= actor = . function=request=method=.All the other terms and definitions we need will be briefly introduced and explained during the session.,39,Basic Hardware Architecture I,In Bell and Newells classic taxonomy, hardware consists of three types of modules:Processors, memory, and communications (swi

45、tches or wires).Processors execute instructions from a program, read and write memory, and send data via communication lines.Computers are generally classified as supercomputers, mainframes, minicomputers, workstations, and personal computers. However, these distinctions are becoming fuzzy with curr

46、ent shifts in technology.,40,Basic Hardware Architecture II,Todays workstation has the power of yesterdays mainframe. Similarly, todays WAN (wide area network) has the communications bandwidth of yesterdays LAN (local area network). In addition, electronic memories are growing in size to include muc

47、h of the data formerly stored on magnetic disk. These technology trends have deep implications for transaction processing.,41,Basic Hardware Architecture III,Distributed processing: Processing is moving closer to the producers and consumers of the data (workstations, intelligent sensors, robots, and

48、 so on). Client-server: These computers interact with each other via request-reply protocols. One machine, called the client, makes requests to another, called the server. Of course, the server may in turn be a client to other machines. Clusters: Powerful servers consist of clusters of many processo

49、rs and memories, cooperating in parallel to perform common tasks.,42,Basic Hardware Architecture IV,43,Memories - The Economic Perspective I,The processor executes instructions from virtual memory, and it reads and alters bytes from the virtual memory. The mapping between virtual memory and real mem

50、ory includes electronic memory, which is close to the processor, volatile, fast, and expensive, and magnetic memory, which is “far away“ from the processor, non-volatile, slow, and cheap. The mapping process is handled by the operating system with some hardware assistance. Memory performance is meas

51、ured by its access time: Given an address, the memory presents the data at some later time. The delay is called the memory access time. Access time is a combination of latency (the time to deliver the first byte), and transfer time (the time to move the data). Transfer time, in turn, is determined by the transfer size and the transfer rate. This produces the following overall equation: memory access time = latency + ( transfer size / transfer rate ),

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 教学课件 > 大学教育

copyright@ 2008-2019 麦多课文库(www.mydoc123.com)网站版权所有
备案/许可证编号:苏ICP备17064731号-1