Concurrency - Concurrency

Data System Architecture

Concurrency - Concurrency


Data concurrency means that many thread (that may represents users) can access and modify data at the same time. Data concurrency ensures that users can access data at the same time

Most JS/Python/Ruby apps…

In a single-user application, the user can modify data without concern for other users modifying the same data at the same time. However, in a multi-user (or multi-thread) application, the statements within multiple simultaneous transactions can update the same data. Transactions executing at the same time need to produce meaningful and consistent results.

Therefore, a multi-user (thread) application must provide data consistency, which ensures that each user sees a consistent view of the data, including visible changes made by the user's own transactions and committed transactions of other users. In this way, the database can present a view of data to multiple concurrent users, with each view consistent to a point in time. Because different versions of data can exist simultaneously, transactions can read the version of data committed at the point in time required by a query and return results that are consistent to a single point in time. See Transactions - Concurrent Read Consistency (multiversion read)

Application that inhibit concurrency :

  • are less scalable,
  • can support fewer users
  • and require more resources (or power)

To describe transaction behavior when transactions run concurrently, a transaction isolation model was defined.

If several transactions concurrently read from and write to a database, the following data problems can arise:

To avoid these problems, the only isolation level is the serializable one.


Concurrency - Model (Design)

Concurrent Software

Computer users take it for granted that their systems can do more than one thing at a time. They assume that they can continue to work in a word processor, while other applications download files, manage the print queue, and stream audio.

Even a single application is often expected to do more than one thing at a time.

For example, that streaming audio application must simultaneously read the digital audio off the network, decompress it, manage playback, and update its display.

Even the word processor should always be ready to respond to keyboard and mouse events, no matter how busy it is reformatting text or updating the display.

Software that can do such things is known as concurrent software.

Concurrency control

It's an area that sets a database apart from a file system and databases apart from each other.

If you don't have a good grasp of how your application implements concurrency control mechanisms, then you will :

Something that works in isolation will not work as you expect in a multi-user situation

  • Have application run slower than they should with a small number of users

It will end up waiting for resources

  • Decrease your ability to scale to a large number of users

Locking and contention issue will occurs. As the queues to access a resource get longer, the wait times get longer and longer …


On the system and application levels, concurrency is limited by sessions and socket connections. Code flaws and incorrect server configuration settings can also limit concurrency. Concurrency tests involve ramping up a number of users on the system and using realistic page-delay times at a ramp-up speed slow enough to gather useful data throughout the testing at each level of load. As with throughput testing, it is important to test the key pages and user transactions in the application under test.

Documentation / Reference

Discover More
Data System Architecture
Asynchronous programming (Concurrency | Parallel)

application Asynchronous programming is notoriously difficult because the order of operations is highly unpredictable. From a classic computing perspective, concurrent and parallel are clearly synonyms...
Cpu Moore Law Transistor
CPU - Processor Core

Processing performance of computers is increased by using multi-core processors, which essentially is plugging two or more individual processor (called cores in this sense) into one integrated circuit....
Data System Architecture
Concurrency - Latches (System Lock)

Latches are like semaphores. Latches are used to guarantee physical consistency of data, while locks are used to assure logical consistency of data. Latches are simple, low-level system lock (serialization...
Data System Architecture
Concurrency - Lock (Mutex)

A lock is a synchronizationmechanism designed to enforce a mutual exclusion of threads. A lock is also known as a mutex. Type: binary semaphore - yes / no Most locking designs block the execution...
Data System Architecture
Concurrency - Model (Design)

list of asynchronous (concurrent/parallel) design producer-consumer, messaging, promise / future
Data System Architecture
Data Concurrency - Promise

A promise is a concurrency design pattern where shared state is not required. It's the basic building block of any asynchronous model. A Future represents the result of a promise is called generally...
Data System Architecture
Data Concurrency - Shared Resource

Shared Resource that can be accessed concurrently: a variable (holding a data structure or a value) a network connection a peripheral device
Data System Architecture
Data Properties and Transactions

This section is : transactions are the mechanism that guarantee data ACID (atomicity, consistency, isolation, durability) properties during concurrent data changes (ie multiple user or program...
Data System Architecture
Data Warehousing - The Workload is always mixed

Also known as: active data warehousing, operational data warehousing etc. All this indicate something similar, namely a diverse workload running on a data warehouse system concurrently: Whether...
Data System Architecture
Database management system (DBMS)

A DBMS is an application that controls: the organization, storage, management, and retrieval of data. A database is a collection of permanently stored data used by an application or enterprise....

Share this page:
Follow us:
Task Runner