LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

file synchronization

Hi,

 

I came to notice that my file IO is the bottleneck in my program... My datafiles are directly recorded at my network disc... And accessing and searching in files over a network takes alot of time. I've tested locally and through a network and trough my network it takes about 150 ms... and locally about 1 to zero...

 

Is there anyone out there who implemented a file synchronization tool in labview, give a folder locally and one on the network, and on startup, it'll sync the two folders, newest files as master, oldest as slaves.

 

Best regards,

Thijs 

0 Kudos
Message 1 of 10
(3,145 Views)

I almost build something... really easy!

0 Kudos
Message 2 of 10
(3,140 Views)

You could write to a local folder that is shared using google drive, and all other locations will update eventually. No code needed.

0 Kudos
Message 3 of 10
(3,128 Views)

That could work, but i am in a hospital with patient data, and my hospital won't agree when i share my data with google...

0 Kudos
Message 4 of 10
(3,104 Views)

I am trying to work something out with building two lists in labview and compare those. But it should take alot of time, because i am talking about hundreds of patients with multiple files each...

0 Kudos
Message 5 of 10
(3,103 Views)

Something like this...

 

Could there be something faster?

Regards,

Thijs

0 Kudos
Message 6 of 10
(3,089 Views)

Yes - trying to save/access the files over the network is going to be slow, plus what happens if there's a problem with the network connection? Does it need to be 2-way synchronisation?

 

You definitely want to think about writing to the files locally and then transferring them to the network as a seperate action.

 

Something we've done before is to write the files locally into a folder and then periodically scan the contents of the folder and transfer the files via FTP to a server.

 

 


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 7 of 10
(3,077 Views)
I am trying the same, exept i have an internal network. The example given wasn't correct yet... It has to have two way synchronization. But i want to make a push mechanism... But don't know how that works... Something like, when a file is closed, then sync it with the server. And when starting elsewhere, lookup the whole directory again...
0 Kudos
Message 8 of 10
(3,052 Views)

Of course - you can always scan both directories, compare the 'modified' timestamp and perform actions accordingly (copy/transfer files).

 

I almost wonder if using a source control / revision tool for managing the documents would be better. You could set up a subversion server to hold the documents and then use the command line tool in LabVIEW to update (pull the files from the server) and commit (push updates to files when they are saved).


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 9 of 10
(3,023 Views)

I think i am going to build some sort of same thing...

 

1. When a new new client opens the software, it gets it's mac address.

2. Look in a table (on the server) if the mac address is there, if not add it to it.

3. sync all the files from network to client

 

4. If something changes on the client, upload a "changed files list" to the table with all the connected clients. (mac address table) and upload the file from client to server.

5. Other clients look every 5 seconds to the table and eventually sync server to client

6. update the table where the Mac address has no new files again.

 

something like that.

 

The table is an array of clusters with a string (mac address) and an array of strings "needs to be synced" (file locations (server))

 

Regards,

Thijs

0 Kudos
Message 10 of 10
(3,014 Views)