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 have decided to replace all the StringBuffer code with StringBuilder because we don’t need thread safety in our data beans.
How do most sync programs monitor file changes?
Do sync programs like Dropbox typically track file changes by doing byte by byte comparisons, or using hashes, or using diff
/ keeping local commit logs like version control, or what?
Multithreading synchronization interview question: Find n words given m threads
You are given a paragraph , which contain n number of words, you are
given m threads. What you need to do is , each thread should print one
word and give the control to next thread, this way each thread will
keep on printing one word , in case last thread come, it should invoke
the first thread. Printing will repeat until all the words are printed
in paragraph. Finally all threads should exit gracefully. What kind of
synchronization will use?
Does Dropbox use a cronjob to sync up? [closed]
Closed 12 years ago.
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 that you can only defer processing and encapsulate state so long before most programs have to actually DO something (update a data store, […]
Syncing objects to a remote server, and caching on local storage
What’s the best method of sycing objects (as JSON) to a remote server, with local caching?
What’s a good scheme for multi-user database synchronization?
I’m working on a system to allow multiple users to collaborate on an online project. Everything is fairly straightforward, except for keeping the users in sync. Each user has their own local copy of the project database, which allows them to make changes and test things out, and then send the updates to the central server. But this runs into the classic synchronization question: how do you keep two users from editing the same thing and stomping each other’s work?
Is it time to deprecate synchronized, wait and notify?
Is there a single scenario (other than compatibility with ancient JVMs) where using synchronized
is preferable to using a Lock
? Can anyone justify using wait
or notify
over the newer systems?
Best practice to sync long paths to filesystems where path length is limited?
I wrote a sync tool to synchronize folders/files from Alfresco to Windows.
PROBLEM:
Is it possible to half-way synchronize javascript functions that include async calls?
I am wondering if there exists a way to half way synchronize javascript functions, where data is requested on the fly. I don’t want to make it purely blocking (which I guess is impossible), I just want a nice way to write the overall algorithm in one piece.