Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MySQL backed sync #228

Open
binary64 opened this issue Jul 10, 2017 · 1 comment
Open

MySQL backed sync #228

binary64 opened this issue Jul 10, 2017 · 1 comment
Labels

Comments

@binary64
Copy link

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.

@Irrelon
Copy link
Owner

Irrelon commented Jul 10, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants