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

Push notifications on data changes (client-server data sync) #300

Open
Mec-iS opened this Issue Dec 5, 2018 · 9 comments

Comments

Projects
4 participants
@Mec-iS
Copy link
Contributor

Mec-iS commented Dec 5, 2018

I'm submitting a

  • [x ] feature request.

Current Behaviour:

There is no way for now to make the client-side graph representation of the data aware of data changes. Clients have to query the server every time to be sure that data has not been updated since the last query. This opens to the possibility of the client using stale data.

Expected Behaviour:

hydrus should allows the clients to connect through WebSocket to push data changes for every object directly to the client.
Maybe also needed some sort of security mechanism should be present; server keeps a table for its outbox and client keeps an inbox. The server keeps a log of changes in an outbox table, the client every time before sending a request should check the server's outbox if its inbox is synced with the latest changes. This implies that every request is under-the-hood two requests.
This refers to #218 as the inbox/outbox may be a DAG.

Do you want to work on this issue?

This will probably be a task to be part of GSOC 2019

Please start collecting here ideas for implementation, tell the community how you would like to see implemented this feature.

@HarsheetKakar

This comment has been minimized.

Copy link

HarsheetKakar commented Jan 11, 2019

If I'm understanding the feature correctly you need a dashboard for client side (we can use dash for that)

@Mec-iS Mec-iS changed the title Push notifications on data changes to client Push notifications on data changes (client-server data sync) Mar 19, 2019

@Mec-iS

This comment has been minimized.

Copy link
Contributor Author

Mec-iS commented Mar 21, 2019

no, this is a backend implementation for a server-client updates

@ShravanDoda

This comment has been minimized.

Copy link
Contributor

ShravanDoda commented Mar 22, 2019

@Mec-iS shouldn't this work both ways. Rather than just making client aware of data changes on the server-side, client should be able to push changes to server as well (given it has been authorized). I don't know if hydrus currently supports any way to push changes to server database. Please guide.

@vddesai1871

This comment has been minimized.

Copy link
Member

vddesai1871 commented Mar 22, 2019

I do not think the client is supposed to change HydraDoc. If I am correct, this feature is mainly about pushing data changes made by other clients to any client connected with that instance of hydrus.

@ShravanDoda

This comment has been minimized.

Copy link
Contributor

ShravanDoda commented Mar 22, 2019

@vddesai1871 I think hydra-python-agent can add new instances of resources.. It might not be able to add new classes or collections. Please take a look
https://github.com/HydraCG/Specifications/blob/master/drafts/use-cases/5.1.creating-event-with-put.md

@vddesai1871

This comment has been minimized.

Copy link
Member

vddesai1871 commented Mar 22, 2019

@vddesai1871 I think hydra-python-agent can add new instances of resources.. It might not be able to add new classes or collections.

That's what I wrote above

@ShravanDoda

This comment has been minimized.

Copy link
Contributor

ShravanDoda commented Mar 22, 2019

I guess I should've said server database instead of HydraDoc

@vddesai1871

This comment has been minimized.

Copy link
Member

vddesai1871 commented Mar 22, 2019

client should be able to push changes to server as well (given it has been authorized)

Client does this by standard HTTP methods. (through operations available/provided in HydraDoc).
We need push mechanism at server to propagate such individual changes to other clients connected to the server. (So data at every client remains synchronized with the server data).

@Mec-iS

This comment has been minimized.

Copy link
Contributor Author

Mec-iS commented Mar 23, 2019

Absolutely not, only source of truth for data shall be the server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.