ForerunnerDB icon indicating copy to clipboard operation
ForerunnerDB copied to clipboard

MySQL backed sync

Open binary64 opened this issue 8 years ago • 1 comments

Hi! This project looks fantastic. Just a quick question, is there any way to sync from a master server (one-way from Server > Client) that runs MySQL

I have a signal that I want to send to my page once every minute, but also when the page loads to sync the signal history too.

binary64 avatar Jul 10 '17 14:07 binary64

Hmm...

Sounds like you probably want an API that the client can talk to every minute to get the signal status and when the page loads, call the API to get signal history. That history can be inserted into a ForerunnerDB collection. The signal API call done every minute can then update the collection with the latest signal status.

None of that is technically in ForerunnerDB's scope of control except the data insert part.

If you wanted to PUSH the signal update to clients once a minute from the server instead of polling from clients each minute, I suggest checking out server-sent events (sse).

If you are using ForerunnerDB server-side and wanted to sync data that way, that is a different and probably just as complex way of achieving it, but in my mind, that adds one extra layer to the application stack that is probably not required.

Irrelon avatar Jul 10 '17 15:07 Irrelon