Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [synchronization]

Maintaining several related processes, threads, objects or data in a consistent state. Not to be confused with replication.

Filter by
Sorted by
Tagged with
40 votes
5 answers
14k views

Does immutability entirely eliminate the need for locks in multi-processor programming?

Part 1 Clearly Immutability minimizes the need for locks in multi-processor programming, but does it eliminate that need, or are there instances where immutability alone is not enough? It seems to me ...
GlenPeterson's user avatar
  • 14.9k
62 votes
2 answers
42k views

Best practice/Patterns for two way data synchronisation

Quite often in my work the idea of 2-way data synchronisation between database systems crops up. The classic example is two slightly different CRM systems (say, Raiser's Edge and Salesforce) and the ...
codeulike's user avatar
  • 801
27 votes
3 answers
17k views

Conflict resolution for two-way sync

How do you manage two-way synchronization between a 'main' database server and many 'secondary' servers, in particular conflict resolution, assuming a connection is not always available? For example, ...
K.Steff's user avatar
  • 4,505
15 votes
2 answers
40k views

When should I use StringBuilder or StringBuffer?

In a production web application, my fellow programmers used StringBuffer everywhere. Now I am taking care of application development and corrections. After reading StringBuilder and StringBuffer I ...
Satish Pandey's user avatar
4 votes
4 answers
14k views

How would you approach developing a Hotel Reservation System?

Till now, I have had the experience of developing either a desktop application or a Website. But, with this Hotel reservation system, I am interfacing a problem that needs both. The application ...
Pankaj Upadhyay's user avatar
4 votes
2 answers
2k views

Threads - When to use barrier?

Using python syntax, threading.Barrier(NUM_THREADS) establishes a control point and all participating threads block until all of the participating “parties” have reached that point. It lets threads ...
overexchange's user avatar
  • 2,265
1 vote
1 answer
1k views

Is there still busy waiting in the process-blocking implementation of a semaphore?

Operating System Concepts discusses two implementations of a semaphore, by busy waiting in Section 5.5 and by blocking the current process in Section 5.6: Section 5.5 A semaphore S is an integer ...
Tim's user avatar
  • 5,475
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 ...
Tim's user avatar
  • 5,475
1 vote
1 answer
356 views

Offline First: How Do I Fetch Data?

I'm new to this community, I'm glad I found this and so I can ask questions like this one (as per https://meta.stackexchange.com/questions/68384/whats-the-difference-between-stack-overflow-and-...
Glenn's user avatar
  • 121
-1 votes
1 answer
63 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 ...
user642770's user avatar