5
голосов
6ответов
12567 просмотров

How can I tell if a file on an FTP is identical to a local file with out actually downloading the file?

I'm writing a simple program that is used to synchronize files to an FTP. I want to be able to check if the local version of a file is different from the remote version, so I can tell if the file(s) need to be transfered. I could check the file size, but that's not 100% reliable because obviously...

2
голосов
2ответов
1002 просмотров

SynchronousQueue fairness

I'm using a 1producer-1consumer design in my app using a SynchronousQueue. By now, I'm using it with the default constructor (fair=true). And I'm wondering about how "fair=false" would affect to the system (performance and specially concurrency behaviour). Here what the docs tell: Synchr...

1
голосов
2ответов
13187 просмотров

What is the difference between synchronized and static synchronized?

For a travel booking web application, where there are 100 concurrent users logged in, should ticket booking and generating an "E-Ticket Number" be implemented by a "synchronized" or a "static synchronized" method?

2
голосов
4ответов
1585 просмотров

C# - how to block for GUI or an event

I'm trying to create a very simple version of the game Simon with the WiiMote, using WPF. What I'm stuck on is how to make it turned-based, where the program blocks until the GUI is done displaying a sequence. Here's the code I have so far (mostly based on an answer here: WPF - sequential anima...

0
голосов
1ответов
1451 просмотров

make cairngorm commands ALWAYS work synchronously

I see the benefit of asynchronous commands (waiting for server responses...) but in my flex app it creates me more problem than anything. Here's what I want: EVERY command executes only after the previous one returned (to result or fault function) And I'd like to do this as easily as possible.....

6
голосов
2ответов
2313 просмотров

Offline synchronization options with .NET

I've been asked to research approaches to deal with an app we're supposed to be building. This app, hypothetically a Windows form written in C#, will issue commands directly to the server if it's connected, but if the app is offline, the state must be maintained as if it was connected and then sy...

5
голосов
3ответов
8057 просмотров

How can I synchronize two MySQL tables that have different structures?

I am migrating from one system to another and in the process, I will be running both systems concurrently. I need to be able to synchronize uni-directionally from one table to another while maintaining each table's primary keys. In this example, I have two tables (A) and (B). I need to synchroni...

0
голосов
2ответов
766 просмотров

iphone cocoa use of nsrunloop

I find myself using a combination of global vars and nsrunloop to force synchronization throughout my application. Although it works it seems a bit ugly to me. Is there any other way of achieving the same result? Here's a typically example: ParkingSpots *parkingSpots = [[[ParkingSpots alloc...

0
голосов
3ответов
85 просмотров

Handling event simultaneity at the web-application level?

Hi all, I'm sure this problem has been considered or even solved before; I just don't know how and what all my options are. Would greatly appreciate your ideas, any links to useful info... even if you don't have actual code/implementation to share. Many thanks! Let's say: I have a bunch of nod...

0
голосов
4ответов
636 просмотров

Java synchronization to avoid ConcurrentModificationExceptions?

I'm having hard time to make my program work correctly. In brief, my program consists of several initial threads: Main, MessageReceiver, Scheduler (used Quartz package) and two types of threads scheduled by the Scheduler thread: TraceReader and ScheduledEvent. Now, when TraceReader is fired, it r...

4
голосов
5ответов
138 просмотров

How to synchronise two browsers

I have a little problem and because my WEB development skills are not the sharpest I hope you can help me. The problem is that I am working on a digital SCRUM task board and one of the core functionality would be that browsers having the same project taskboard open would have to show the same pi...

0
голосов
1ответов
291 просмотров

WM6 Contact Sync Google

I am looking to write a contact synchronisation application for windows mobile and google contacts. I am developing against the Windows Mobile 6 platform for the time being and using the PocketOutlook managed classes and C#. An initial problem I have come up with whilst doing some research is t...

0
голосов
2ответов
1351 просмотров

Java code for FTP upload doesn't work properly if launched as windows service

