پاورپوینت کامل Chapter 22: Distributed Databases 100 اسلاید در PowerPoint
توجه : این فایل به صورت فایل power point (پاور پوینت) ارائه میگردد
پاورپوینت کامل Chapter 22: Distributed Databases 100 اسلاید در PowerPoint دارای ۱۰۰ اسلاید می باشد و دارای تنظیمات کامل در PowerPoint می باشد و آماده ارائه یا چاپ است
شما با استفاده ازاین پاورپوینت میتوانید یک ارائه بسیارعالی و با شکوهی داشته باشید و همه حاضرین با اشتیاق به مطالب شما گوش خواهند داد.
لطفا نگران مطالب داخل پاورپوینت نباشید، مطالب داخل اسلاید ها بسیار ساده و قابل درک برای شما می باشد، ما عالی بودن این فایل رو تضمین می کنیم.
توجه : در صورت مشاهده بهم ریختگی احتمالی در متون زیر ،دلیل ان کپی کردن این مطالب از داخل فایل می باشد و در فایل اصلی پاورپوینت کامل Chapter 22: Distributed Databases 100 اسلاید در PowerPoint،به هیچ وجه بهم ریختگی وجود ندارد
بخشی از مطالب داخلی اسلاید ها
پاورپوینت کامل Chapter 22: Distributed Databases 100 اسلاید در PowerPoint
اسلاید ۴: Homogeneous Distributed DatabasesIn a homogeneous distributed databaseAll sites have identical software Are aware of each other and agree to cooperate in processing user requests.Each site surrenders part of its autonomy in terms of right to change schemas or softwareAppears to user as a single systemIn a heterogeneous distributed databaseDifferent sites may use different schemas and softwareDifference in schema is a major problem for query processingDifference in software is a major problem for transaction processingSites may not be aware of each other and may provide only limited facilities for cooperation in transaction processing
اسلاید ۵: Distributed Data StorageAssume relational data modelReplicationSystem maintains multiple copies of data, stored in different sites, for faster retrieval and fault tolerance.FragmentationRelation is partitioned into several fragments stored in distinct sitesReplication and fragmentation can be combinedRelation is partitioned into several fragments: system maintains several identical replicas of each such fragment.
اسلاید ۶: Data ReplicationA relation or fragment of a relation is replicated if it is stored redundantly in two or more sites.Full replication of a relation is the case where the relation is stored at all sites.Fully redundant databases are those in which every site contains a copy of the entire database.
اسلاید ۷: Data Replication (Cont.)Advantages of ReplicationAvailability: failure of site containing relation r does not result in unavailability of r is replicas exist.Parallelism: queries on r may be processed by several nodes in parallel.Reduced data transfer: relation r is available locally at each site containing a replica of r.Disadvantages of ReplicationIncreased cost of updates: each replica of relation r must be updated.Increased complexity of concurrency control: concurrent updates to distinct replicas may lead to inconsistent data unless special concurrency control mechanisms are implemented.One solution: choose one copy as primary copy and apply concurrency control operations on primary copy
اسلاید ۸: Data FragmentationDivision of relation r into fragments r1, r2, …, rn which contain sufficient information to reconstruct relation r.Horizontal fragmentation: each tuple of r is assigned to one or more fragmentsVertical fragmentation: the schema for relation r is split into several smaller schemasAll schemas must contain a common candidate key (or superkey) to ensure lossless join property.A special attribute, the tuple-id attribute may be added to each schema to serve as a candidate key.Example : relation account with following schemaAccount = (branch_name, account_number, balance )
اسلاید ۹: Horizontal Fragmentation of account Relationbranch_nameaccount_numberbalanceHillsideHillsideHillsideA-305A-226A-15550033662account1 = branch_name=“Hillside” (account )branch_nameaccount_numberbalanceValleyviewValleyviewValleyviewValleyviewA-177A-402A-408A-639205100001123750account2 = branch_name=“Valleyview” (account )
اسلاید ۱۰: Vertical Fragmentation of employee_info Relationbranch_namecustomer_nametuple_idHillsideHillsideValleyviewValleyviewHillsideValleyviewValleyviewLowmanCampCampKahnKahnKahnGreendeposit1 = branch_name, customer_name, tuple_id (employee_info )1234567account_numberbalancetuple_id500336205100006211237501234567A-305A-226A-177A-402A-155A-408A-639deposit2 = account_number, balance, tuple_id (employee_info )
اسلاید ۱۱: Advantages of FragmentationHorizontal:allows parallel processing on fragments of a relationallows a relation to be split so that tuples are located where they are most frequently accessedVertical: allows tuples to be split so that each part of the tuple is stored where it is most frequently accessedtuple-id attribute allows efficient joining of vertical fragmentsallows parallel processing on a relationVertical and horizontal fragmentation can be mixed.Fragments may be successively fragmented to an arbitrary depth.
اسلاید ۱۲: Data TransparencyData transparency: Degree to which system user may remain unaware of the details of how and where the data items are stored in a distributed systemConsider transparency issues in relation to:Fragmentation transparencyReplication transparencyLocation transparency
اسلاید ۱۳: Naming of Data Items – Criteria1. Every data item must have a system-wide unique name.2. It should be possible to find the location of data items efficiently.3. It should be possible to change the location of data items transparently.4. Each site should be able to create new data items autonomously.
اسلاید ۱۴: Centralized Scheme – Name ServerStructure:name server assigns all nameseach site maintains a record of local data itemssites ask name server to locate non-local data itemsAdvantages:satisfies naming criteria 1-3Disadvantages:does not satisfy naming criterion 4name server is a potential performance bottleneckname server is a single point of failure
اسلاید ۱۵: Use of AliasesAlternative to centralized scheme: each site prefixes its own site identifier to any name that it generates i.e., site 17.account.Fulfills having a unique identifier, and avoids problems associated with central control.However, fails to achieve network transparency.Solution: Create a set of aliases for data items; Store the mapping of aliases to the real names at each site.The user can be unaware of the physical location of a data item, and is unaffected if the data item is moved from one site to another.
اسلاید ۱۶: Distributed TransactionsTransaction may access data at several sites.Each site has a local transaction manager responsible for:Maintaining a log for recovery purposesParticipating in coordinating the concurrent execution of the transactions executing at that site.Each site has a transaction coordinator, which is responsible for:Starting the execution of transactions that originate at the site.Distributing subtransactions at appropriate sites for execution.Coordinating the termination of each transaction that originates at the site, which may result in the transaction being committed at all sites or aborted at all sites.
اسلاید ۱۷: Transaction System Architecture
اسلاید ۱۸: System Failure ModesFailures unique to distributed systems:Failure of a site.Loss of massagesHandled by network transmission control protocols such as TCP-IPFailure of a communication linkHandled by network protocols, by routing messages via alternative linksNetwork partitionA network is said to be partitioned when it has been split into two or more subsystems that lack any connection between themNote: a subsystem may consist of a single node Network partitioning and site failures are generally indistinguishable.
اسلاید ۱۹: Commit ProtocolsCommit protocols are used to ensure atomicity across sitesa transaction which executes at multiple sites must either be committed at all the sites, or aborted at all the sites.not acceptable to have a transaction committed at one site and aborted at anotherThe two-phase commit (2PC) protocol is widely used The three-phase commit (3PC) protocol is more complicated and more expensive, but avoids some drawbacks of two-phase commit protocol. This protocol is not used in practice.
اسلاید ۲۰: Two Phase Commit Protocol (2PC)Assumes fail-stop model – failed sites simply stop working, and do not cause any other harm, such as sending incorrect messages to other sites.Execution of the protocol is initiated by the coordinator after the last step of the transaction has been reached.The protocol involves all the local sites at which the transaction executedLet T be a transaction initiated at site Si, and let the transaction coordinator at Si be Ci
اسلاید ۲۱: Phase 1: Obtaining a DecisionCoordinator asks all participants to prepare to commit transaction Ti.Ci adds the records <prepare T> to the log and forces log to stable storagesends prepare T messages to all sites at which T executedUpon receiving message, transaction manager at site determines if it can commit the transactionif not, add a record <no T> to the log and send abort T message to Ciif the transaction can be committed, then:add the record <ready T> to the logforce all records for T to stable storagesend ready T message to Ci
اسلاید ۲۲: Phase 2: Recording the DecisionT can be committed of Ci received a ready T message from all the participating sites: otherwise T must be aborted.Coordinator adds a decision record, <commit T> or <abort T>, to the log and forces record onto stable storage. Once the record stable storage it is irrevocable (even if failures occur)Coordinator sends a message to each participant informing it of the decision (commit or abort)Participants take appropriate action locally.
اسلاید ۲۳: Handling of Failures – Site FailureWhen site Si recovers, it examines its log to determine the fate oftransactions active at the time of the failure.Log contain <commit T> record: site executes redo (T)Log contains <abort T> record: site executes undo (T)Log contains <ready T> record: site must consult Ci to determine the fate of T.If T committed, redo (T)If T aborted, undo (T)The log contains no control records concerning T replies that Sk failed before responding to the prepare T message from Ci since the failure of Sk precludes the sending of such a response C1 must abort TSk must execute undo (T)
اسلاید ۲۴: Handling of Failures- Coordinator FailureIf coordinator fails while the commit protocol for T is executing then participating sites must decide on T’s fate:If an active site contains a <commit T> record in its log, then T must be committed.If an active site contains an <abort T> record in its log, then T must be aborted.If some active participating site does not contain a <ready T> record in its log, then the failed coordinator Ci cannot have decided to commit T. Can therefore abort T.If none of the above cases holds, then all active sites must have a <ready T> record in their logs, but no additional control records (such as <abort T> of <commit T>). In this case active sites must wait for Ci to recover, to find decision.Blocking problem : active sites may have to wait for failed coordinator to recover.
اسلاید ۲۵: Handling of Failures – Network PartitionIf the coordinator and all its participants remain in one partition, the failure has no effect on the commit protocol.If the coordinator and its participants belong to several partitions:Sites that are not in the partition containing the coordinator think the coordinator has failed, and execute the protocol to deal with failure of the coordinator.No harm results, but sites may still have to wait for decision from coordinator.The coordinator and the sites are in the same partition as the coordinator think that the sites in the other partition have failed, and follow the usual commit protocol.Again, no harm results
اسلاید ۲۶: Recovery and Concurrency ControlIn-doubt transactions have a <ready T>, but neither a <commit T>, nor an <abort T> log record.The recovering site must determine the commit-abort status of such transactions by contacting other sites; this can slow and potentially block recovery.Recovery algorithms can note lock information in the log.Instead of <ready T>, write out <ready T, L> L = list of locks held by T when the log is written (read locks can be omitted).For every in-doubt transaction T, all the locks noted in the <ready T, L> log record are reacquired.After lock reacquisition, transaction processing can resume; the commit or rollback of in-doubt transactions is performed concurrently with the execution of new transactions.
اسلاید ۲۷: Alternative Models of Transaction ProcessingNotion of a single transaction spanning multiple sites is inappropriate for many applicationsE.g. transaction crossing an organizational boundaryNo organization would like to permit an externally initiated transaction to block local transactions for an indeterminate periodAlternative models carry out transactions by sending messagesCode to handle messages must be carefully designed to ensure atomicity and durability properties for updatesIsolation cannot be guaranteed, in that intermediate stages are visible, but code must ensure no inconsistent states result due to concurrency Persistent messaging systems are systems that provide transactional properties to messages Messages are guaranteed to be delivered exactly onceWill discuss implementation techniques later
اسلاید ۲۸: Alternative Models (Cont.)Motivating example: funds transfer between two banksTwo phase commit would have the potential to block updates on the accounts involved in funds transferAlternative solution:Debit money from source account and send a message to other siteSite receives message and credits destination accountMessaging has long been used for distributed transactions (even before computers were invented!)Atomicity issue once transaction sending a message is committed, message must guaranteed to be deliveredGuarantee as long as destination site is up and reachable, code to handle undeliverable messages must also be available e.g. credit money back to source account. If sending transaction aborts, message must not be sent
اسلاید ۲۹: Error Conditions with Persistent MessagingCode to handle messages has to take care of variety of failure situations (even assuming guaranteed message delivery)E.g. if destination account does not exist, failure message must be sent back to source siteWhen failure message is received from destination site, or destination site itself does not exist, money must be deposited back in source accountProblem if source account has been closed get humans to take care of problemUser code executing transaction processing using 2PC does not have to deal with such failuresThere are many situations where extra effort of error handling is worth the benefit of absence of blockingE.g. pretty much all transactions across organizations
اسلاید ۳۰: Persistent Messaging and WorkflowsWorkflows provide a general model of transactional processing involving multiple sites and possibly human processing of certain stepsE.g. when a bank receives a loan application, it may need toContact external credit-checking agenciesGet approvals of one or more managers and then respond to the loan applicationWe study workflows in Chapter 25Persistent messaging forms the underlying infrastructure for workflows in a distributed environment
اسلاید ۳۱: Concurrency ControlModify concurrency control schemes for use in distributed environment.We assume that each site participates in the execution of a commit
- همچنین لینک دانلود به ایمیل شما ارسال خواهد شد به همین دلیل ایمیل خود را به دقت وارد نمایید.
- ممکن است ایمیل ارسالی به پوشه اسپم یا Bulk ایمیل شما ارسال شده باشد.
- در صورتی که به هر دلیلی موفق به دانلود فایل مورد نظر نشدید با ما تماس بگیرید.
مهسا فایل |
سایت دانلود فایل 