SlideShare a Scribd company logo
Module 3: Parallel Databases and
Distributed Databases
DATABASE SYSTEM ARCHITECTURES
Outline
• Centralized Database Systems
• Server System Architectures
• Parallel Systems
• Distributed Systems
• Network Types
Centralized Database Systems
• 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
Server System Architecture
• Server systems can be broadly categorized
into two kinds:
• Transaction servers
• Widely used in relational database systems, and
• Data servers
• Parallel data servers used to implement high-
performance transaction processing systems
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.
• Transactional RPC allows many RPC calls to form a
transaction.
• Applications typically use ODBC/JDBC APIs to communicate
with transaction servers
Transaction System Processes (Cont.)
Transaction Server Process Structure
• A typical transaction server consists of multiple processes accessing
data in shared memory
• Shared memory contains shared data
• Buffer pool
• Lock table
• Log buffer
• 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
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
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
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
• 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
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
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
Speed-Up
• Speedup: a fixed-sized problem executing on a small system is given to a system which is
N-times larger. The ability to execute the tasks in less time by increasing the number of
resources is called Speedup.
• Measured by:
speedup = Original elapsed time
elapsed time in parallel
where ,
time original = time required to execute the task using 1 processor
time parallel = time required to execute the task using 'n' processors
• Speedup is linear if equation equals N.
Speedup
Scale-Up
• Scaleup: scaleup is the ability of an application to maintain response time as the size
of the workload or the volume of transactions grows. Scaleup is frequently discussed in
terms of scalability.
• 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
Scaleup = Volume-m/Volume-1
• Volume1 is the volume of transactions carried out in the same period of time using one
processor, whereas Volumem is the volume of transactions carried out using m
processors.
• Scale up is linear if equation equals 1.
• Eg: Scaleup = 400/100. Scaled-up = 4.
Interpretation: Using four processors/discs, this scaleup of 4 is accomplished.
Scaleup
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.
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 is sequential
• Amdahl’s law: speedup limited to: 1 / [(1-p)+(p/n)]
• Gustafson’s law: scaleup limited to: 1 / [n(1-p)+p]
• 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.
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
Interconnection Architectures
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
Parallel Database Architectures
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
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.
Storage Area Network (SAN)
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.
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
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
Distributed Systems
• Data spread over multiple machines (also
referred to as sites or nodes).
• Local-area networks (LANs)
• Wide-area networks (WANs)
• Higher latency
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.
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.
• Autonomy – each site is able to retain a degree of
control over data stored locally.
Availability
• Network partitioning
• 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.
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
Cloud Based Services
• Cloud computing widely adopted today
• On-demand provisioning and elasticity
• 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
Cloud Service Models
Application Deployment Alternatives
Individual Machines Virtual Machines Containers
(e.g. VMWare, KVM, ..) (e.g. Docker)
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

More Related Content

Similar to Module 3 - DBMS System Architecture Principles (20)

PPTX
Chapter 20
Prashanth Singh
 
PPTX
unit 4.pptx
SUBHAMSHARANRA211100
 
PPTX
unit 4.pptx
SUBHAMSHARANRA211100
 
PDF
Week # 1.pdf
giddy5
 
PPTX
Big Data Storage Concepts from the "Big Data concepts Technology and Architec...
raghdooosh
 
PPTX
UNIT II DIS.pptx
Premkumar R
 
PDF
Architecting for the cloud elasticity security
Len Bass
 
PPT
Parallel processing
Shivalik college of engineering
 
PPTX
Disadvantages Distributed System.pptx
vlakshmirajendran1
 
PPTX
Design Issues of Distributed System (1).pptx
vlakshmirajendran1
 
PPT
System models for distributed and cloud computing
purplesea
 
PDF
Multithreaded Programming Part- I.pdf
Harika Pudugosula
 
PPTX
Chapter 3 Naming in distributed system.pptx
Tekle12
 
PPTX
Hpc 6 7
Yasir Khan
 
PPTX
High performance computing
punjab engineering college, chandigarh
 
PDF
aca pdf
anandmahto1820
 
