[GH-ISSUE #76] Syncing data #60

Closed
opened 2026-02-26 11:56:35 +03:00 by kerem · 34 comments
Owner

Originally created by @VShawn on GitHub (Feb 4, 2021).
Original GitHub issue: https://github.com/1Remote/1Remote/issues/76

I use 2 PCs at same time. Some time I have to copy PRM database from one to other manually to sync configuration.It is better to have some auto-sync feature to help me do this.

It may works as below:

01 Sync by cloud

image


In this approach sqlite database would be upload/download by Drive automatically. What PRM needs to do is reload the database.

advantage:

  • easy for user to set up a sync service.
  • no need a personal server
  • easy for dev, less code needed

disadvantage:

  • I dont know how/when to tigger PRM reload the database.
  • database SYNC take time, and it may cause sync conflicts which PRM can not resolve.

02 Using MySql/MSSQL

image

In this approach PRM connect to the remote database so that we can get unified data in two PC.

advantage:

  • no conflict file generate.
  • more database selections can be offered to users.

disadvantage:

  • still, I dont know how/when to tigger PRM reload the database.
  • user have to buy their own Server and set up database, port, access authority, blabla...
  • more code is needed to suppor remote database( MYSQL, SQLServer...)

discussion

the most importance things is design how to let PRM know that the data in the database is newer than the one in its cache and then update its cache by re-read from the database.

maybe we can add an update time fileld for every remote session config in the database to mark the data time. PRM reads the time in the database in the background periodically. Once the time in the database is later than the time in the cache, the PRM cache needs to be reloaded.


draft.zip

Originally created by @VShawn on GitHub (Feb 4, 2021). Original GitHub issue: https://github.com/1Remote/1Remote/issues/76 I use 2 PCs at same time. Some time I have to copy PRM database from one to other manually to sync configuration.It is better to have some auto-sync feature to help me do this. # It may works as below: ## 01 Sync by cloud ![image](https://user-images.githubusercontent.com/10143738/106828818-e31f4580-66c5-11eb-8afa-b378736385ed.png) --- In this approach `sqlite database` would be upload/download by Drive automatically. What PRM needs to do is reload the database. ### advantage: - easy for user to set up a sync service. - no need a personal server - easy for dev, less code needed ### disadvantage: - I dont know how/when to tigger PRM reload the database. - database SYNC take time, and it may cause sync conflicts which PRM can not resolve. ## 02 Using MySql/MSSQL ![image](https://user-images.githubusercontent.com/10143738/106830661-760daf00-66c9-11eb-98d2-6cbad2f543c8.png) In this approach PRM connect to the remote database so that we can get unified data in two PC. ### advantage: - no conflict file generate. - more database selections can be offered to users. ### disadvantage: - still, I dont know how/when to tigger PRM reload the database. - user have to buy their own Server and set up database, port, access authority, blabla... - more code is needed to suppor remote database( MYSQL, SQLServer...) # discussion the most importance things is design how to let PRM know that the data in the database is newer than the one in its cache and then update its cache by re-read from the database. maybe we can add an update time fileld for every remote session config in the database to mark the data time. PRM reads the time in the database in the background periodically. Once the time in the database is later than the time in the cache, the PRM cache needs to be reloaded. --- [draft.zip](https://github.com/VShawn/PRemoteM/files/5922532/draft.zip)
kerem 2026-02-26 11:56:35 +03:00
Author
Owner

@VShawn commented on GitHub (Feb 4, 2021):

see here conflict comes, we edit issue at same time : )

image

<!-- gh-comment-id:772964171 --> @VShawn commented on GitHub (Feb 4, 2021): see here conflict comes, we edit issue at same time : ) ![image](https://user-images.githubusercontent.com/10143738/106833570-b3c10680-66ce-11eb-9ca9-e08e77e0a4fa.png)
Author
Owner

@majkinetor commented on GitHub (Feb 4, 2021):

Ahahah, awesome :)

<!-- gh-comment-id:773152076 --> @majkinetor commented on GitHub (Feb 4, 2021): Ahahah, awesome :)
Author
Owner

@majkinetor commented on GitHub (Feb 27, 2021):

Implemented or wontfix ?

<!-- gh-comment-id:787018912 --> @majkinetor commented on GitHub (Feb 27, 2021): Implemented or wontfix ?
Author
Owner

