oduwsdl / MemGator

A Memento Aggregator CLI and Server in Go
https://memgator.cs.odu.edu/api.html
MIT License
57 stars 11 forks source link

Provide a streaming Pub/Sub endpoint for statistics #44

Closed ibnesayeed closed 8 years ago

ibnesayeed commented 8 years ago

It will be nice to expose the CDXJ formatted profiling data on an endpoint to allow clients to subscribe to it and create visualizations from it.

machawk1 commented 8 years ago

:+1:

ibnesayeed commented 8 years ago

This, when implemented, will enable generation of live timeline plots of the service health and analytics (sample), visuals inspired by this and many more.

machawk1 commented 8 years ago

Is the intention for this to be the endpoint at port 80? I realize that the port number is arbitrary but it seems like the most intuitive choice for the user to test for an endpoint when deployed. On the contrary, it is probably the most likely to have a conflict, so echo'ing out the endpoint's address (+port) on launch would probably be better. If the user wishes to be reminded of all of the endpoints for the service, however, how do you imagine you will report this information?

ibnesayeed commented 8 years ago

This won't be a sub-service (hence no need for a separate port number), instead the stream will be available under a specific path endpoint such as /stats. There will be a boolean config flag to turn this on/off though.

As far as the advertisement of endpoints is concerned, when it is started in the server mode, it outputs available endpoint on the terminal. That same is also provided as payload when a GET request is made to the root of the service.

machawk1 commented 8 years ago

👍

Would also like to see a sample usage demo for the README/wiki.