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

Real time resources for agencies #26

Closed

Conversation

DylanVanAssche
Copy link
Contributor

@DylanVanAssche DylanVanAssche commented Feb 23, 2019

This PR adds the :agency/events resource to the Linked Connections Server.
If a client connects to the resource, the server will check if the client is:

  • A SSE client: add it to the listeners and pushes all the missing information since the last time the client synced with server. By watching the files directory of the events storage (generated by the EventsManager), the clients receive pushes from the server.
  • A HTTP client: serves the events page related to the last time the client synced with the server. The client can follow the hydra:next properties to get the next page of events to get in sync with the server. The lastSyncTime is used to lookup the required page and add the hydra metadata to it.

Besides this resource, this PR also adds the possibility to cancel a complete trip based on its tripURI. If you supply a startingConnection the trip can be cancelled from that connection until the end. If you don't supply this argument to cancelTrip(tripURI, agency, dataset, startingConnection=null), the whole trip will be cancelled from the beginning until the end.

TO DO list finished:

  • Binary search to lookup the events pages.
  • Ignore big sync requests, the client can asks to sync with the server with a time range of almost infinity. This might lock up the server when too many clients are doing this.
  • Fix the skeleton of SSE, we don't need any hydra metadata in there.

@DylanVanAssche
Copy link
Contributor Author

@julianrojas87 I think I have fixed your last remarks, review?

@julianrojas87
Copy link
Collaborator

Given the last updates made to the code base, I will manually extract the contributions made on this PR and adapt them accordingly

@DylanVanAssche
Copy link
Contributor Author

Given the last updates made to the code base, I will manually extract the contributions made on this PR and adapt them accordingly

Fine for me!

@pietercolpaert
Copy link
Member

Small update on this one: we are thinking more thoroughly about the hypermedia design, and including a possibility for a new Linked Data Event Streams resource on top of the existing collections

@DylanVanAssche
Copy link
Contributor Author

@pietercolpaert Linked Data Event Streams would make a nice fit here I think 👍

@pietercolpaert
Copy link
Member

pietercolpaert commented Jul 26, 2021

@DylanVanAssche While this pull request and the work behind your master thesis was instrumental to get to the LC2.0 specification, I think we will close this pull request in favour of #79, in which we implement a full-history polling interface for the connections with hypermedia descriptions that follow the LDES/TREE specifications. Would you be available to review the code they have so far?

@DylanVanAssche
Copy link
Contributor Author

@DylanVanAssche While this pull request and the work behind your master thesis was instrumental to get to the LC2.0 specification, I think we will close this pull request in favour of #26, in which we implement a full-history polling interface for the connections with hypermedia descriptions that follow the LDES/TREE specifications. Would you be available to review the code they have so far?

Sure! I think you mean #79 ? right?

@pietercolpaert
Copy link
Member

Yes! Edited ↑

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

Successfully merging this pull request may close these issues.

None yet

3 participants