1 / 14

Cost-based Distributed Transaction Coordinator

Cost-based Distributed Transaction Coordinator. Jin Taiyong 08/22/2001. T1. T2. T3. T4. Architecture. Functionalities of Execute Element. Transaction Pool. Execute the coordinated transactions. Transaction Scheduler. Database Distribution Manager. Load Information

elon
Download Presentation

Cost-based Distributed Transaction Coordinator

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Cost-based Distributed Transaction Coordinator JinTaiyong 08/22/2001

  2. T1 T2 T3 T4 Architecture Functionalities of Execute Element Transaction Pool • Execute the coordinated transactions Transaction Scheduler Database Distribution Manager Load Information Manager • Collect the load information of the executed transactions Execute Element Manager Adapter Dispatcher • Feedback the load information of the executed transactions to transaction coordinator Dispatcher Dispatcher Dispatcher Dispatcher Execute Element Dispatcher Execute Element Execute Element • Transaction Placement Policy: • Decide how to coordinate the transaction when it is submitted to TC • Transaction Scheduling Policy: • Decide which blocked transaction in Transaction Pool is executed • at which site when a transaction is finished at an Execute Element

  3. Transaction Type • In actual applications, the number of the transaction types is limited. • The transactions whose types are the same should have the same load characteristic • The transaction type is decided by the designer of the application

  4. DataStructure (1) • TransactionPool(TC_WaitTransactionList) • BlockedTransaction( TC_WaitTran ) • Type: int • Priority: int • Param Size: unsigned long • Parameter: char* • Next blocked tranaction: TC_WaitTran* TC_WaitTransactionList TC_WaitTran

  5. DataStructure (2) • Database Distribution Manager (DDM) • DDMInfo_t • Heap_number: int • Primary IP address: unsigned long • Heap Size: unsigned long • DDMInfo_t DDM

  6. DataStructure (3) • Cost Information Manager (CIM) • CIMHeapInfo_t • ddm_entry: int • Number of read pages: int • Number of written pages: int • CIMInfo_t • Type: int • Throughput: int • Rollback: int • Cost Value: CIMHeapInfo_t[MAX_HEAP_NUM] • CIMnfo_t CIM

  7. DataStructure (4) • Execute Element Manager (EEM) • EESocket • handle: int • IP address: unsigned long • Port: int • Busy Flag: int (1: The EE is executing a transaction; 0: The EE is idle) • Connect_flag: int (1: The EE is connecting with TC; 0: The EE is disconnected with TC) • TC_EEManager • Sockets: EESocket[MAX_EE_NUM] • Max MPL: int ( The maximum number of the EEs whose Busy Flag is 1) • Current MPL: int

  8. DataStructure (5) • Execute Element (EE) • Socket Handle: int • RPC Handle: Client* • IP Address: unsigned long • Port: int

  9. When an EE is executed TC • TransactionEnd • IP Address • Port • (RPC) • TypeID • Parameter • (Socket) EE_Open(ip_addr, port) (RPC) Transaction Action Library EE

  10. Relationship between Transaction Load Information and CDTC • CDTC is based on the cost of transactions executed at Execute • element • The cost of transaction is different from the site where the • transaction execute • The cost of transaction is decided by the load information • and the cost of the transaction could be calculated via the • load information and the distribution status of database • The load information of the transactions is collected while the EEs execute these transactions

  11. Cost-based Approaches • Cost-based Approach - 1 • Static approach(CTC-Static) • Static Coordinator Description File(SCDF) T  S • T is the type ID of transaction • S is the ip address of the host where the transaction t is executed. • Transaction Placement Policy • Select an idle EE for the submitted transaction according to SCDF • Transaction Scheduling Policy • Select the next transaction which is blocked also according to SCDF

  12. Cost-based Approaches • Cost-based Approach - 2 • Transaction Priority Oriented approach(CTC-TPOA) • Transaction Placement Policy Look through all of the EEs to find an idle EE to execute the transaction submitted • Transaction Scheduling Policy Look through all of the EEs to find an idle EE to execute the blocked transaction whose arrival time is the earliest.

  13. Cost-based Approaches • Cost-based Approaches -3 • Low-Cost Oriented approach(CTC-LCOA) • Priority Value (PV) PV(t, s) = Cost(t,s) – Preemption Factor(t) • Cost(t,s)is the cost for executing t at host s. • If a transaction whose arrival time is laterthan that Of t is coordinated in prior to t, the Preemption Factor of t is increased by k • Transaction Placement Policy It is the same with CTC-TPOA • Transaction Scheduling Policy For the site where the EE has finished a transaction, look through all of the blocked transaction and coordinate the transaction whose PV is the lowest to the site Distribution of Active EEs is fixed in CTC-LCOA

  14. Relationship between Priority and cost-based approaches • Just in transaction scheduling policy, the priority is considered. • In CTC-Static, the priority is not be considered • In CTC-TPOA, just the priority is considered. • In CTC-LCOA, not only the priority but also the cost is considered.

More Related