I'm using java code for uploading some files using FTP. When I compile and run the code everything works perfectly, but if I launch it as a windows service using Java Service Launcher, it doesn't connect to the FTP server at all (it just does the rest of the job, that is moving files to archive f...

3
голосов
3ответов
2077 просмотров

How should I handle query synchronization in PHP?

I would like to insert some value into a table, which has an auto-incrementing field as a primary key. Then I want to retrieve the ID by using mysql_insert_id() and use this ID as a foreign key in another table. The problem is - although very unlikely - it may happen that between the first insert...

7
голосов
1ответов
2676 просмотров

Why does WaitForSingleObject(INVALID_HANDLE_VALUE, INFINITE) block?

Why does HANDLE mutexHandle = INVALID_HANDLE_VALUE; WaitForSingleObject(mutexHandle, INFINITE); block? It does not return with an error message. Checking the handle for INVALID_HANDLE would be stupid for a mutex as I would need a mutex for accessing the mutex handle... BTW: It does return w...

8
голосов
3ответов
2786 просмотров

Intel Inspector reports a data race in my spinlock implementation

I made a very simple spinlock using the Interlocked functions in Windows and tested it on a dual-core CPU (two threads that increment a variable); The program seems to work OK (it gives the same result every time, which is not the case when no synchronization is used), but Intel Parallel Inspec...

0
голосов
5ответов
398 просмотров

Synchronizing access to a collection

I have these two pieces of code that could possibly be run at the same time on two different threads: users = (from user in users orderby user.IsLoggedIn descending , user.Username select user).ToList(); and: users=null; The second piece of code will run o...

2
голосов
3ответов
2946 просмотров

How to synchronize local directory with remote ftp directory?

Our website relies on images from one of our manufacturers. The image directories are massive and getting them via FTP is an all day job. Now that we've downloaded the entire directory, we'd like to be able to periodically download files and directories that are new, or have been changed since ...

7
голосов
5ответов
5726 просмотров

Comparing local and remote files in NetBeans

Is there a way to compare local and remote (FTP) file in NetBeans? There is an upload (and download) command in NetBeans. What I want to do is to see the changes between local and remote version in built-in compare tool when I am using download and upload and ideally select which changes to appl...

6
голосов
3ответов
6041 просмотров

Implementation of set reconciliation algorithm

I'm looking for implementations of set reconciliation algorithm. The problem is following: there are two sets with elements identified by some relatively compact value (e.g. UUID or MD5/SHA1/whatever hash) sitting on different machines. These sets differ in relatively few elements and I want to s...

4
голосов
2ответов
2408 просмотров

Lock-Free, Wait-Free and Wait-freedom algorithms for non-blocking multi-thread synchronization

In multi thread programming we can find different terms for data transfer synchronization between two or more threads/tasks. When exactly we can say that some algorithm is: 1)Lock-Free 2)Wait-Free 3)Wait-Freedom I understand what means Lock-free but when we can say that some synchronization a...

2
голосов
2ответов
5405 просмотров

is there any sync algorithm/reference available for syncing a directory?

I'm planning to write a program to sync a folder in real time across multiple computers over the internet. I'm wondering if there is any sync algorithm to handle file sync conflicts, ie, computer A tries to save a file, while computer B has removed the file.

3
голосов
5ответов
7874 просмотров

Do good multiplayer/mmo client<>server games use latency within movement calculations?

There's a couple of questions here. Imagine I have client A who's going to send the following message to Server: "START MOVEMENT FORWARD". The server will not receive this message instantly, as there is a delay because of latency. Question 1: ping (or better: round trip time) is the amount of ...

0
голосов
1ответов
171 просмотров

Implement Object-Instance-Model to PropertyGrid

I am building a GUI application that will be the front-end for an XML configuration file. The XML structure defines a set of object instances. That is, type names, and property values that should be instantiated in the consuming application (windows service). So there are three layers: Configu...

4
голосов
3ответов
541 просмотров

Databases Synchronization – best practice

We have live and stand-by database servers. Both are SQL Server 2008 databases and hosted on Windows Server 2003. May I know the best practice that people follow to synchronize the 2 databases (live and stand-by) so that we could make sure the stand-by server up whenever the live server is down...

0
голосов
2ответов
1616 просмотров

Multiple Producers, Multiple Consumers and Store Problem

I have a scenario where Multiple Producers are running on different machines in a Network. These are Singleton WCF Services which are queuing the Products (Output) in the Central Store which is also a Singleton WCF Service. There are consumers who dequeue the product from the Central Store by ca...

35
голосов
5ответов
99221 просмотров

Correct way to synchronize ArrayList in java

I'm not sure if this is the correct way to synchronize my ArrayList. I have an ArrayList in_queue which is passed in from the registerInQueue function. ArrayList<Record> in_queue = null; public void registerInQueue(ArrayList in_queue) { this.in_queue = in_queue; } Now I'm trying to...

0
голосов
1ответов
351 просмотров

Design/pseudocode for a listen thread in something like XNA?

Hokay so here is what I'm trying to accomplish: I'm going to be sending some mesh data over a network that my render-er (programmed in XNA) must render. For those not familiar, a typical XNA "game" basically runs in a continuous thread... which updates and draws your data. The problem is, I do...

1
голосов
3ответов
213 просмотров

Mutating a lock object

Just curious to know (in as much detail as possible), why is it a bad practice to modify the object while using it as a lock. //Assuming the lockObject is globally available synchronized(lockObject){ lockObject.someMutativeOperation(...); } Cheers

0
голосов
2ответов
2600 просмотров

Find most recent SQL Server database activity

Data from another system is replicated into a SQL Server 2005 database in real-time (during the day, it's hundreds of transactions/second) using Goldengate. I'd like to be able to tell if there's been a transaction recently, which will tell me if replication is currently happening. Even in the of...