Questions tagged [synchronization]
Maintaining several related processes, threads, objects or data in a consistent state. Not to be confused with replication.
194 questions
5
votes
5
answers
283
views
How to ensure that release tags are uniformly created throughout a cohort of closely-related Git repositories?
Working as part of the release team for a sprawling open source project that uses dozens of Git repositories, I regularly run into situations where one or more of the satellite repositories are ...
1
vote
2
answers
920
views
How can I code synchronous programs in Node?
I'm a career programmer, very comfortable writing programs in Python, and recently started learning Node.
I understand the asynchronous features are useful in many situations, but when I debug my code,...
0
votes
2
answers
252
views
How do I guarantee ordered processing of occurring events in concurrent environment?
I have a Kafka topic providing events of the following type: id(hash):[ADD|REMOVE].
These events may be generated at a high rate and are idempotent, i.e. getting 123:ADD one time and ten times in a ...
1
vote
1
answer
109
views
How best to keep Excel Workbook field in sync across class instances
I know almost nothing about threads, synchronization, ...
That being said, I am working on a record handler, that hits Excel sheet to pull/push data. There exist, in my code base, a BaseRecordHandler, ...
1
vote
0
answers
292
views
If you run a function in a different thread, but you wait for it to finish in your main thread, is that function asynchronous?
Backstory
Probably a stupid question, but I just have a sneaking suspicion that "asynchronous" is the wrong terminology to us for naming my template function here:
template <class T>
...
1
vote
3
answers
211
views
Ensuring run-once behavior in a multi-threaded environment via volatile lambdas?
I'm coding an enum strategy pattern where one of the strategies makes use of an ScheduledExecutor:
class ControllerImpl {
//...
boolean applyStrat(StratParam param) {
getStrat().apply(...
0
votes
1
answer
169
views
Right way to combine data between Mongo and DynamoDB
I am looking for a way of dealing with the following situation:
1- Have an items collection in MongoDB
2- Have a users collection in DynamoDB
3- Each document in the items collection has a "...
4
votes
4
answers
4k
views
What will you do if multiple users access your application at the same time?
I'm an experienced Software Engineer but very weak in concurrency because of no prior experience in that. I've been interviewing with several companies in which I was asked similar kind of questions ...
1
vote
1
answer
1k
views
Full, 2-way table synchronization
I need to synchronize tables of data between two different systems. This is a multi-master setup; data can get changed in either system. After a synchronization runs I'd like the data in each table to ...
1
vote
0
answers
79
views
How to support text editing when the text has to be synchronized with fixed audio?
In my application, we record audio of people speaking, send this to a speech-to-text (STT) service, and present the text to the user for editing.
Simplifying a bit, the STT service returns results in ...
0
votes
0
answers
165
views
Fill Docker Container from existing remote database
I do have n nodes managed by Kubernetes, all of them running several containers. A container may contain a database alongside with an application. As containers should be stateless, all data within ...
1
vote
1
answer
772
views
Synchronizing Multiple Local SQL databases with Server
I'm trying to understand what general mechanisms and/or concepts are available in SQL database last to synchronize local. Here are my inputs and requirements.
Multiple clients have a full copy of the ...
0
votes
0
answers
72
views
What is best approach to designing a local-to-cloud cloud-to-local Infrastructure?
I plan to have a cloud web application(CWA) and several local web application(LWA), let's assume 3 LWAs and 1 CWA. CWA === LWA.
This web application would consist of a database server, file storage ...
5
votes
2
answers
1k
views
Hexagonal/Clean Architecture - threads, locks, synchronization
All the examples across the internet try to pretend that every application is run on a single thread. There is no problem with synchronization, multithreading etc. Uncle Bob, in his "Clean ...
1
vote
1
answer
90
views
Poll based database operations with a load balanced application
I have a .NET Core application that is hosted as multiple load balanced instances (separate servers, obviously pointing to the same database).
I have written a service within the application that ...
3
votes
1
answer
4k
views
Why does a condition variable's wait() release the associated mutex before blocking and reacquire it before returning?
Stallings' Operating System book says about condition variable in Solaris,
A condition variable is used to wait until a particular condition is
true. Condition variables must be used in ...
-4
votes
3
answers
789
views
What is "it is possible for one process to lock a binary semaphore and for another to unlock it" useful for?
Here are some discussions about mutex (lock) and binary semaphore from two OS books.
Stalling's Operating Systems book says
A concept related to the binary semaphore is the mutex . A key ...
1
vote
2
answers
2k
views
Why is it that "the process that locks the mutex must be the one to unlock it "?
Here are some discussions about mutex (lock) and binary semaphore from two OS books.
Stalling's Operating Systems book says
A concept related to the binary semaphore is the mutex . A key ...
1
vote
1
answer
453
views
Does a safe state not lead to a starvation state?
In Operating System Concepts:
7.5.1 Safe State
A state is safe if the system can allocate resources to each process (up to its
maximum) in some order and still avoid a deadlock. More formally, a ...
28
votes
5
answers
7k
views
Is "releases mutexes in reverse order" required to make this deadlock-prevention method work?
Operating System Concepts says
7.4.4 Circular Wait
The fourth and final condition for deadlocks is the circular-wait condition. One
way to ensure that this condition never holds is to impose a total ...
-1
votes
1
answer
79
views
Efficiently keep different data structures synchronised - tree, list of objects
Problem description
I have a pet project to translate TEI XML to standoff JSON and back: https://github.com/standoff-nlp/standoffconverter and I am currently thinking about a rewrite/restructuring.
...
-4
votes
1
answer
288
views
Difference between inter-thread and inter-process sharing and synchronization
A) I know that threads of a process share logical address space . Therefore they share data by default.
B) But if two threads of different processes want to share data ...then there are two options ...
-1
votes
1
answer
82
views
Design solution for updating different lists with common items
I needed some design suggestions for a tricky workflow we have to implement in our system:
At a basic level the application allows users to work on a "list" of "items" she cares about
To work on any ...
-3
votes
2
answers
103
views
How to scale an application where every read results in a write?
So I am trying to design a simple URL shortener application where every time a URL is queried, it is going to update the number of times it has been queried.
I'm thinking of using MongoDB and I am ...
0
votes
1
answer
319
views
Need to test for equality on vector clocks
I've heard about vector clocks and how to test if a message was sent before another message.
E.g. Message A was sent before message B if every element of the vector of message A is smaller or equal ...