PPTX
Simulation of Heterogeneous Cloud Infrastructures
CloudLightning
 
PDF
distributed system original.pdf
KirimanyiJovanntanda
 
PDF
Building Big Data Streaming Architectures
David Martínez Rego
 
PPTX
TASK AND DATA PARALLELISM in Computer Science pptx
dianachakauya
 
Chapter 20
Prashanth Singh
 
Week # 1.pdf
giddy5
 
Big Data Storage Concepts from the "Big Data concepts Technology and Architec...
raghdooosh
 
UNIT II DIS.pptx
Premkumar R
 
Architecting for the cloud elasticity security
Len Bass
 
Parallel processing
Shivalik college of engineering
 
Disadvantages Distributed System.pptx
vlakshmirajendran1
 
Design Issues of Distributed System (1).pptx
vlakshmirajendran1
 
System models for distributed and cloud computing
purplesea
 
Multithreaded Programming Part- I.pdf
Harika Pudugosula
 
Chapter 3 Naming in distributed system.pptx
Tekle12
 
Hpc 6 7
Yasir Khan
 
High performance computing
punjab engineering college, chandigarh
 
Simulation of Heterogeneous Cloud Infrastructures
CloudLightning
 
distributed system original.pdf
KirimanyiJovanntanda
 
Building Big Data Streaming Architectures
David Martínez Rego
 
TASK AND DATA PARALLELISM in Computer Science pptx
dianachakauya
 

Recently uploaded (20)

PPTX
265587293-NFPA 101 Life safety code-PPT-1.pptx
chandermwason
 
PPTX
Lecture 1 Shell and Tube Heat exchanger-1.pptx
mailforillegalwork
 
DOCX
CS-802 (A) BDH Lab manual IPS Academy Indore
thegodhimself05
 
PDF
Ethics and Trustworthy AI in Healthcare – Governing Sensitive Data, Profiling...
AlqualsaDIResearchGr
 
PPTX
VITEEE 2026 Exam Details , Important Dates
SonaliSingh127098
 
PPTX
Evaluation and thermal analysis of shell and tube heat exchanger as per requi...
shahveer210504
 
PDF
Zilliz Cloud Demo for performance and scale
Zilliz
 
PDF
Set Relation Function Practice session 24.05.2025.pdf
DrStephenStrange4
 
PPTX
Heart Bleed Bug - A case study (Course: Cryptography and Network Security)
Adri Jovin
 
PDF
Pressure Measurement training for engineers and Technicians
AIESOLUTIONS
 
PPTX
Introduction to Design of Machine Elements
PradeepKumarS27
 
PPTX
GitOps_Without_K8s_Training simple one without k8s
DanialHabibi2
 
PPTX
Thermal runway and thermal stability.pptx
godow93766
 
PDF
MAD Unit - 1 Introduction of Android IT Department
JappanMavani
 
PDF
Biomechanics of Gait: Engineering Solutions for Rehabilitation (www.kiu.ac.ug)
publication11
 
PPTX
GitOps_Repo_Structure for begeinner(Scaffolindg)
DanialHabibi2
 
PPTX
Types of Bearing_Specifications_PPT.pptx
PranjulAgrahariAkash
 
PDF
MAD Unit - 2 Activity and Fragment Management in Android (Diploma IT)
JappanMavani
 
PPTX
Depth First Search Algorithm in 🧠 DFS in Artificial Intelligence (AI)
rafeeqshaik212002
 
PPTX
Green Building & Energy Conservation ppt
Sagar Sarangi
 
265587293-NFPA 101 Life safety code-PPT-1.pptx
chandermwason
 
Lecture 1 Shell and Tube Heat exchanger-1.pptx
mailforillegalwork
 
CS-802 (A) BDH Lab manual IPS Academy Indore
thegodhimself05
 
Ethics and Trustworthy AI in Healthcare – Governing Sensitive Data, Profiling...
AlqualsaDIResearchGr
 
VITEEE 2026 Exam Details , Important Dates
SonaliSingh127098
 
Evaluation and thermal analysis of shell and tube heat exchanger as per requi...
shahveer210504
 
Zilliz Cloud Demo for performance and scale
Zilliz
 
