Page 1 of 2

Sync on / via the Cloud

PostPosted: Tue Mar 26, 2013 7:27 pm
by Antonio Mart.
Hi all,

Having already about the new program aimed for tablets stylish "touching", comes another stage.

These would lead to several commercials should send their tablets and / synchronize data with the server of the company.
As the internet connection is not "safe", then you have to think of a mobile database.
But as the mobile database, as well as expensive, are an adventure to explore for me, had thought of using a synchronization service in / through the cloud using our beloved dBFS.

I had thought that in every commercial server had its own folder that would be synchronized with it the tablet through the "Sync service" (dropbox / skydrive / ...)

Now, and here come the questions:
Could synchronizing several different accounts on the server?
Does anyone have experience with this or synchronization services these programs provide?

A pity that Dropbox does not provide API for Windows.

Comments are welcome. regards

PD. (by) Google translator ;-)

Re: Sync on / via the Cloud

PostPosted: Tue Mar 26, 2013 10:55 pm
by Jeff Barnes
Hi Antonio,

Just a thought.... If I understand your question correctly,

Skydrive has an app you can install on your local PC that will sync with the files on the cloud.
With the Skydrive app you can select what Cloud folders you want to sync with your PC so each could sync with a different folder.

Hope that helps....

Re: Sync on / via the Cloud

PostPosted: Wed Mar 27, 2013 8:32 am
by Antonio Mart.
Jeff,

My cloud scheme should be:

Image

Is this possible with skydrive?

regards

Re: Sync on / via the Cloud

PostPosted: Wed Mar 27, 2013 12:38 pm
by Jeff Barnes
Antonio,

I'm not sure as I have not tried it but the Skydrive app can be installed on each computer then you can tell Skydrive what folders you wish to sync with so it might work.

All you can do is try it :)

Re: Sync on / via the Cloud

PostPosted: Wed Mar 27, 2013 1:35 pm
by Adolfo
I use DropBox with no problems.

Just copy or modify the contents of the folder which I share on my Office Pc and everything is updated in my Notebook, Iphone, and my house Pc.

I just installed DROPBOX on each device, and share the same olders.

Re: Sync on / via the Cloud

PostPosted: Wed Mar 27, 2013 2:18 pm
by Antonio Mart.
Jeff, Adolfo,

Thanks for your answers.

Adolfo,

Think you could run dropbox on my work schedule (see above) where each user would have a user account and dropbox would synchronize their data with "their" folder hosted on the server?

Using dropbox, how would I know if the syncing is working? I need to manipulate data in the user folder hosted on the server when synchronization is not working. Is it possible to configure the time synchronization is activated?


regards

Re: Sync on / via the Cloud

PostPosted: Thu Mar 28, 2013 11:27 am
by MarcoBoschi
Just a question: If I modifiy a single record of a a 2GB sized DBF table
When I syncronize into the cloud all 2GB will be transmitted?
Bye

Re: Sync on / via the Cloud

PostPosted: Thu Mar 28, 2013 1:21 pm
by Jeff Barnes
Hi Marco,

Yes, the whole file would be uploaded to the cloud.

Re: Sync on / via the Cloud

PostPosted: Thu Mar 28, 2013 1:56 pm
by Antonio Mart.
Hi,

Only...

I think what mobile devices have small databases with few data.

Regards

Re: Sync on / via the Cloud

PostPosted: Fri Mar 29, 2013 5:01 pm
by MarcoBoschi
if the table gets bigger?

Re: Sync on / via the Cloud

PostPosted: Sat Mar 30, 2013 7:14 pm
by James Bott
From your diagram it looks like you just want to make a backup copy of the network database? Or, did you mean that each user would have a local copy of the database, and each of the dbfs would be synced with every record write?

I guess you could use it to make a backup but it could only be synced when nobody was using the database.

You can't sync local copies of the database whenever a record is written. This would overwrite all changes made by other users since the last sync.

You really need a remote database server for remote database computing in the cloud.

Regards,
James

