Sync on / via the Cloud

Sync on / via the Cloud

Postby Antonio Mart. » Tue Mar 26, 2013 7:27 pm

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 ;-)
Antonio Mart.
 
Posts: 174
Joined: Sat Feb 23, 2013 10:04 am

Re: Sync on / via the Cloud

Postby Jeff Barnes » Tue Mar 26, 2013 10:55 pm

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....
Thanks,
Jeff Barnes

(FWH 16.11, xHarbour 1.2.3, Bcc730)
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada

Re: Sync on / via the Cloud

Postby Antonio Mart. » Wed Mar 27, 2013 8:32 am

Jeff,

My cloud scheme should be:

Image

Is this possible with skydrive?

regards
Antonio Mart.
 
Posts: 174
Joined: Sat Feb 23, 2013 10:04 am

Re: Sync on / via the Cloud

Postby Jeff Barnes » Wed Mar 27, 2013 12:38 pm

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 :)
Thanks,
Jeff Barnes

(FWH 16.11, xHarbour 1.2.3, Bcc730)
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada

Re: Sync on / via the Cloud

Postby Adolfo » Wed Mar 27, 2013 1:35 pm

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.
;-) Ji,ji,ji... buena la cosa... "all you need is code"

http://www.xdata.cl - Desarrollo Inteligente
----------
Asus TUF F15, 32GB Ram, 1 TB NVME M.2, 1 TB SSD, GTX 1650
User avatar
Adolfo
 
Posts: 846
Joined: Tue Oct 11, 2005 11:57 am
Location: Chile

Re: Sync on / via the Cloud

Postby Antonio Mart. » Wed Mar 27, 2013 2:18 pm

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
Antonio Mart.
 
Posts: 174
Joined: Sat Feb 23, 2013 10:04 am

Re: Sync on / via the Cloud

Postby MarcoBoschi » Thu Mar 28, 2013 11:27 am

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
User avatar
MarcoBoschi
 
Posts: 1015
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

Re: Sync on / via the Cloud

Postby Jeff Barnes » Thu Mar 28, 2013 1:21 pm

Hi Marco,

Yes, the whole file would be uploaded to the cloud.
Thanks,
Jeff Barnes

(FWH 16.11, xHarbour 1.2.3, Bcc730)
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada

Re: Sync on / via the Cloud

Postby Antonio Mart. » Thu Mar 28, 2013 1:56 pm

Hi,

Only...

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

Regards
Antonio Mart.
 
Posts: 174
Joined: Sat Feb 23, 2013 10:04 am

Re: Sync on / via the Cloud

Postby MarcoBoschi » Fri Mar 29, 2013 5:01 pm

if the table gets bigger?
User avatar
MarcoBoschi
 
Posts: 1015
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

Re: Sync on / via the Cloud

Postby James Bott » Sat Mar 30, 2013 7:14 pm

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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Sync on / via the Cloud

Postby Antonio Mart. » Sun Mar 31, 2013 9:23 pm

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
Antonio Mart.
 
Posts: 174
Joined: Sat Feb 23, 2013 10:04 am

Re: Sync on / via the Cloud

Postby MarcoBoschi » Mon Apr 01, 2013 1:49 pm

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
User avatar
MarcoBoschi
 
Posts: 1015
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

Re: Sync on / via the Cloud

Postby James Bott » Mon Apr 01, 2013 1:51 pm

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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Sync on / via the Cloud

Postby Antonio Mart. » Mon Apr 01, 2013 2:01 pm

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
Antonio Mart.
 
Posts: 174
Joined: Sat Feb 23, 2013 10:04 am

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 82 guests