Set Relation Function Practice session 24.05.2025.pdf
DrStephenStrange4
 
Heart Bleed Bug - A case study (Course: Cryptography and Network Security)
Adri Jovin
 
Pressure Measurement training for engineers and Technicians
AIESOLUTIONS
 
Introduction to Design of Machine Elements
PradeepKumarS27
 
GitOps_Without_K8s_Training simple one without k8s
DanialHabibi2
 
Thermal runway and thermal stability.pptx
godow93766
 
MAD Unit - 1 Introduction of Android IT Department
JappanMavani
 
Biomechanics of Gait: Engineering Solutions for Rehabilitation (www.kiu.ac.ug)
publication11
 
GitOps_Repo_Structure for begeinner(Scaffolindg)
DanialHabibi2
 
Types of Bearing_Specifications_PPT.pptx
PranjulAgrahariAkash
 
MAD Unit - 2 Activity and Fragment Management in Android (Diploma IT)
JappanMavani
 
Depth First Search Algorithm in 🧠 DFS in Artificial Intelligence (AI)
rafeeqshaik212002
 
Green Building & Energy Conservation ppt
Sagar Sarangi
 
Ad

Module 3 - DBMS System Architecture Principles

  • 1. Module 3: Parallel Databases and Distributed Databases DATABASE SYSTEM ARCHITECTURES
  • 2. Outline • Centralized Database Systems • Server System Architectures • Parallel Systems • Distributed Systems • Network Types
  • 3. Centralized Database Systems • 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
  • 4. Server System Architecture • Server systems can be broadly categorized into two kinds: • Transaction servers • Widely used in relational database systems, and • Data servers • Parallel data servers used to implement high- performance transaction processing systems
  • 5. 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. • Transactional RPC allows many RPC calls to form a transaction. • Applications typically use ODBC/JDBC APIs to communicate with transaction servers
  • 7. Transaction Server Process Structure • A typical transaction server consists of multiple processes accessing data in shared memory • Shared memory contains shared data • Buffer pool • Lock table • Log buffer • 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. 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. 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
  • 10. 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 • 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
  • 11. 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
  • 12. 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
  • 13. Speed-Up • Speedup: a fixed-sized problem executing on a small system is given to a system which is N-times larger. The ability to execute the tasks in less time by increasing the number of resources is called Speedup. • Measured by: speedup = Original elapsed time elapsed time in parallel where , time original = time required to execute the task using 1 processor time parallel = time required to execute the task using 'n' processors • Speedup is linear if equation equals N.
  • 15. Scale-Up • Scaleup: scaleup is the ability of an application to maintain response time as the size of the workload or the volume of transactions grows. Scaleup is frequently discussed in terms of scalability. • 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 Scaleup = Volume-m/Volume-1 • Volume1 is the volume of transactions carried out in the same period of time using one processor, whereas Volumem is the volume of transactions carried out using m processors. • Scale up is linear if equation equals 1. • Eg: Scaleup = 400/100. Scaled-up = 4. Interpretation: Using four processors/discs, this scaleup of 4 is accomplished.
  • 17. 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.
  • 18. 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 is sequential • Amdahl’s law: speedup limited to: 1 / [(1-p)+(p/n)] • Gustafson’s law: scaleup limited to: 1 / [n(1-p)+p] • 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.
  • 19. 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
  • 21. 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
  • 23. 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
  • 24. 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.
  • 26. 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.
  • 27. 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
  • 28. 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
  • 29. Distributed Systems • Data spread over multiple machines (also referred to as sites or nodes). • Local-area networks (LANs) • Wide-area networks (WANs) • Higher latency
  • 30. 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.
  • 31. 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. • Autonomy – each site is able to retain a degree of control over data stored locally.
  • 32. Availability • Network partitioning • 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.
  • 33. 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
  • 34. Cloud Based Services • Cloud computing widely adopted today • On-demand provisioning and elasticity • 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
  • 36. Application Deployment Alternatives Individual Machines Virtual Machines Containers (e.g. VMWare, KVM, ..) (e.g. Docker)
  • 37. 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