Page 1 of 1

smart client or headless client

PostPosted: Wed Sep 14, 2011 9:59 pm
by rogel
Hi!

I would like to seek advice which is better to use for this requirement

The user can perform backup of their data(scripts) manually or automatic using windows scheduler and save in their local machine.

Re: smart client or headless client

PostPosted: Thu Sep 15, 2011 9:48 am
by Joas
The smart client will freeze while it is running the process. So if it is a long process, I would suggest using the headless client, then the user can just continue working in the smart client.

Note that a headless client is a separate client that will use one license.

Re: smart client or headless client

PostPosted: Thu Sep 15, 2011 10:12 am
by ROCLASI
Hi Rogel,

Here are a few other things to keep in mind.
If you use headless client then the backup is done on the server which is of course the most efficient (closest to the data). Smart client runs on the local machine.
So yes you can use the headless client but then you need to download the backup file to the local machine (and make sure this backup file is uniquely named because other users might be doing a backup at the same time).
So depending on the amount of data you are backing up you might want to choose one or the other.

And you are talking about Windows scheduler. Is this on the server or on the client machine ?
How do you want Windows scheduler to interact with Servoy ? Or do you want to use a batchscript that interacts with psql/pg_dump ?

Re: smart client or headless client

PostPosted: Fri Sep 16, 2011 1:11 am
by rogel
ROCLASI wrote:Hi Rogel,

Here are a few other things to keep in mind.
If you use headless client then the backup is done on the server which is of course the most efficient (closest to the data). Smart client runs on the local machine.
So yes you can use the headless client but then you need to download the backup file to the local machine (and make sure this backup file is uniquely named because other users might be doing a backup at the same time).
So depending on the amount of data you are backing up you might want to choose one or the other.

And you are talking about Windows scheduler. Is this on the server or on the client machine ?
How do you want Windows scheduler to interact with Servoy ? Or do you want to use a batchscript that interacts with psql/pg_dump ?


Hi Robert,

Thanks for the pointers. We are considering the backup to happen on the server. Do you have some advice on how to do the download of the backup file? I did use createFolder and streamFilesFromServer but did not work.


Code: Select all
var directory_for_backup = "dbbackup"+abc
   var d = plugins.file.convertToJSFile(directory_for_backup);
   application.output("1..."+ new Date(), LOGGINGLEVEL.WARNING)
   if (!plugins.file.createFolder(d))
      application.output("Folder could not be created.");
   
   var f = plugins.file.createFile(d+"\\xyz.sql");
   application.output("3..."+ new Date(), LOGGINGLEVEL.WARNING)

   // Create the file on disk.
   if (!f.createNewFile())
      application.output("The file could not be created.");
   application.output("4..."+ new Date(), LOGGINGLEVEL.WARNING)

    var zipfile2 = plugins.it2be_tools.zip(f.getAbsolutePath(), true)

   var list = plugins.file.getRemoteFolderContents(directory_for_backup, null, 1);
   if (list) {
      var monitor = plugins.file.streamFilesFromServer("C:\\test", list);
   }


And you are talking about Windows scheduler. Is this on the server or on the client machine ?

The windows scheduler will be on the client machine.

How do you want Windows scheduler to interact with Servoy ?

I have not yet figured out how the interaction from windows scheduler to open the headless client (without opening internet explorer) and call the method from the server. This will be the first time I am doing such.

Or do you want to use a batchscript that interacts with psql/pg_dump ?

We would not be using psql/pg_dump to backup/restore the data for the method should be dynamic to any database.

thanks!