Questions tagged [concurrency]
Concurrency is a property of systems in which several processes are executing at the same time.
379 questions
0 votes
3 answers
313 views
Transaction management with one connection
We have a desktop application written in Java that communicates with a DB. We support Oracle and Postgres. For the purpose of this question, let's focus on Postgres Our app uses one connection for all ...
4 votes
3 answers
2k views
Not await an asynchronous method because it is like an endless loop - good practice?
I inherited a piece of software. This program is connected to an external hardware, which is a measurement device. Every 100 milliseconds, a value is read from this device and displayed to the user. ...
0 votes
1 answer
394 views
Using a thread-locking service as a singleton dependency in .NET
So I'm working on the Web API for my website and certain API calls need to be performed with thread safety in the application's runtime. I have created a locking service which uses a semaphore for ...
1 vote
2 answers
236 views
Ensuring partial order of concurrent operations
I have the following operations: User submits event We store event in a queue Wait for events and store them in db for redundancy Wait for events and process them Remove events from queue and db For ...
1 vote
3 answers
489 views
What algorithm can I use in order to not let there be two rows with same "mobile number" in database?
The issue that I'm facing is on a banking app. There are two ways to register for internet banking. A) Self Register B) Ask for bank to register via their GUI panel backend. Consider this scenario: ...
1 vote
1 answer
215 views
High Throughput Concurrent Map Access and Periodic Updates Causing Contention and Latency Spikes
I am working on a Go application where two concurrent maps, products and productCatalog, are accessed by numerous threads in live traffic to retrieve data at high throughput. These maps are populated ...
4 votes
2 answers
989 views
How can a web browser simultaneously run more videos than the number of CPU cores?
I've been learning about threads and processes and I understand that threads allow you to write concurrent code: where executing threads switch very quickly from one to another, giving the impression ...
2 votes
2 answers
155 views
Should a mobile app keep an 'outdated' version of the data and refresh it from database or always fetch from database?
I'm building a mobile, in which the user is able to create,modify and delete entries in a database. There are multiple screen where some of the entries are displayed: (here are some examples, not ...