@VShawn commented on GitHub (Feb 27, 2021):

???

Didn't remember I clicked the close button

<!-- gh-comment-id:787049310 --> @VShawn commented on GitHub (Feb 27, 2021): ??? Didn't remember I clicked the close button
Author
Owner

@VShawn commented on GitHub (Jun 28, 2021):

I will not support sync database, I trying to design a subscription system to sync server data for business users on net5 version.

<!-- gh-comment-id:869519809 --> @VShawn commented on GitHub (Jun 28, 2021): I will not support sync database, I trying to design a subscription system to sync server data for business users on net5 version.
Author
Owner

@majkinetor commented on GitHub (Dec 14, 2021):

I will reopen this as you told me you still want this.

I will look into this, initial plan is to see if this can be used: https://www.sqlite.org/sessionintro.html

sync server

Sync server might be great for enterprise, but probably bad for individual users that want PRM on several computers to be in sync. There is probably solution that targets both usecases.

<!-- gh-comment-id:993507307 --> @majkinetor commented on GitHub (Dec 14, 2021): I will reopen this as you told me you still want this. I will look into this, initial plan is to see if this can be used: https://www.sqlite.org/sessionintro.html > sync server Sync server might be great for enterprise, but probably bad for individual users that want PRM on several computers to be in sync. There is probably solution that targets both usecases.
Author
Owner

@majkinetor commented on GitHub (Jan 17, 2022):

I don't like a lot when apps reinvent the thing when we can use better existing thing although here I also see a benefit of having it internally. So I thought to try available things.

I tried using Synthing first. Setup is fairly trivial, its done in couple of minutes on new machine and syncthing itself looks great. It syncs stuff, however PRemoteM must not be running cause it locks database file. Its not that easy to support such scenario on Windows (syncing locked files) so internal solution is in check if that stays this way. This makes syncthing and basically any other sync engine unusable (I am certainly not going to think about manually closing the app so it gets synced eventually)

One pretty easy solution comes to mind regarding this, and I bet a lot of people would appreciate if they could use whatever sync engine they are using currently:

  • PRM should never lock database. It can load it, and then use it from the memory and release the file. It should flush changes when user edits config (fairly rare thing relative to other usage). It should also watch that file (either using filesystem watch API or pooling using some small configurable interval like 10s) and update memory database when it is changed (that will allow getting changes from remote when PRM is running 24/7).

This should be implementable in a day or two IMO, could be optional (config option [x] keep database unlocked) and would also be good for some helpers tools - those that would need to access and modify db directly in absence of PRM functionality.

With this, we can have sync in number of ways (I will make sure to document few of them if it gets developed). Internal functionality for this is certainly better but its far from easy to implement and then again you have that not-doing-one-thing-well problem. You can later always implement full blown internal solution but we will have working solution until then. Its also very cool not to lock the db as it unlocks extensions that could be done via separate apps/CLI scripts. Even when you need to manually copy db from one location to another without any automatic sync, it will help as you don't need to restart PRM.

What do you think ?

