synchronization

What's the best way to sync large amounts of data around the world?

I have a great deal of data to keep synchronized over 4 or 5 sites around the world, around half a terabyte at each site. This changes (either adds or changes) by around 1.4 Gigabytes per day, and the data can change at any of the four sites. A large percentage (30%) of the data is duplicate packages (Perhaps packaged-up JDKs), so the s...

How do I synchronize two processes?

I have a single HW interface I want to use from two applications (processes) on the same workstation. The HW requires a single initialization call then either app uses the same function (in the same library) to do many transactions with the HW. So each app should act like this: main() // I don't know if another app already init'e...

Single-threading two processes

I have two C++ processes (A and B), executing under Windows, where one launches the other. I would like to effectively single-thread their execution. For example: Start process A A creates B A suspends B executes some fixed set of operations B suspends and A is resumed A executes some fixed set of operations A suspends and B is resumed...

Synchronising twice on the same object?

I was wondering if in Java I would get any odd behaviour if I synchronise twice on the same object? The scenario is as follows pulbic class SillyClassName { object moo; ... public void method1(){ synchronized(moo) { .... method2(); .... } } public void me...

How to synchronize development and production database.

Do you know any applications to synchronize two databases - during development sometimes it's required to add one or two table rows or new table or column. Usually I write every sql statement in some file and during uploading path I evecute those lines on my production database (earlier backing it up). I work with mySQL and postreSQL da...

Why does synchronized notifyAll result in a IllegalMonitorStateException?

Why does this test program result in a java.lang.IllegalMonitorStateException? public class test { static Integer foo = new Integer(1); public static void main(String[] args) { synchronized(foo) { foo++; foo.notifyAll(); } System.err.println("Success"); } } Result: Exception...

Server side synchronization for mobile applications or client side synchronization

if a mobile application needs to get data from multiple servers, is it better to call each server from the mobile device, or call one server which then talks to all the other servers? "should synchronization be initiated by the server or the mobile client?" to what degree does client do the book keeping. Say if the application is mob...

Application data synchronisation - running the new app in tandem with the legacy

We're in the process of replacing a legacy system. There is going to be a period of time with both the applications running in tandem. Users will be able to use either system and the challenge is to be able to keep their databases in sync with each other. The new system is ASP.NET and the legacy is VB6. Both are running on a SQL Serv...

How do I keep 2 scratch Databases in sync

My question is a lot like this one. However I'm on MySQL and I'm looking for the "lowest tech" solution that I can find. The situation is that I have 2 databases that should have the same data in them but they are updated primarily when they are not able to contact each other. I suspect that there is some sort of clustering or master/s...

please break this synchronization algorithm

P1 and P2 are processes or nodes in a cluster. f1 and f2 are their flags. Supposing strong memory model, and that both processes may be restarted at any moment, and that restarting a process clears it's flag, here's an algorithm that I came up with and couldn't yet break, but that bothers me for it's not theoretically proven and looks t...

How to detect synchronization violations with Java

Hi, I'm wondering what good ways there would be make assertions about synchronization or something so that I could detect synchronization violations (while testing). That would be used for example for the case that I'd have a class that is not thread-safe and that isn't going to be thread-safe. With some way I would have some assertion...

What are the best ways for maintaining server time

Many applications require server time frequently. What are the best ways for maintaining server time on client machine with minimized request to server. ...

What are the differences between various threading synchronization options in C#?

Can someone explain the difference between: lock (someobject) {} Using Mutex Using Semaphore Using Monitor Using Other .Net synchronization classes I just can't figure it out. It seems to me the first two are the same? ...

Does a call to a threadsafe function need to be syncronized too?

If I'm using ConcurrentHashMap (where the put is thread safe) , and I supply a public function myPut that uses the ConcurrentHashMap put - do I need to synchronize my function? meaning : should this be synchronized? ConcurrentHashMap map; public void myPut(int something) { this.map.put(something); } ...

What Cases Require Synchronized Method Access in Java?

In what cases is it necessary to synchronize access to instance members? I understand that access to static members of a class always needs to be synchronized- because they are shared across all object instances of the class. My question is when would I be incorrect if I do not synchronize instance members? for example if my class is...

Static members need special synchronization blocks?

I have a class which looks something like this: public class Test { private static final Object someObject = new Object(); public void doSomething() { synchronized (someObject) { System.out.println(someObject.toString()); } } } Can I consider the object to be synchronized, or is there a problem since it is a static member? Edi...

Synchronisable CRM System

Hi, I need to develop a CRM system which will allow users to have a local copy of the DB which can then be synched with the main server system. The idea is that a sales team can travel to non-internet enabled areas and still operate with relatively up to date information and then synch up when they get back to the office. Ive never don...

Howto synchronize file access in a shared folder using Java (OR: ReadWriteLock on network level)

I have multiple applications running in one virtual machine. I have multiple virtual machines running on one server. And I have multiple servers. They all share a file using a shared folder on linux. The file is read and written by all applications. During the write process no application is allowed to read this file. The same for writin...

How to sync your MAMP install across multiple Macs

I have MAMP set up on my iMac and on my Macbook. I want to keep both installs synced using dropbox. When upgrading MAMP the only 2 folders you need to transfer are 'db' & 'htdocs'. My theory is then that these are the only 2 folders I need to keep in sync. Sound right to you so far? Syncing the 'htdocs' folder is easy as you can put it ...

Synchronizing code with two subversion repositories

A bit of background first: I am using "base" code from a remote SVN repository, not under my control. The code is not tagged (yet), so I always need to keep up with the trunk. For a number of reasons (the most important being that our local extensions to the code are of a "niche" nature, and intended to solve a specific problem with t...