The Whirlwind Tour.ppt
《The Whirlwind Tour.ppt》由会员分享,可在线阅读,更多相关《The Whirlwind Tour.ppt(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
- 1.请仔细阅读文档,确保文档完整性,对于不预览、不比对内容而直接下载带来的问题本站不予受理。
- 2.下载的文档,不会出现我们的网址水印。
- 3、该文档所得收入(下载+内容+预览)归上传者、原创作者;如果您是本文档原作者,请点此认领!既往收益都归您。
下载文档到电脑,查找使用更方便
2000 积分 0人已下载
下载 | 加入VIP,交流精品资源 |
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- THEWHIRLWINDTOURPPT