The only problem with this is PRemoteM.exe itself not being syncable (because it is locked and can't be unlocked) but that is IMO minor point and PRM can itself refuse to work with the newer db (if remote PRM gets updated before local PRM, the local could ask you to update the local PRM copy before continuing).

<!-- gh-comment-id:1014872369 --> @majkinetor commented on GitHub (Jan 17, 2022): I don't like a lot when apps reinvent the thing when we can use better existing thing although here I also see a benefit of having it internally. So I thought to try available things. I tried using [Synthing](https://syncthing.net/) first. Setup is fairly trivial, its done in couple of minutes on new machine and syncthing itself looks great. It syncs stuff, **however PRemoteM must not be running** cause it locks database file. Its not that easy to support such scenario on Windows (syncing locked files) so internal solution is in check if that stays this way. This makes syncthing and basically any other sync engine unusable (I am certainly not going to think about manually closing the app so it gets synced eventually) One pretty easy solution comes to mind regarding this, and I bet a lot of people would appreciate if they could use whatever sync engine they are using currently: - PRM should never lock database. It can load it, and then use it from the memory and release the file. It should flush changes when user edits config (fairly rare thing relative to other usage). It should also watch that file (either using filesystem watch API or pooling using some small configurable interval like 10s) and update memory database when it is changed (that will allow getting changes from remote when PRM is running 24/7). This should be implementable in a day or two IMO, could be optional (config option [x] _keep database unlocked_) and would also be good for some helpers tools - those that would need to access and modify db directly in absence of PRM functionality. With this, we can have sync in number of ways (I will make sure to document few of them if it gets developed). Internal functionality for this is certainly better but its far from easy to implement and then again you have that not-doing-one-thing-well problem. You can later always implement full blown internal solution but we will have working solution until then. Its also very cool not to lock the db as it unlocks extensions that could be done via separate apps/CLI scripts. Even when you need to manually copy db from one location to another without any automatic sync, it will help as you don't need to restart PRM. What do you think ? The only problem with this is PRemoteM.exe itself not being syncable (because it is locked and can't be unlocked) but that is IMO minor point and PRM can itself refuse to work with the newer db (if remote PRM gets updated before local PRM, the local could ask you to update the local PRM copy before continuing).
Author
Owner

@VShawn commented on GitHub (Jan 18, 2022):

It was the feature of the very beginning version of PRM. The db was unlocked at that time, the synchronization of the database occasionally conflicts. Some users moved the database during use, and then the crashed.

In any case, this is indeed the easiest solution to achieve data synchronization, but we have to add monitoring of db file, to update the memory cache as soon as the db is updated. A warning pops up once the database is removed.

<!-- gh-comment-id:1015316042 --> @VShawn commented on GitHub (Jan 18, 2022): It was the feature of the very beginning version of PRM. The db was unlocked at that time, the synchronization of the database occasionally conflicts. Some users moved the database during use, and then the crashed. In any case, this is indeed the easiest solution to achieve data synchronization, but we have to add monitoring of db file, to update the memory cache as soon as the db is updated. A warning pops up once the database is removed.
Author
Owner

@majkinetor commented on GitHub (Jan 18, 2022):

Some users moved the database during use, and then the crashed

This is not particularly needed - PRM can recreate it from its in memory state I guess. I wouldn't even popup user (you could make this configurable - [x] automatically recreate db from memory if it doesn't exist)

The synchronization of the database occasionally conflicts.

Conflict could happen indeed, but it could happen with any solution really.

Inaccessible db will also happen on both sync process side and PRM side if they run in parallel (depending who started first). PRM can simply ignore this and retry again later - if db stays locked longer then lets say 1m, it should complain to the user. If it happens on the synthing side, synthing will just ignore this event (it will be shown in logs) and try again later.

A warning pops up once the database is removed.

I would do this:

  1. If there is no database, dump the latest one from the memory and call it a day
  2. If db is locked by external process, retry 3 times after 10s. Show tray notification or something unobtrusive since its expected to be transient (i.e PRM has problem saving data to its database due to the external lock and will retry in 10s up to 3 times) then if all that fails it should popup to the user: Your latest edits will be lost as database is locked by external process. Please manually unlock the db and press OK. Or, click here to save the database under different name db-YYYY-mm-dd-hh:ss).

The idea is to not molest user but require attention when its absolutely necessary.

<!-- gh-comment-id:1015326484 --> @majkinetor commented on GitHub (Jan 18, 2022): > Some users moved the database during use, and then the crashed This is not particularly needed - PRM can recreate it from its in memory state I guess. I wouldn't even popup user (you could make this configurable - [x] _automatically recreate db from memory if it doesn't exist_) > The synchronization of the database occasionally conflicts. Conflict could happen indeed, but it could happen with any solution really. Inaccessible db will also happen on both sync process side and PRM side if they run in parallel (depending who started first). PRM can simply ignore this and retry again later - if db stays locked longer then lets say 1m, it should complain to the user. If it happens on the synthing side, synthing will just ignore this event (it will be shown in logs) and try again later. > A warning pops up once the database is removed. I would do this: 1. If there is no database, dump the latest one from the memory and call it a day 2. If db is locked by external process, retry 3 times after 10s. Show tray notification or something unobtrusive since its expected to be transient (i.e _PRM has problem saving data to its database due to the external lock and will retry in 10s up to 3 times_) then if all that fails it should popup to the user: _Your latest edits will be lost as database is locked by external process. Please manually unlock the db and press OK. Or, click here to save the database under different name db-YYYY-mm-dd-hh:ss_). The idea is to not molest user but require attention when its absolutely necessary.
Author
Owner

