SQLitening Support Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Welcome to the SQLitening support forums!

Author Topic: replication  (Read 331 times)

D. Wilson

  • Guru
  • ***
  • Posts: 196
    • View Profile
replication
« on: April 19, 2018, 04:00:38 PM »

I would like to replication a sqlite database at multiple locations.
I have looked online and there are several solutions. However they want all traffic routed through their server.
I like Litesync.io it is bidirectional and offers an 'Airplane' mode.

I want to keep the functionally of the sqlitening server.

Any insights would be greatly appreciated.
Logged

cj

  • Master Geek
  • ****
  • Posts: 686
    • View Profile
Re: replication - 3 questions 4/19/18
« Reply #1 on: April 19, 2018, 04:40:21 PM »

Do you want to copy 1 file (the database) from one server to another server all at once?
Do you want to tranactions from one server to another server after each transaction in real-time?
Do you want to copy the database (1 file) on each computer to the same computer at each location (just backup.)


« Last Edit: April 22, 2018, 12:06:10 PM by cj »
Logged
CJ

D. Wilson

  • Guru
  • ***
  • Posts: 196
    • View Profile
Re: replication
« Reply #2 on: April 19, 2018, 05:10:07 PM »

Ideally real time. Currently I have a log file that I process.

look at litesync.io  it looks like it would fit the bill however the way it connects to the database doesn't look like it would work.
Logged

cj

  • Master Geek
  • ****
  • Posts: 686
    • View Profile
Re: replication
« Reply #3 on: April 23, 2018, 08:49:53 AM »

I looked at the site you provided and it looks interesting.
I would have to see it in action before using there service.

1. What is wrong with the way you are doing it now?
Is it too slow or not in real-time which is needed?

2. Are the remote locations keeping separate databases or do they share data?
I keep asking questions because any client can update 1 or more locations at the same time when they are online.

3. Is security being handled by transmitting using AES256 with a MAC?

If all you need is a little server program to read data in any format, I have that.

I can only guess you want an identical copy of 1 or more databases that is not used in real-time.
If used in real-time, I'd have to see how litesync.io does it by patching or updating using SQLite.

I'm looking at there open source code and it doesn't show anything other than sending data.

If all transactions have a unique key or timestamp we can be sure each transaction is applied.
There is even a free cloud service that updates only changes using patching, but that may not be what is wanted.
Still need to know if the data is always in use and by how many different locations.

Quote
I would like to replication a sqlite database at multiple locations.
I have looked online and there are several solutions. However they want all traffic routed through their server.
I like Litesync.io it is bidirectional and offers an 'Airplane' mode.


I want to keep the functionally of the sqlitening server.

Any insights would be greatly appreciated.
Replicate a database from each location to a single location?
If so, keep a different databases on one server and update from each client.
It server is not available processing would be done using a log file.

If this is just a backup then a backup service where you share the password.

http://zonealarm.idrive.com/online-backup-features.htm

There is a limited version with ZoneAlarm.  It might be possible for you to keep
your databases in synch using a cloud service where each location uses a different filename.

Another way is to use rsync xdelta bsdiff  or rtpatch and transmit

« Last Edit: April 23, 2018, 04:52:41 PM by cj »
Logged
CJ

D. Wilson

  • Guru
  • ***
  • Posts: 196
    • View Profile
Re: replication
« Reply #4 on: April 23, 2018, 10:46:44 PM »

Currently I am using a log file and posting to the remote server then the local server. It works great and I have a log of all the activity of database transactions.

I am always open to alternative methods.

Logged

cj

  • Master Geek
  • ****
  • Posts: 686
    • View Profile
Re: replication
« Reply #5 on: April 24, 2018, 02:14:15 PM »

Quote
Currently I am using a log file and posting to the remote server then the local server. It works great and I have a log of all the activity of database transactions.

Current method:
1. Create log file entry
2. Update remote server
3. Update local server

Suggestion:
1. Update local server
2. if successful
      Update SuccessTable(statement,time,' ')
3    Update remote server
4    if successful Update SuccessTable (statement,time,'success')

No processing of log file ever needed on local machine
If a transaction fails on remote server the log file entry is not marked as successful
If the remote server is not available there is no wait for it to process or time-out
Later it would be easy to select * from SuccessTable where status <>  'success' to update remote server
« Last Edit: April 30, 2018, 07:28:29 PM by cj »
Logged
CJ