Open curusarn opened 4 years ago
Hi, I am thinking about implementing this based on the design you outlined in your thesis.
Let me summarize what I have in mind.
You propose a component called sync connector. This component may run locally or remotely (some kind of auth will be necessary). Local sync connector is useful for third-party sync solutions. The remote sync connector is stand-alone. The communication protocol is JSON REST (same as for the resh daemon). This component handles the long-term storage of the history records (it may be a database or, for example, a file that will be synced by some third-party solution). There are two main communication paths between the resh daemon and this component.
Both mentioned paths happen after the start and then periodically in a defined interval (maybe set individually for each).
Configuring the synchronization period and the sync connector address (+auth) remains an open question because I know that the resh configuration is not finalized.
I also think it would be a bit better not to do a read path but a query path. You would run a local resh daemon (as you do now) that would search locally, for example, 1k history records, and then query the remote (central backend) only for a specific query. This approach scales better (because it is centralized by default, and data from all the clients may be stored in a database - not in memory). You transfer data from the remote only for a specific query. But this is just a thought for the future because it needs a bigger change in the search engine (query 2 separate backends asynchronously - local and remote, then display local first (with a notice for the user) and then merge the results and display them). It also needs an implementation of search in the sync connector.
I will prepare a prototype for the sync connector as part of Hacktoberfest.
Steps:
SQLite sync connector implementation https://github.com/tivvit/resh-sync-connector-sqlite
Designed as part of my thesis - available here: https://github.com/curusarn/ctu-fit-master-thesis/releases/tag/v1.0