Multi User simultaneous access

This forum is for application developers who are integrating HanDBase into their solutions via the HanDBase API (HAPI) or other means. It's also a great place to discuss runtime development.

Multi User simultaneous access

Postby Frans1881 » Sat Sep 05, 2015 8:57 pm

Hi was wondering if its possible to have 2 users access the database at the same time (cloud?) ir if its possible to have 2 users (1 desktop and 1 ipad or 2 pads) have the same database, add and / or edit entries and still not have duplicate entries when they sync?
Frans1881
 
Posts: 5
Joined: Sun Aug 30, 2015 7:41 am

Re: Multi User simultaneous access

Postby dhaupert » Mon Sep 07, 2015 8:30 am

Hi,

Great questions! In any multi-user scenario a set of rules have to be in place for handling these cases. The rules in HanDBase are based on this simple fact- the newest change will will always win. So if user A is modifying a database record and user B also modifies the same record between syncs, the one who made the modification last will win and their changes will be in the final record. Imagine your record is a customer and you have an existing record for this customer. Then one person modifies this record to add a phone number. A few minutes later another person modifies the record to include the email. The sync process will look at this particular record and see the last touched date/time was from the second person and their record will wind up in the synced/merged database.

Since HanDBase syncs at the record level, this would mean that the phone number added would be lost in this case. However, since there can be an unlimited number of users syncing with each other, the only real way to handle this case is to have field level syncing which has so much additional overhead it would greatly increase the size of each database record, the speed of the sync, and the experience overall. When designing the architecture for this, I felt that accommodating this case was not a good decision based on these downsides.

I hope this answers your question!
dhaupert
 
Posts: 4111
Joined: Tue May 26, 2009 11:51 am

Re: Multi User simultaneous access

Postby Gab-Hop » Tue Sep 08, 2015 5:32 pm

Hi Dave
one other Question Regarding syncing
Can you have two different desktops syncing to the same shared set of DBs
eg;(5 users sync to one desktop and 3 sync to another and the desktops both sync to the same network shared DB files)
Or do all users need to sync to the same Desktop through the one sync conduit
The reason being that there is a large network and all users do not want to go all the way to the one windows desktop to sync, as some have computers in there own area that are also connected to the same network
could these also be used to sync the DBs ?
Would the sync rules still apply between different desktops?
Gab-Hop
 
Posts: 45
Joined: Mon Jan 13, 2014 11:34 pm
Location: New Zealand

Re: Multi User simultaneous access

Postby Brian_Houghton » Tue Sep 08, 2015 9:03 pm

Desktop to desktop syncing isn't supported by the conduit, but you could use Dropbox or another similar sync solution to keep the database files up to date on each machine, keeping in mind that the sync is solely at the file level.

You could then set up shared syncing to point to the subfolder in Dropbox you set up to hold your HanDBase databases.
Kind Regards,
Brian Houghton, DDH Software
Brian_Houghton
 
Posts: 2246
Joined: Wed May 20, 2009 8:30 am

Re: Multi User simultaneous access

Postby Frans1881 » Wed Sep 09, 2015 5:59 pm

Hi Dave,

Follow up question: For example: desktop 1 and ipad 1 sync then ipad user goes to the field after sync. desktop1 adds new records to the database and ipad1 makes edits to the previous records and adds a few new records. desktop1 has the latest edit by date and time. is this correct:(?) Since handbase chooses to let the most recent database "win" does it mean it that when desktop and ipad syncs, the datbase would only contain the new records it added and disregard any edits and new records added by ipad?
Frans1881
 
Posts: 5
Joined: Sun Aug 30, 2015 7:41 am

Re: Multi User simultaneous access

Postby Brian_Houghton » Wed Sep 09, 2015 7:51 pm

Since the sync is per field, the updated records on the computer will overwrite the older records on the iPad. However, newly added records on the iPad will copy to the computer during the sync.
Kind Regards,
Brian Houghton, DDH Software
Brian_Houghton
 
Posts: 2246
Joined: Wed May 20, 2009 8:30 am

Re: Multi User simultaneous access

Postby Frans1881 » Wed Dec 23, 2015 3:11 am

Thanks! Does syncing also work for databases with images?
Frans1881
 
Posts: 5
Joined: Sun Aug 30, 2015 7:41 am

Re: Multi User simultaneous access

Postby Brian_Houghton » Wed Dec 23, 2015 10:16 pm

Images added on the iPad or iPhone are copied to the computer during each sync, but are not transferred bi-directionally.
Kind Regards,
Brian Houghton, DDH Software
Brian_Houghton
 
Posts: 2246
Joined: Wed May 20, 2009 8:30 am


Return to HanDBase - Developers

Who is online

Users browsing this forum: No registered users and 1 guest

cron