Re: Sync on / via the Cloud

PostPosted: Sun Mar 31, 2013 9:23 pm
by Antonio Mart.
James,

Thanks for your comment.
I think what best fits my scheme is the mobile database synchronization with possibilities.
http://en.wikipedia.org/wiki/Mobile_database

Not all mobile databases synchronized. Some of which are synchronized:
SQL Anywhere
MS SQL Server
Oracle Lite

Of course, if I use dbf files, I have to find another way to sync. So thought ... drogbox perhaps, or maybe skydrive.

But lately I'm thinking hbNetIO. A gem unknown to me. Over here on the forum seems also not much talk about it.

regards

Re: Sync on / via the Cloud

PostPosted: Mon Apr 01, 2013 1:49 pm
by MarcoBoschi
two possible solutions:
1) think of a class that makes a fragmentation of a table into many smaller tables
so that the files to be copied are of small size

2) set up a synchronizer of tables in a log table keeps track of every change in every single table and then a replicator reads these individual changes in the first database and writes it to a second database
bye

Re: Sync on / via the Cloud

PostPosted: Mon Apr 01, 2013 1:51 pm
by James Bott
Antonio,

>Not all mobile databases synchronized. Some of which are synchronized:

I don't see why any database can't be synchronized. To sync to the main database you just need to post any changes to it from the remote device. It can become complex if you also want to keep local copies of databases, or even certain records of the main database as is discussed in the Wikipedia article you linked to in your last post. In the case of very large main databases, keeping local copies of these databases is probably not possible or feasible.

>Of course, if I use dbf files, I have to find another way to sync. So thought ... drogbox perhaps, or maybe skydrive.

In the case that we are discussing, you need to sync changed records, not the entire database. Dropbox and skydrive only sync files not records.

>But lately I'm thinking hbNetIO. A gem unknown to me. Over here on the forum seems also not much talk about it.

I have not heard of this one, can you post a link to more information?

Note that SQLite is the database used on most (if not all) android devices. It may be used on other devices also. It is also public domain. I believe there is a class to access it using FWH too. The larger issue is that you have to learn to program for the mobile device too.

Regards,
James

Re: Sync on / via the Cloud

PostPosted: Mon Apr 01, 2013 2:01 pm
by Antonio Mart.
Marco, James,

About hbNetio

I donĀ“t know it works NETIO, but by reading the code .prg, I think it is a powerful component


Massimo's blog is outdated (http://harbourlanguage.blogspot.com.es/ ... netio.html).
Giovanni's harbour documentation does not includes hbNetIO.

Also, there is documentation in:
1) changelog, scattered and incomplete
2) the list of users and development
3) the source code of Harbour




My hbNetIO test:
Code: Select all  Expand view
//////////////////
// TestCli.Prg        -- Program client (this file)--
//
//
// Notes:
//
//    \hb32                 is harbour dir  
//    \hb32\bin\hbNetIO.Exe is server NetIO
//    c:\data               is dir data. It must contains Test.Dbf
//
//
// Testing hbNetIO Server from harbour. Steps:
//
//   1st) Mk c:\data
//   2nd) In \hb32\bin run hbnetio so: hbnetio -rootdir=c:\data
//   3rd) Compile, build, run and fun testcli.prg
//
////////////////////////////////////////////////////////////////////////
//-------------------------------------------------------------------------//
FUNCTION Main()
Local oerr
#define DBSERVER  "127.0.0.1"
#define DBPORT    2941
#define DBDIR     "Data"
#define DBFILE    "Test"
#define DBNAME    "net:"+ DBFILE

request DBFCDX, DBFFPT

set exclusive off
rddsetdefault("DBFCDX")

netio_connect( DBSERVER, hb_ntos(DBPORT))
try
   use (DBNAME)
   ? "conexion ok !", fieldname(1), fieldget(1)
catch oerr
   ? "conexion error", oerr:description+ CRLF+ oErr:operation+ CRLF+ oErr:FileName
end

return


regards