You are here

How? Data synchronization only after all EXEs have been terminated

5 posts / 0 new
Last post
Robert88
Offline
Last seen: 7 months 2 weeks ago
Joined: 2018-01-04 12:38
How? Data synchronization only after all EXEs have been terminated

Hello,

I haven't dealt with the PortableApps SDK more intensively yet. Since I want to solve a certain situation with PortableApps and don't know if it can solve my special situation, I would like to ask here first.

I want to make a program suite portable. This suite consists of three or four equivalent programs (called A.exe, B.exe, C.exe and D.exe). All programs use parts of a folder structure under 'Local' in the users directory. All programs can be running at the same time and each program can write to the shared folders under' Local' data.

It is possible, however, that only one or two programs of the suite run at the same time. This depends on the task the user wants to solve.

So that no data is lost, the folders / files under 'Local' must not be written back to the data folder of the portable application after one of the programs has finished, but another of the programs is still running. Only when *all* programs (A, B, C, and D) no longer run must the folders / files be copied from the 'Local' folder back to the Data folder of the PortableApp folder.

Is this behavior manageable with PortableApps?
If so, what are the special commands or switches to realize this behavior? Since I'm an application developer, it's no problem if I need an external exe file with special functions to achieve this behavior.

Thank you for your help!

Robert

John T. Haller
John T. Haller's picture
Offline
Last seen: 1 hour 56 min ago
AdminDeveloperModerator
Joined: 2005-11-28 22:21
Not Supported

The PortableApps.com Launcher does have the ability to wait for multiple EXEs to stop before exiting using WaitForEXE1,2,3. However, it does not have the ability to only backup any existing data for a local version of said apps on the launch of the first arbitrary a.exe, b, exe, etc. I'm not familiar with any app that shares its data like that offhand either.

Sometimes, the impossible can become possible, if you're awesome!

Robert88
Offline
Last seen: 7 months 2 weeks ago
Joined: 2018-01-04 12:38
If I understand you correctly...

Hello John,
thank you very much for your advice
.
If I understand you correctly, it is for example possible to start A.exe first, work with it, then start B.exe later and work with it additionally. Later A.exe can be terminated and after a while B.exe too. The PortableApps Launcher is active all the time and does not copy any data from 'Local' back to the Data folder of the PortableApp location? Not until both EXEs are finished? Is this right?

Or is a "WaitForABCDEareTerminated.exe" still necessary?

It would be sufficient to move the entire folder structure from 'Local' back to Data (and vice versa). It is a structure used by all programs and it doesn't matter if only A.exe is running or all four programs. In all cases the entire structure can be moved to users 'Local' folder.

The structure could look like this

.../Local/A-folder (only neccessary for A.exe)
.../Local/B-folder (only neccessary for B.exe)
.../Local/C-folder (only neccessary for C.exe)
.../Local/D-folder (only neccessary for D.exe)
.../Local/ExchangeData-folder (will be written by all four programs)

Greetings Robert

John T. Haller
John T. Haller's picture
Offline
Last seen: 1 hour 56 min ago
AdminDeveloperModerator
Joined: 2005-11-28 22:21
No

It isn't. Each app expects exclusive use of its folders while it is running and will need to backup any existing local ones. So, in your above situation, if you start A, it will first backup the /Local/A-folder and /Local/ExchangeData-folder to ensure a local version of the app's data won't be lost, then replace both with its own. If you then start B, it will try to backup /Local/B-folder and /Local/ExchangeData-folder which results in the original backup being lost.

In short, our tools are not designed for what you'd like to do. I'm not aware of any apps that share data like this. If I were made aware of some apps that work this way and would be legal for us to release, I'd consider adding this as a feature though it would be a bit complex to configure.

Sometimes, the impossible can become possible, if you're awesome!

Robert88
Offline
Last seen: 7 months 2 weeks ago
Joined: 2018-01-04 12:38
I get it now ;-)

Thank you John, I get it now.

Incidentally, it is a stock exchange software for stock exchange trading (metatrader 4 from metaquotes) with which I would like to serve several brokers in parallel. Some folders contained indicators, sounds, scripts, etc. that are used by all programs and should only exists once. Other folders contain the broker's access data, which are different for each program.

Okay, I'm going to think a little bit about whether I can realize my plan with a self-programmed launcher, which I let start from the PortableApps launcher. I may be able to work with command line parameters to start the program instances separately. If the PortableApps Launcher handles all the registry keys stuff, it would be enough for me. Moving the data folders could be done by my launcher without much effort.

Thanks again for your feedback.

Greetings Robert

Log in or register to post comments