@majkinetor commented on GitHub (Jan 18, 2022):

About conflict:

  1. If I lock db externally and then change connection in PRM which can now not save to the db until lock is released. Now if external tool changes db, we have conflict. In that case, we could go with an option - On conflict: (o) prefer memory (o) prefer disk (o) ask me. This would work on entire database only. To simplify this you will probably need to have lastChangeDate in db that will update for any change (if in-memory lastChangeDate != disk lastChangeDate you have conflict)
  2. If db is changed externally but there are no in memory changes on PRM side, it should always prefer disk

There could be more advanced conflict resolution later, i.e. if changed stuff is from different connections, you could merge disk changes with memory changes easily. For that to work you just need to check if last changed date is the same or not on particular connection. If there are changes on both sides on different connections, you can load the disk db in memory, copy the changed connections to in memory database, then save the in memory database to disk. This is definitely good to have as 99% of db changes by multiple processes would most definitely be on different connections. If conflict is detected PRM could ask which connection to keep and even show diff.

This is all a bit more advanced, but IMO easy to grasp and not that hard to implement. However, this can be left for future - this type of sync is basically multi-user edit in parallel of the same database which is not something that is relevant for single person (its only relevant if 1 of the machines is offline, and for that reason we could have basic conflict resolution described in 1).

<!-- gh-comment-id:1015431068 --> @majkinetor commented on GitHub (Jan 18, 2022): About conflict: 1. If I lock db externally and then change connection in PRM which can now not save to the db until lock is released. Now if external tool changes db, we have conflict. In that case, we could go with an option - _On conflict: (o) prefer memory (o) prefer disk (o) ask me_. This would work on entire database only. To simplify this you will probably need to have lastChangeDate in db that will update for any change (if `in-memory lastChangeDate != disk lastChangeDate` you have conflict) 2. If db is changed externally but there are no in memory changes on PRM side, it should always prefer disk There could be more advanced conflict resolution later, i.e. if changed stuff is from different connections, you could merge disk changes with memory changes easily. For that to work you just need to check if last changed date is the same or not on particular connection. If there are changes on both sides on different connections, you can load the disk db in memory, copy the changed connections to in memory database, then save the in memory database to disk. This is definitely good to have as 99% of db changes by multiple processes would most definitely be on different connections. If conflict is detected PRM could ask which connection to keep and even show diff. This is all a bit more advanced, but IMO easy to grasp and not that hard to implement. However, this can be left for future - this type of sync is basically multi-user edit in parallel of the same database which is not something that is relevant for single person (its only relevant if 1 of the machines is offline, and for that reason we could have basic conflict resolution described in 1).
Author
Owner

@VShawn commented on GitHub (Jan 19, 2022):

sounds reasonable.

We can first provide an option to decide DB is occupied or not, and then consider advanced things.

<!-- gh-comment-id:1016048425 --> @VShawn commented on GitHub (Jan 19, 2022): sounds reasonable. We can first provide an option to decide DB is occupied or not, and then consider advanced things.
Author
Owner

@majkinetor commented on GitHub (Apr 19, 2022):

So is this done? Can I test it again?

<!-- gh-comment-id:1102945489 --> @majkinetor commented on GitHub (Apr 19, 2022): So is this done? Can I test it again?
Author
Owner

@VShawn commented on GitHub (Apr 21, 2022):

So is this done? Can I test it again?

I have not add an option to decide DB is occupied or not,

But yes you can test it, the version after 6.1 will not occupied the database.

FYI, on my PC, my sync app always make my db to read-only because of the conflict.

<!-- gh-comment-id:1104924472 --> @VShawn commented on GitHub (Apr 21, 2022): > So is this done? Can I test it again? I have not add an `option to decide DB is occupied or not,` But yes you can test it, the version after 6.1 will not occupied the database. FYI, on my PC, my sync app always make my db to `read-only` because of the conflict.
Author
Owner

@VShawn commented on GitHub (Apr 25, 2022):

image

