vidi-insights / vidi-dashboard

A dashboard app
MIT License
13 stars 11 forks source link

Move to Tentacoli as client / server transport over Nes #123

Open mcdonnelldean opened 8 years ago

mcdonnelldean commented 8 years ago

Tentacoli now supports browser and will enable live and historic requests that are pattern matched. We will move to this over nes.

https://github.com/mcollina/tentacoli

Reasoning

Vidi works on a system of metrics. These metrics are requested like so, /group/metric and are generally very loose in what they return.

One of the features we require of a metric query layer is that it can return both live and historic data; streams make perfect sense for this. We also have the issue whereby different screens will look for the same data but in different shapes or contexts.

Tentacoli is a stream multiplexer that allows the above. You can essentially request / response to the server once per metric, and have it return a unique stream of data. Since each request can have multiple streams we can also batch a whole screens data to one call but still maintain individual response streams.

Nes can't do that :D

mcollina commented 8 years ago

Just to clarify everybody else, it's probably worth explaining why. Il giorno mer 10 feb 2016 alle 22:59 Dean McDonnell < notifications@github.com> ha scritto:

Tentacoli now supports browser and will enable live and historic requests that are pattern matched. We will move to this over nes.

https://github.com/mcollina/tentacoli

cc/ @mcollina https://github.com/mcollina

— Reply to this email directly or view it on GitHub https://github.com/vidi-insights/vidi-dashboard/issues/123.

mcdonnelldean commented 8 years ago

@mcollina Good point, I thought, because it is awesome would do :D

Will edit above.

mcdonnelldean commented 8 years ago

@mcollina Question on this, based on the first cut I wrote I need some way to Id a client. Is this something Tentacoli can do or am I best just sending a nid from the client in the request?

mcollina commented 8 years ago

Each request in Tentacoli gets a uuid. Should we look at ways to surface this? https://github.com/mcollina/tentacoli/blob/master/tentacoli.js#L238

mcdonnelldean commented 8 years ago

@mcollina I think I need per client. A client might have multiple subscriptions running.

mcollina commented 8 years ago

I think you will have to do it on top of tentacoli, as par of the websocket-stream/hapi/authentication stuff.

mcdonnelldean commented 8 years ago

@mcollina Agreed, I have to write a client-side wrap anyway to add context stuff so it makes sense to do it there

mcollina commented 8 years ago

I will put all of it in an hapi plugin, similar to nes.

mcdonnelldean commented 8 years ago

@mcollina Great idea, I will make this it's own issue on Tentacoli