Offline / Online Data Synchronization Design (Javascript) [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it’s on-topic for Stack Overflow. Closed 3 years ago. Improve this question I’m currently in the process of writing an offline webapp using all the html5 goodies for offline support. However … Read more

How to synchronize two Subversion repositories?

My company has a subsidiary with a slow Internet connection. Our developers there suffer to interact with our central Subversion server. Is it possible to configure a slave/mirror for them? They would interact locally with the server and all the commits would be automatically synchronized to the master server. This should work as transparently as … Read more

Concurrent threads adding to ArrayList at same time – what happens?

We have multiple threads calling add(obj) on an ArrayList. My theory is that when add is called concurrently by two threads, that only one of the two objects being added is really added to the ArrayList. Is this plausable? If so, how do you get around this? Use a synchronized collection like Vector? Answer There … Read more

More iCloud Core Data synching woes

So, it finally happened. The worst case scenario for any independent iPhone developer occurred. Several users are reporting complete data loss after upgrading my app. iCloud Core Data sync is not working. My users are using this app partially to run their businesses. This is a truly catastrophic failure. The only iCloud related thing I … Read more

Are LinkedBlockingQueue’s insert and remove methods thread safe?

I’m using LinkedBlockingQueue between two different threads. One thread adds data via add, while the other thread receives data via take. My question is, do I need to synchronize access to add and take. Is LinkedBlockingQueue‘s insert and remove methods thread safe? Answer Yes. From the docs: “BlockingQueue implementations are thread-safe. All queuing methods achieve … Read more

What is progress and bounded waiting in critical section?

I was reading Critical Section Problem from Operating System Concepts by Peter B. Galvin. According to it 1) Progress is : If no process is executing in its critical section and some processes wish to enter their critical sections, then only those processes that are not executing in their remainder section can participate in deciding … Read more

When is a condition variable needed, isn’t a mutex enough?

I’m sure mutex isn’t enough that’s the reason the concept of condition variables exist; but it beats me and I’m not able to convince myself with a concrete scenario when a condition variable is essential. Differences between Conditional variables, Mutexes and Locks question’s accepted answer says that a condition variable is a lock with a … Read more

Monitor vs Mutex in c# [duplicate]

This question already has answers here: Closed 10 years ago. Possible Duplicate: What are the differences between various threading synchronization options in C#? What is the difference between a Monitor and a Mutex in C#? When to use a Monitor and when to use a Mutex in C#? Answer A Monitor is managed, and more … Read more

Collections.synchronizedList and synchronized

List<String> list = Collections.synchronizedList(new ArrayList<String>()); synchronized (list) { list.add(“message”); } Is the block “synchronized (list){} ” really need here ? Answer You don’t need to synchronize as you put in your example. HOWEVER, very important, you need to synchronize around the list when you iterate it (as noted in the Javadoc): It is imperative that … Read more