Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » DSDP - Target Management » Using RSE synchronize cache to import files
Using RSE synchronize cache to import files [message #1080908] Tue, 06 August 2013 10:27 Go to next message
Phil Czek is currently offline Phil Czek
Messages: 5
Registered: July 2013
Junior Member
Hi,

Currently i'am working on a new workspace concept for our eclipse rcp application.

Here is our setup.
On our remote server we basicly two kind of files - huge data files and small scripts.
The RCP Application is build ontop of xtext and is used to edit the scripts remotely with syntax highlightning/checking aswell as a content assist feature.

Until now we are linking the script files into our workspace via a sambashare. Which works fine if you are using the application in our local network. But if we have to use vpn connection with a small bandwith it is impossible to edit the scripts.

First of all the import (creating the links in the workspace) is insanly slow. And if that is done opening and editing is by far not as pleasant as in the local network.
Therefore we want to import and cache the script files using the RSE synchonize cache mechanism.

So where do i start? i have absolutly no idea where i should look. i fould the bug describing the synchonize cache action (https://bugs.eclipse.org/bugs/show_bug.cgi?id=143503) but how to find the corresponding source?

Or do you have any other suggestions how this could be improved/done?
We definitly don't want to create projects, because we don't want to pollute our server filesystem (local would be fine) with eclipse specific files (.project .metadata) or locking mechanisms.

Re: Using RSE synchronize cache to import files [message #1081659 is a reply to message #1080908] Wed, 07 August 2013 10:13 Go to previous messageGo to next message
Martin Oberhuber is currently offline Martin Oberhuber
Messages: 982
Registered: July 2009
Senior Member
So you want to maintain a local copy of some files, and synchronize-back that copy at appropriate times.

Have you thought about simply using rsync to do that ? - rsync provides a rich syntax for filters (so you would synchronize only those files that you're interested in), it ensures that you download / synchronize only those files that changed etc.

Your rcp app would edit the files in some local directory and then you run rsync to synchronize up any changes (or download back). See also https://bugs.eclipse.org/bugs/show_bug.cgi?id=195997 .

The one thing that rsync doesn't handle is resolving conflicts so if user edited his local copy and somebody else edited the remote file, a plain "rsync-up" would overwrite the remote file. Some add-ons on top of rsync have been built to handle this (you should find some by Googling); the Eclipse PTP project uses git instead of rsync to do the synchronization. But perhaps you don't even need that sort of locking / conflict resolution or you want to code something yourself?

Another option is keeping only those files local that have in fact been edited. Drawback would be that the initial edit operation might be slow until the file has been copied to local, but subsequent operations are fast. Perhaps that's where you want to go since you referenced the RSE download cache.

Regarding the original question "where do I find the source" : In the TM project, we commit changes always including the bug ID in the commit message, therefore you can easily search the repository for the commits that were made to implement this bug:

https://git.eclipse.org/c/tm/org.eclipse.tm.git/log/?qt=grep&q=143503

HTH,
Martin
Re: Using RSE synchronize cache to import files [message #1084603 is a reply to message #1081659] Sun, 11 August 2013 17:02 Go to previous message
Phil Czek is currently offline Phil Czek
Messages: 5
Registered: July 2013
Junior Member
Hey thanks Martin, using rsync is a pretty good idea! But after a bit of research i encountered the common problem, that there isn't any reliable rsync java implementation yet. Unfortunately i want to synchronize files between a windows client and linux server and therefore need a usable rsync implementation for windows.

I would really like to have the option to filter files to be synchronized with the remote system explorer.
Previous Topic:create filters in modelinitializer
Next Topic:How can I disable SFTP?
Goto Forum:
  


Current Time: Fri Jul 25 13:38:03 EDT 2014

Powered by FUDForum. Page generated in 0.02105 seconds