Upload
Download free for 30 days
Login
Submit search
ch20 Database System Architecture by Rizvee
Download as PPTX, PDF
0 likes
92 views
A
AbirHasan121147
This is a slide of chapter 20 database system architecture from database system concepts 7th Edition
Data & Analytics
Read more
1 of 48
Download now
Download to read offline
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
More Related Content
PPTX
Sayed database system_architecture
Sayed Ahmed
PPTX
Sayed database system_architecture
Sayed Ahmed
PPTX
Database architecture
1Arun_Pandey
PPT
Ch18
Welly Dian Astika
PDF
Ch20
Subhankar Chowdhury
PPT
Ch20
Aravindharamanan S
PPT
Ch17
suman banoth
PPT
Transaction management and concurrency control
Dhani Ahmad
Sayed database system_architecture
Sayed Ahmed
Sayed database system_architecture
Sayed Ahmed
Database architecture
1Arun_Pandey
Ch18
Welly Dian Astika
Ch20
Subhankar Chowdhury
Ch20
Aravindharamanan S
Ch17
suman banoth
Transaction management and concurrency control
Dhani Ahmad
Similar to ch20 Database System Architecture by Rizvee
(20)
PPTX
Server system architecture
Faiza Hafeez
PDF
Distributed_databases.pdf
deva763607
PPTX
Hbase hivepig
Radha Krishna
PPTX
L-5database management systems sem 3 btech . .pptx
PritamMondal650031
PPT
Ch24
Welly Dian Astika
PPTX
Database System Architectures
Information Technology
PPTX
Module 3 - DBMS System Architecture Principles
KEERTHANAR250835
PPTX
Csc concepts
Ashwin Ananthapadmanabhan
PPTX
Hbase hive pig
Xuhong Zhang
PDF
Why & how to optimize sql server for performance from design to query
Antonios Chatzipavlis
PDF
Slow things down to make them go faster [FOSDEM 2022]
Jimmy Angelakos
PDF
Advanced database chapter three PowerPoint
afendimohammed288
PDF
Architecting for the cloud elasticity security
Len Bass
PDF
(ATS4-PLAT08) Server Pool Management
BIOVIA
PDF
8 application servers_v2
ashish61_scs
PPT
blockchain ransactions presentation part 1
Khushiarora636505
PDF
25 snowflake
剑飞 陈
PPT
Transaction concurrency control
Anand Grewal
PPTX
Sql Server
SandyShin
PPT
blockchain ransactions presentation part 1
Khushiarora636505
Server system architecture
Faiza Hafeez
Distributed_databases.pdf
deva763607
Hbase hivepig
Radha Krishna
L-5database management systems sem 3 btech . .pptx
PritamMondal650031
Ch24
Welly Dian Astika
Database System Architectures
Information Technology
Module 3 - DBMS System Architecture Principles
KEERTHANAR250835
Csc concepts
Ashwin Ananthapadmanabhan
Hbase hive pig
Xuhong Zhang
Why & how to optimize sql server for performance from design to query
Antonios Chatzipavlis
Slow things down to make them go faster [FOSDEM 2022]
Jimmy Angelakos
Advanced database chapter three PowerPoint
afendimohammed288
Architecting for the cloud elasticity security
Len Bass
(ATS4-PLAT08) Server Pool Management
BIOVIA
8 application servers_v2
ashish61_scs
blockchain ransactions presentation part 1
Khushiarora636505
25 snowflake
剑飞 陈
Transaction concurrency control
Anand Grewal
Sql Server
SandyShin
blockchain ransactions presentation part 1
Khushiarora636505
Ad
Recently uploaded
(20)
PPTX
Overview_of_Computing_Presentation.pptxxx
nyamero235
PPTX
Sistem Informasi Manejemn-Sistem Manajemen Database
olyviacarla
PDF
Stochastic Programming problem presentationLuedtke.pdf
ssuserbb7ed0
PDF
Book Trusted Companions in Delhi – 24/7 Available Delhi Personal Meeting Ser...
Usdf
PPTX
Bussiness Plan S Group of college 2020-23 Final
Muhammad439928
PDF
MISO Deep-NARX Forecasting for Energy and Electricity Demand/Price Data
Sione Palu
PDF
NU-MEP-Standards معايير تصميم جامعية .pdf
waddahabbad
PDF
Teal Blue Futuristic Metaverse Presentation.pdf
DaNialPanjang
PPTX
Understanding AI: Basics on Artificial Intelligence and Machine Learning
AnjanaManiyote1
PDF
Memberlist of Indian Paintrs and coarutinfjnzbdscjhz
PareshTadas1
PPTX
AI-Augmented Business Process Management Systems
Marlon Dumas
PPT
genetics-16bbbbbbhhbbbjjjjjjjjffggg11-.ppt
hanzalahjunaid90
PPTX
An Introduction to Lean Six Sigma for Bilginer
ArupMukherjee32
PPTX
Fkrjrkrkekekekeekkekswkjdjdjddwkejje.pptx
Nandy31
PPTX
cyber row.pptx for cyber proffesionals and hackers
AbhPal
PPTX
REAL of PPT_P1_5019211081 (1).pdf_20250718_084609_0000.pptx
kanayaazkia
PPT
Handout for Lean and Six Sigma application
ArupMukherjee32
PDF
American Journal of Multidisciplinary Research and Review
American Journal of Multidisciplinary Research and Review
PPTX
The future of AIThe future of AIThe future of AI
deffa5
PPTX
1.Introduction to orthodonti hhhgghhcs.pptx
hanzalahjunaid90
Overview_of_Computing_Presentation.pptxxx
nyamero235
Sistem Informasi Manejemn-Sistem Manajemen Database
olyviacarla
Stochastic Programming problem presentationLuedtke.pdf
ssuserbb7ed0
Book Trusted Companions in Delhi – 24/7 Available Delhi Personal Meeting Ser...
Usdf
Bussiness Plan S Group of college 2020-23 Final
Muhammad439928
MISO Deep-NARX Forecasting for Energy and Electricity Demand/Price Data
Sione Palu
NU-MEP-Standards معايير تصميم جامعية .pdf
waddahabbad
Teal Blue Futuristic Metaverse Presentation.pdf
DaNialPanjang
Understanding AI: Basics on Artificial Intelligence and Machine Learning
AnjanaManiyote1
Memberlist of Indian Paintrs and coarutinfjnzbdscjhz
PareshTadas1
AI-Augmented Business Process Management Systems
Marlon Dumas
genetics-16bbbbbbhhbbbjjjjjjjjffggg11-.ppt
hanzalahjunaid90
An Introduction to Lean Six Sigma for Bilginer
ArupMukherjee32
Fkrjrkrkekekekeekkekswkjdjdjddwkejje.pptx
Nandy31
cyber row.pptx for cyber proffesionals and hackers
AbhPal
REAL of PPT_P1_5019211081 (1).pdf_20250718_084609_0000.pptx
kanayaazkia
Handout for Lean and Six Sigma application
ArupMukherjee32
American Journal of Multidisciplinary Research and Review
American Journal of Multidisciplinary Research and Review
The future of AIThe future of AIThe future of AI
deffa5
1.Introduction to orthodonti hhhgghhcs.pptx
hanzalahjunaid90
Ad
ch20 Database System Architecture by Rizvee
1.
Database System Concepts,
7th Ed. ©Silberschatz, Korth and Sudarshan See www.db-book.com for conditions on re- use Chapter 20: Database System Architectures
2.
©Silberschatz, Korth and 20.2 Database
System Concepts - 7th Outline ▪ Centralized Database Systems ▪ Server System Architectures ▪ Parallel Systems ▪ Distributed Systems ▪ Network Types
3.
©Silberschatz, Korth and 20.3 Database
System Concepts - 7th Centralized Database Systems ▪ Run on a single computer system ▪ Single-user system ▪ Multi-user systems also known as server systems. • Service requests received from client systems • Multi-core systems with coarse-grained parallelism ▪ Typically, a few to tens of processor cores ▪ In contrast, fine-grained parallelism uses very large number of computers or nodes [Not belong to centralized database systems, rather distributed database systems] coarse-grained parallelism Few big tasks across few (4–64) CPU cores fine-grained parallelism Many tiny tasks across many machines or processors centralized database system is that all data is stored, managed, and processed on a single centralized server or system Horizontal scaling (Scale out) : increasing the number of machines/nodes in the cluster Vertical scaling (Scale Up): increasing the number of CPUs, RAM, Storage
4.
©Silberschatz, Korth and 20.4 Database
System Concepts - 7th Server System Architecture ▪ Server systems can be broadly categorized into two kinds: • Transaction servers ▪ Widely used in relational database systems, and ▪ Ensure ACID Properties: Consistency, Atomicity, Isolation, and Durability. • Data servers ▪ Parallel data servers used to implement high-performance transaction processing systems
5.
©Silberschatz, Korth and 20.5 Database
System Concepts - 7th Transaction Servers ▪ Also called query server systems or SQL server systems • Clients send requests to the server • Transactions are executed at the server • Results are shipped back to the client. ▪ Requests are specified in SQL and communicated to the server through a remote procedure call (RPC) mechanism. • SQL: SELECT * FROM Orders WHERE CustomerID = 5; • RPC: Call executeSQL("SELECT * FROM Orders WHERE CustomerID = 5") ▪ Transactional RPC allows many RPC calls to form a transaction. So any of the failing or RPC call will revert back all the previous calls. 1. StartTransaction(), 2. RPC: Insert new order, 3. RPC: Update customer balance 4. RPC: Deduct inventory, 5.CommitTransaction() ▪ Applications typically use ODBC/JDBC APIs to communicate with transaction servers Connection conn = DriverManager.getConnection(url, user, pass); conn.setAutoCommit(false); Statement stmt = conn.createStatement(); stmt.executeUpdate("UPDATE accounts SET balance = balance - 100 WHERE id = 1"); stmt.executeUpdate("UPDATE accounts SET balance = balance + 100 WHERE id = 2"); conn.commit(); Example with JDBC
6.
©Silberschatz, Korth and 20.6 Database
System Concepts - 7th Transaction System Processes (Cont.)
7.
©Silberschatz, Korth and 20.7 Database
System Concepts - 7th Transaction Server Process Structure ▪ A typical transaction server consists of multiple processes accessing data in shared memory ▪ Shared memory contains shared data • Buffer pool [For buffering] • Lock table [Lock Mechanism] • Log buffer [Activity Logging] • Cached query plans (reused if same query submitted again) ▪ All database processes can access shared memory ▪ Server processes • These receive user queries (transactions), execute them and send results back • Processes may be multithreaded, allowing a single process to execute several user queries concurrently • Typically, multiple multithreaded server processes
8.
©Silberschatz, Korth and 20.8 Database
System Concepts - 7th Transaction Server Processes (Cont.) ▪ Database writer process • Output modified buffer blocks to disks continually ▪ Log writer process • Server processes simply add log records to log record buffer • Log writer process outputs log records to stable storage. ▪ Checkpoint process • Performs periodic checkpoints ▪ Process monitor process • Monitors other processes, and takes recovery actions if any of the other processes fail ▪ E.g. aborting any transactions being executed by a server process and restarting it
9.
©Silberschatz, Korth and 20.9 Database
System Concepts - 7th Transaction System Processes (Cont.) ▪ Lock manager process • To avoid overhead of interprocess communication for lock request/grant, each database process operates directly on the lock table ▪ Instead of sending requests to lock manager process • Lock manager process still used for deadlock detection ▪ To ensure that no two processes are accessing the same data structure at the same time, databases systems implement mutual exclusion using either • Atomic instructions ▪ Test-And-Set ▪ Compare-And-Swap (CAS) • Operating system semaphores ▪ Higher overhead than atomic instructions ▪ Important for process synchronization and mutual exclusion a semaphore is a synchronization primitive used to control access to shared resources in a concurrent system like multitasking processes or threads. wait() (also called P() or down()) signal() (also called V() or up())
10.
©Silberschatz, Korth and 20.10 Database
System Concepts - 7th Atomic Instructions ▪ Test-And-Set(M) • Memory location M, initially 0 • Test-and-set(M) sets M to 1, and returns old value of M ▪ Return value 0 indicates process has acquired the mutex ▪ Return value 1 indicates someone is already holding the mutex • Must try again later ▪ Release of mutex done by setting M = 0 // Lock variable int M = 0; // Process trying to acquire the lock while (TestAndSet(M) == 1) { // Busy-wait (spinlock) } // Critical section // ... // Release the lock M = 0;
11.
©Silberschatz, Korth and 20.11 Database
System Concepts - 7th Atomic Instructions ▪ Compare-and-swap(M, V1, V2) • Atomically do following ▪ If M = V1, set M = V2 and return success ▪ Else return failure • With M = 0 initially, CAS(M, 0, 1) equivalent to test-and-set(M) • Can use CAS(M, 0, id) where id = thread-id or process-id to record who has the mutex
12.
©Silberschatz, Korth and 20.12 Database
System Concepts - 7th Data Servers/Data Storage Systems ▪ Data items are shipped to clients where processing is performed. Instead of doing heavy computation or query processing on the server, the raw data is sent to the client, which does the necessary processing (e.g., filtering, aggregating).This system is known as client-centric system. E.g., Edge Computing. ▪ Updated data items written back to server. [Persistency] ▪ Earlier generation data servers operated on disk pages, each potentially containing multiple data items, or occasionally at the level of individual items. In contrast, current-generation data storage systems operate exclusively at the level of individual data items. ▪ Current generation commonly includes: • Commonly used data item formats include JSON, XML, or just uninterpreted binary strings
13.
©Silberschatz, Korth and 20.13 Database
System Concepts - 7th Data Servers/Storage Systems (Cont.) ▪ Prefetching • Prefetch items that may be used soon ▪ Data caching • Cache coherence ▪ Lock caching • Locks can be cached by client across transactions • Locks can be called back by the server ▪ Adaptive lock granularity • Lock granularity escalation ▪ switch from finer granularity (e.g. tuple) lock to coarser • Lock granularity de-escalation ▪ Start with coarse granularity to reduce overheads, switch to finer granularity in case of more concurrency conflict at server ▪ Details in book
14.
©Silberschatz, Korth and 20.14 Database
System Concepts - 7th Data Servers (Cont.) ▪ Data Caching • Data can be cached at client even in between transactions • But check that data is up-to-date before it is used (cache coherency) • Check can be done when requesting lock on data item ▪ Lock Caching (not immediate release of the lock after transaction execution) • Locks can be retained by client system even in between transactions • Transactions can acquire cached locks locally, without contacting server • Server calls back locks from clients when it receives conflicting lock request. If another client requests a lock that conflicts (e.g., wants to write to the same data), the server sends a callback to the caching client: return the lock ▪ If any local transaction is using it, it can not return, otherwise it returns ▪ Client returns lock once no local transaction is using it. ▪ This idea is similar to lock callback on prefetch, but across transactions, keeping lock though the transaction has already ended.
15.
©Silberschatz, Korth and 20.15 Database
System Concepts - 7th Parallel Systems ▪ Parallel database systems consist of multiple processors and multiple disks connected by a fast interconnection network. ▪ Motivation: handle workloads beyond what a single computer system can handle ▪ High performance transaction processing • E.g. handling user requests at web-scale ▪ Decision support on very large amounts of data • E.g. data gathered by large web sites/apps
16.
©Silberschatz, Korth and 20.16 Database
System Concepts - 7th Parallel Systems (Cont.) ▪ A coarse-grain parallel machine consists of a small number of powerful processors ▪ A massively parallel or fine grain parallel machine utilizes thousands of smaller processors. • Typically hosted in a data center ▪ Two main performance measures: • Throughput --- the number of tasks that can be completed in a given time interval • Response time --- the amount of time it takes to complete a single task from the time it is submitted
17.
©Silberschatz, Korth and 20.17 Database
System Concepts - 7th Speed-Up and Scale-Up ▪ Speedup: a fixed-sized problem executing on a small system is given to a system which is N-times larger. • Measured by: speedup = small system elapsed time large system elapsed time • Speedup is linear if equation equals N. ▪ Scaleup: increase the size of both the problem and the system • N-times larger system used to perform N-times larger job • Measured by: scaleup = small system small problem elapsed time big system big problem elapsed time • Scale up is linear if equation equals 1.
18.
©Silberschatz, Korth and 20.18 Database
System Concepts - 7th Speedup A particular problem that does not speed up even if the presence of additional resources
19.
©Silberschatz, Korth and 20.19 Database
System Concepts - 7th Scaleup TS = Time scale for system coordination, communication, overhead TL = Time scale for local computation or problem solving
20.
©Silberschatz, Korth and 20.20 Database
System Concepts - 7th Batch and Transaction Scaleup ▪ Batch scaleup: • A single large job; typical of most decision support queries and scientific simulation. • Use an N-times larger computer on N-times larger problem. ▪ Transaction scaleup: • Numerous small queries submitted by independent users to a shared database; typical transaction processing and timesharing systems. • N-times as many users submitting requests (hence, N-times as many requests) to an N-times larger database, on an N-times larger computer. • Well-suited to parallel execution.
21.
©Silberschatz, Korth and 20.21 Database
System Concepts - 7th Factors Limiting Speedup and Scaleup Speedup and scaleup are often sublinear due to: ▪ Startup/sequential costs: Cost of starting up multiple processes, and sequential computation before/after parallel computation • May dominate computation time, if the degree of parallelism is high • Suppose p fraction of computation can be parallelized. So, (1-p) fraction of the computation must be run sequentially. • Amdahl’s law: speedup limited to: 1 / [(1-p)+(p/n)] • Gustafson’s law: scaleup limited to: (1-p) + np ▪ Interference: Processes accessing shared resources (e.g.,system bus, disks, or locks) compete with each other, thus spending time waiting on other processes, rather than performing useful work. ▪ Skew: Increasing the degree of parallelism increases the variance in service times of parallely executing tasks. Overall execution time determined by slowest of parallely executing tasks.
22.
©Silberschatz, Korth and 20.22 Database
System Concepts - 7th Amdahl’s law: speedup limited to: 1 / [(1-p)+(p/n)] Purpose: Amdahl's Law calculates the maximum theoretical speedup of a program when increasing the number of processors for a fixed problem size. It assumes that the total amount of work remains constant regardless of the number of processors. Total Time with Parallelism: ● New execution time = (Time for serial part) + (Time for parallel part on n processors) ● New execution time = (1 p)×1+(p)×(1/n) − ● New execution time = (1 p)+(p/n) − Speedup Calculation: Speedup is defined as: ● S=Original Execution Time/New Execution Time ● Since we normalized original time to 1, ● S=1/[(1 p)+(p/n)] −
23.
©Silberschatz, Korth and 20.23 Database
System Concepts - 7th Gustafson’s law: scaleup limited to: (1-p) + np Purpose: Gustafson's Law calculates the scaled speedup for a parallel system where the problem size scales with the number of processors. It addresses the limitation of Amdahl's Law by assuming that as you add more processors, you also solve a larger problem in roughly the same amount of time. Workload Scales with Processors: The core idea here is that if you have more processors, you'll tackle a proportionally larger problem. ● Assume that the parallel part of the program scales linearly with n processors. ● Let the time taken by the parallel portion on a single processor be p. ● Let the time taken by the serial portion on a single processor be (1−p). ● The total time on a single processor for the scaled problem would be (1−p)+n×p (because the parallel part is now n times larger for the n processors). Time on n Processors: On n processors, the serial part still takes (1−p) time. The scaled parallel part, which took n×p on a single processor, now takes just p time on n processors (since it's distributed among them). ● Total time on n processors = (1−p)+p=1. (This is the key assumption of Gustafson's Law: you scale the problem size such that the execution time on n processors is approximately the same as the original problem on 1 processor). Speedup Calculation: Speedup is defined as: ● S=Original Execution Time (scaled problem on 1 processor)/New Execution Time (scaled problem on n processors) ● S=[(1−p)+np]/1 ● S=(1−p)+np
24.
©Silberschatz, Korth and 20.24 Database
System Concepts - 7th Interconnection Network Architectures ▪ Bus. System components send data on and receive data from a single communication bus; • Does not scale well with increasing parallelism. ▪ Mesh. Components are arranged as nodes in a grid, and each component is connected to all adjacent components • Communication links grow with growing number of components, and so scales better. • But may require 2√n hops to send message to a node (or √n with wraparound connections at edge of grid). ▪ Hypercube. Components are numbered in binary; components are connected to one another if their binary representations differ in exactly one bit. • n components are connected to log(n) other components and can reach each other via at most log(n) links; reduces communication delays. ▪ Tree-like Topology. Widely used in data centers today
25.
©Silberschatz, Korth and 20.25 Database
System Concepts - 7th Interconnection Architectures
26.
©Silberschatz, Korth and 20.26 Database
System Concepts - 7th Interconnection Network Architectures ▪ Tree-like or Fat-Tree Topology: widely used in data centers today • Top of rack switch for approx 40 machines in rack • Each top of rack switch connected to multiple aggregation switches. • Aggregation switches connect to multiple core switches. ▪ Data center fabric
27.
©Silberschatz, Korth and 20.27 Database
System Concepts - 7th Network Technologies ▪ Ethernet • 1 Gbps and 10 Gbps common, 40 Gbps and 100 Gbps are available at higher cost ▪ Fiber Channel • 32-138 Gbps available ▪ Infiniband • A very-low-latency networking technology ▪ 0.5 to 0.7 microseconds, compared to a few microseconds for optimized ethernet
28.
©Silberschatz, Korth and 20.28 Database
System Concepts - 7th Parallel Database Architectures
29.
©Silberschatz, Korth and 20.29 Database
System Concepts - 7th Shared Memory ▪ Processors (or processor cores) and disks have access to a common memory • Via a bus in earlier days, through an interconnection network today ▪ Extremely efficient communication between processors ▪ Downside: shared-memory architecture is not scalable beyond 64 to 128 processor cores • Memory interconnection network becomes a bottleneck
30.
©Silberschatz, Korth and 20.30 Database
System Concepts - 7th Modern Shared Memory Architecture Own local memory However, through X or interconnection any processor can share other’s memory
31.
©Silberschatz, Korth and 20.31 Database
System Concepts - 7th Cache Levels ▪ Cache line: typically 64 bytes in today’s processors, the smallest unit of data which i s transferred between RAM (main memory) and CPU caches ▪ Cache levels within a single multi-core processor ▪ Shared memory system can have multiple processors, each with its own cache levels
32.
©Silberschatz, Korth and 20.32 Database
System Concepts - 7th Cache Coherency ▪ Cache coherency: • Local cache may have out of date value • Strong vs weak consistency models • With weak consistency, need special instructions to ensure cache is up to date ▪ Memory barrier instructions • Store barrier (sfence) ▪ Instruction returns after forcing cached data to be written to memory and invalidations sent to all caches. An sfence instruction ensures that all write (store) operations initiated before the sfence instruction are completed and made globally visible • Load barrier (lfence) ▪ Returns after ensuring all pending cache invalidations are processed. An lfence instruction ensures that all read (load) operations initiated before the lfence instruction are completed before any read operations initiated after the lfence instruction • mfence instruction does both of above ▪ Locking code usually takes care of barrier instructions • Lfence done after lock acquisition and sfence done before lock release Buffer -> cache -> main memory -> disk
33.
©Silberschatz, Korth and 20.33 Database
System Concepts - 7th Shared Disk ▪ All processors can directly access all disks via an interconnection network, but the processors have private memories. • Architecture provides a degree of fault-tolerance — if a processor fails, the other processors can take over its tasks ▪ the data of the failed processor is resident on disks that are accessible from all processors. ▪ Downside: bottleneck now occurs at interconnection to the disk subsystem. Too much processor / too much disk connectivity
34.
©Silberschatz, Korth and 20.34 Database
System Concepts - 7th Storage Area Network (SAN)
35.
©Silberschatz, Korth and 20.35 Database
System Concepts - 7th Shared Nothing ▪ Node consists of a processor, memory, and one or more disks ▪ All communication via interconnection network ▪ Can be scaled up to thousands of processors without interference. ▪ Main drawback: cost of communication and non-local disk access; sending data involves software interaction at both ends.
36.
©Silberschatz, Korth and 20.36 Database
System Concepts - 7th Hierarchical ▪ Combines characteristics of shared-memory, shared-disk, and shared- nothing architectures. • Top level is a shared-nothing architecture ▪ With each node of the system being a shared-memory system • Alternatively, top level could be a shared-disk system ▪ With each node of the system being a shared-memory system
37.
©Silberschatz, Korth and 20.37 Database
System Concepts - 7th Shared-Memory Vs Shared-Nothing ▪ Shared-memory internally looks like shared-nothing! • Each processor has direct access to its own memory, and indirect (hardware level) access to rest of memory • Also called non-uniform memory architecture (NUMA) ▪ Shared-nothing can be made to look like shared memory • Reduce the complexity of programming such systems by distributed virtual-memory abstraction • Remote Direct Memory Access (RDMA) provides very low-latency shared memory abstraction on shared-nothing systems ▪ Often implemented on top of infiniband due it its very-low- latency • But careless programming can lead to performance issues
38.
©Silberschatz, Korth and 20.38 Database
System Concepts - 7th Distributed Systems ▪ Data spread over multiple machines (also referred to as sites or nodes). ▪ Local-area networks (LANs) ▪ Wide-area networks (WANs) • Higher latency
39.
©Silberschatz, Korth and 20.39 Database
System Concepts - 7th Distributed Databases ▪ Homogeneous distributed databases • Same software/schema on all sites, data may be partitioned among sites • Goal: provide a view of a single database, hiding details of distribution ▪ Heterogeneous distributed databases • Different software/schema on different sites • Goal: integrate existing databases to provide useful functionality ▪ Differentiate between local transactions and global transactions • A local transaction accesses data in the single site at which the transaction was initiated. • A global transaction either accesses data in a site different from the one at which the transaction was initiated or accesses data in several different sites.
40.
©Silberschatz, Korth and 20.40 Database
System Concepts - 7th Data Integration and Distributed Databases ▪ Data integration between multiple distributed databases ▪ Benefits: • Sharing data – users at one site able to access the data residing at some other sites. Example: ● A university has a distributed database: one part stores student records, another stores financial information, and a third stores library data, each on different servers or campuses. ● A student advisor can pull data from all three databases through a single query interface — even though the data is stored on different systems. • Autonomy – each site is able to retain a degree of control over data stored locally. ▪ In a supply chain network, each company (manufacturer, distributor, retailer) maintains its own database. ▪ They integrate their systems for inventory tracking or order management, but each company still decides how its database is structured, who can access it, and how updates are made.
41.
©Silberschatz, Korth and 20.41 Database
System Concepts - 7th Availability ▪ Network Partitioning: A network partition occurs when communication between parts of a distributed system is disrupted — nodes are split into isolated "partitions" that can't talk to each other, even though they may still be running. ▪ Availability of system • If all nodes are required for system to function, failure of even one node stops system functioning. • Higher system availability through redundancy ▪ data can be replicated at remote sites, and system can function even if a site fails.
42.
©Silberschatz, Korth and 20.42 Database
System Concepts - 7th Implementation Issues for Distributed Databases ▪ Atomicity needed even for transactions that update data at multiple sites ▪ The two-phase commit protocol (2PC) is used to ensure atomicity • Basic idea: each site executes transaction until just before commit, and the leaves final decision to a coordinator • Each site must follow decision of coordinator, even if there is a failure while waiting for coordinators decision ▪ 2PC is not always appropriate: other transaction models based on persistent messaging, and workflows, are also used ▪ Distributed concurrency control (and deadlock detection) required ▪ Data items may be replicated to improve data availability ▪ Details of all above in Chapter 24
43.
©Silberschatz, Korth and 20.43 Database
System Concepts - 7th Cloud Based Services ▪ Cloud computing widely adopted today • On-demand provisioning and elasticity (Memory increase, processor increase) ▪ ability to scale up at short notice and to release of unused resources for use by others ▪ Infrastructure as a service • Virtual machines/real machines ▪ Platform as a service • Storage, databases, application server ▪ Software as a service • Enterprise applications, emails, shared documents, etc, ▪ Potential drawbacks • Security • Network bandwidth
44.
©Silberschatz, Korth and 20.44 Database
System Concepts - 7th Cloud Service Models
45.
©Silberschatz, Korth and 20.45 Database
System Concepts - 7th Application Deployment Alternatives Individual Machines Virtual Machines Containers (e.g. VMWare, KVM, ..) (e.g. Docker)
46.
©Silberschatz, Korth and 20.46 Database
System Concepts - 7th Application Deployment Architectures ▪ Services ▪ Microservice Architecture • Application uses a variety of services • Service can add or remove instances as required ▪ Kubernetes supports containers, and microservices
47.
Database System Concepts,
7th Ed. ©Silberschatz, Korth and Sudarshan See www.db-book.com for conditions on re- use End of Chapter 20
Download