sync make my db read-only again! :(

<!-- gh-comment-id:1108428809 --> @VShawn commented on GitHub (Apr 25, 2022): ![image](https://user-images.githubusercontent.com/10143738/165077540-dcca7e55-dcd8-485f-9a07-ab3c425a58f2.png) sync make my db read-only again! :(
Author
Owner

@majkinetor commented on GitHub (Sep 13, 2022):

I found time to check how sync works now, and while I can open and change db while PRM is running, the changes are not visible until I restart PRM.

Did I miss something or you didn't implement this part ? Without it, the whole point of not locking the db is lost.

sync make my db read-only again! :(

Like I said before, you could just show tray message or something (change the titlebar, border etc.) that database is locked but continue working with memory cache, trying to save data periodically. Sync should not lock db forever, but it will lock it temporary.

<!-- gh-comment-id:1245790284 --> @majkinetor commented on GitHub (Sep 13, 2022): I found time to check how sync works now, and while I can open and change db while PRM is running, the changes are not visible until I restart PRM. Did I miss something or you didn't implement this part ? Without it, the whole point of not locking the db is lost. > sync make my db read-only again! :( Like I said before, you could just show tray message or something (change the titlebar, border etc.) that database is locked but continue working with memory cache, trying to save data periodically. Sync should not lock db forever, but it will lock it temporary.
Author
Owner

@VShawn commented on GitHub (Sep 14, 2022):

Yeap. I didn't implement this part.

A db file modify time checker for data update checking was build-in PRM, but its work wasn't good enought, so I delete.

Now I add a timer to check the update timestamp in db for check update and reload data in #282, WIP still.

<!-- gh-comment-id:1246162011 --> @VShawn commented on GitHub (Sep 14, 2022): Yeap. I didn't implement this part. A db file modify time checker for data update checking was build-in PRM, but its work wasn't good enought, so I delete. Now I add a timer to check the update timestamp in db for check update and reload data in #282, WIP still.
Author
Owner

@majkinetor commented on GitHub (Sep 14, 2022):

OK, let me know when its done. Thx.

<!-- gh-comment-id:1246395658 --> @majkinetor commented on GitHub (Sep 14, 2022): OK, let me know when its done. Thx.
Author
Owner

@VShawn commented on GitHub (Sep 15, 2022):

sure

I got the update check logic into mess BTW

Now I need draw a flowchart before restart write new code.

<!-- gh-comment-id:1247780409 --> @VShawn commented on GitHub (Sep 15, 2022): sure I got the update check logic into mess BTW Now I need draw a flowchart before restart write new code.
Author
Owner

@VShawn commented on GitHub (Oct 23, 2022):

since PRM do not occupied the database after 6.X and #282 make MySQL available, I'll close this ticket.

<!-- gh-comment-id:1288005551 --> @VShawn commented on GitHub (Oct 23, 2022): since PRM do not occupied the database after 6.X and #282 make MySQL available, I'll close this ticket.
Author
Owner

@majkinetor commented on GitHub (Oct 24, 2022):

That is not exactly the same thing:

  1. PRM does not lock the database but can't show external changes made by sync engine or random scripts
  2. MySql must be available on the network, while sync can work from the outside
  3. MySql is overkill for people who dont have team but multiple computers with only 1 user
<!-- gh-comment-id:1289190734 --> @majkinetor commented on GitHub (Oct 24, 2022): That is not exactly the same thing: 1. PRM does not lock the database but can't show external changes made by sync engine or random scripts 1. MySql must be available on the network, while sync can work from the outside 2. MySql is overkill for people who dont have team but multiple computers with only 1 user
Author
Owner

@VShawn commented on GitHub (Oct 25, 2022):

PRM does not lock the database but can't show external changes made by sync engine or random scripts

Yes, it can now, 1RM will check database update and reload data every 10s by default since #282.

<!-- gh-comment-id:1289817847 --> @VShawn commented on GitHub (Oct 25, 2022): > PRM does not lock the database but can't show external changes made by sync engine or random scripts Yes, it can now, 1RM will check database update and reload data every 10s by default since #282.
Author
Owner

@VShawn commented on GitHub (Oct 25, 2022):

And PRM will stay in current version, no farther feature will be added.

<!-- gh-comment-id:1289819452 --> @VShawn commented on GitHub (Oct 25, 2022): And PRM will stay in current version, no farther feature will be added.
Author
Owner

@majkinetor commented on GitHub (Oct 25, 2022):

Yes, it can now, 1RM will check database update and reload data every 10s by default since https://github.com/1Remote/PRemoteM/issues/282.

O, didn't know that. Let me test that and get back to you.

And PRM will stay in current version, no farther feature will be added.

What do you mean? Forever or regarding this feature or... :)

<!-- gh-comment-id:1290342747 --> @majkinetor commented on GitHub (Oct 25, 2022): > Yes, it can now, 1RM will check database update and reload data every 10s by default since https://github.com/1Remote/PRemoteM/issues/282. O, didn't know that. Let me test that and get back to you. > And PRM will stay in current version, no farther feature will be added. What do you mean? Forever or regarding this feature or... :)
Author
Owner

@VShawn commented on GitHub (Oct 25, 2022):

What do you mean? Forever or regarding this feature or... :)

The next update of the app will be 1Remote :)

<!-- gh-comment-id:1290376929 --> @VShawn commented on GitHub (Oct 25, 2022): > What do you mean? Forever or regarding this feature or... :) The next update of the app will be `1Remote` :)
Author
Owner

@majkinetor commented on GitHub (Oct 31, 2022):

I am on 0.7.1.7 beta 3 and it doesn't reaload after 10s. Am I missing anything ?

<!-- gh-comment-id:1297784813 --> @majkinetor commented on GitHub (Oct 31, 2022): I am on 0.7.1.7 beta 3 and it doesn't reaload after 10s. Am I missing anything ?
Author
Owner

@VShawn commented on GitHub (Nov 1, 2022):

OH nonono, 0.7.X is PRM, PRM does not support new feature.

almost done, @majkinetor you can try this one since you mentioned in #76 (comment)

1Remote alpha.01.zip

1RM 1.0.0 alpha should works.

image

<!-- gh-comment-id:1298279423 --> @VShawn commented on GitHub (Nov 1, 2022): OH nonono, 0.7.X is PRM, PRM does not support new feature. > almost done, @majkinetor you can try this one since you mentioned in [#76 (comment)](https://github.com/1Remote/PRemoteM/issues/76#issuecomment-1246395658) > > [1Remote alpha.01.zip](https://github.com/1Remote/PRemoteM/files/9843481/1Remote.alpha.01.zip) 1RM 1.0.0 alpha should works. ![image](https://user-images.githubusercontent.com/10143738/199133448-edbceaf4-01a6-4a7c-a8be-5e7c2f64a978.png)
Author
Owner

@majkinetor commented on GitHub (Nov 1, 2022):

It doesn't work either. I opened dbeaver, changed the connection, closed dbeaver to release a lock, and waited, nothing happened. Restarted the app and the changes were visible.

BTW, 1RM didn't load my PRM database file.

<!-- gh-comment-id:1298294025 --> @majkinetor commented on GitHub (Nov 1, 2022): It doesn't work either. I opened dbeaver, changed the connection, closed dbeaver to release a lock, and waited, nothing happened. Restarted the app and the changes were visible. BTW, 1RM didn't load my PRM database file.
Author
Owner

@VShawn commented on GitHub (Nov 1, 2022):

It doesn't work either. I opened dbeaver, changed the connection, closed dbeaver to release a lock, and waited, nothing happened. Restarted the app and the changes were visible.

1RM will reload the database only if database was modified by another 1RM.

there is a key to identify the latest modify time of connection data.

1RM will check this key and compare with its last read time. If last read time < latest data time, 1RM will read the changes.


Now 1RM will port from PRM automatically when 1Remote.json 1Remote.db not existed and there is a PRemoteM.db in the folder.

image


BTW, you can get the latest build from github action artifacts now

https://github.com/1Remote/PRemoteM/actions/runs/3345610634

<!-- gh-comment-id:1298397741 --> @VShawn commented on GitHub (Nov 1, 2022): > It doesn't work either. I opened dbeaver, changed the connection, closed dbeaver to release a lock, and waited, nothing happened. Restarted the app and the changes were visible. 1RM will reload the database only if database was modified by another 1RM. there is a key to identify the latest modify time of connection data. 1RM will check this key and compare with its `last read time`. If `last read time` < `latest data time`, 1RM will read the changes. --- Now 1RM will port from PRM automatically when `1Remote.json` `1Remote.db` not existed and there is a `PRemoteM.db` in the folder. ![image](https://user-images.githubusercontent.com/10143738/199225454-85b6b2a4-5344-4d77-a0dc-d946b0321a2f.png) --- BTW, you can get the latest build from github action artifacts now https://github.com/1Remote/PRemoteM/actions/runs/3345610634
Author
Owner

@majkinetor commented on GitHub (Nov 1, 2022):

BTW, you can get the latest build from github action now

Awesome.

1RM will reload the database only if database was modified by another 1RM.

Ah, OK. Not sure why you had to put that requirement. Adding automated column or trigger to insert last change date no matter what process did it sounds like better option? Not a problem tho, I can set that field too. I see only Config.UpdateTimestamp. Where is this latest data time ?

BTW, I don't think we are at 1.0 version yet. I would make 1RM 0.9 variant as I think we need to redesign protocols a bit probably in incompatible way and do relational db tests.

<!-- gh-comment-id:1298404446 --> @majkinetor commented on GitHub (Nov 1, 2022): > BTW, you can get the latest build from github action now Awesome. > 1RM will reload the database only if database was modified by another 1RM. Ah, OK. Not sure why you had to put that requirement. Adding automated column or trigger to insert last change date no matter what process did it sounds like better option? Not a problem tho, I can set that field too. I see only `Config.UpdateTimestamp`. Where is this `latest data time` ? BTW, I don't think we are at 1.0 version yet. I would make 1RM 0.9 variant as I think we need to redesign protocols a bit probably in incompatible way and do relational db tests.
Author
Owner

@VShawn commented on GitHub (Nov 1, 2022):

UpdateTimestamp is the latest data time

I was once try to check modify time of the .db file but it got into a mess, latter I design the UpdateTimestamp.

BTW, I don't think we are at 1.0 version yet. I would make 1RM 0.9 variant as I think we need to redesign protocols a bit probably in incompatible way and do relational db tests.

of course, we can make it 0.9

Since my progress is slow for months, it would be a long time before I made a stable release of 1RM. And I would make 1RM publish with nightly build before jobs done.

<!-- gh-comment-id:1298430129 --> @VShawn commented on GitHub (Nov 1, 2022): UpdateTimestamp is the `latest data time` I was once try to check modify time of the .db file but it got into a mess, latter I design the UpdateTimestamp. > BTW, I don't think we are at 1.0 version yet. I would make 1RM 0.9 variant as I think we need to redesign protocols a bit probably in incompatible way and do relational db tests. of course, we can make it 0.9 Since my progress is slow for months, it would be a long time before I made a stable release of 1RM. And I would make 1RM publish with nightly build before jobs done.
Author
Owner

@majkinetor commented on GitHub (Nov 1, 2022):

This column is under Config. Why didn't you introduce on each connection? This way you always need to relad everything instead of individual changes.

<!-- gh-comment-id:1298480814 --> @majkinetor commented on GitHub (Nov 1, 2022): This column is under Config. Why didn't you introduce on each connection? This way you always need to relad everything instead of individual changes.
Author
Owner

@VShawn commented on GitHub (Nov 1, 2022):

Why didn't you introduce on each connection?

because PRM doesn't have a db interface to reload a individual connection. A global flag is the easiest approach to goal the sync feature based on PRM.

introduce on each connection is my step2 plan, i will have to redesign db interface before get start with introduce latest data time on each connection

<!-- gh-comment-id:1298507501 --> @VShawn commented on GitHub (Nov 1, 2022): > Why didn't you introduce on each connection? because PRM doesn't have a db interface to reload a individual connection. A global flag is the easiest approach to goal the sync feature based on PRM. `introduce on each connection` is my step2 plan, i will have to redesign db interface before get start with `introduce latest data time on each connection`
Author
Owner

@majkinetor commented on GitHub (Nov 13, 2022):

OK, now I am on latest. Config column now has only RSA stuff. Where is the UpdateTimestamp ?
I still can't change stuff externally without a restart without it.

<!-- gh-comment-id:1312817321 --> @majkinetor commented on GitHub (Nov 13, 2022): OK, now I am on latest. Config column now has only RSA stuff. Where is the `UpdateTimestamp` ? I still can't change stuff externally without a restart without it.
Author
Owner

@VShawn commented on GitHub (Nov 14, 2022):

you mean 0.7.1.7? I have to say this feature and other new feature will be add to next version, 0.7.X is LTS version.

<!-- gh-comment-id:1313153472 --> @VShawn commented on GitHub (Nov 14, 2022): you mean 0.7.1.7? I have to say this feature and other new feature will be add to next version, 0.7.X is LTS version.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/1Remote#60
No description provided.