Closed yatharthranjan closed 6 years ago
Right now the best solution is to check the time of the last entry in the MongoDb because the dashboard needs this as soon as possible. Later we can look into the monitors, which already have disconnection information, and use them to write this info into a kafka topic which can then be read by mongoDb connector to store this info in MongoDb and then the Rest api can read it from MongoDb.
Looks like so. I will close the other
Currently, we get the earliest and latest
time-stamps published from source-monitors
from radar-backend, which effectively gives the value for effectiveTimeFrame
for a source of a subject in a project.
We can use the effectiveTimeFrame.endDateTime
to determine whether a source is CONNECTED
or DISCONNECTED
or UNKNOWN
maybe ( if we don't have any input on timeStart
and timeEnd
).
But, what is under question is on what condition we determine whether a source is connected or not?
Some of my thoughts are
endDataTime
is before predefined timeout
e.g. (last 15 minutes/ 1 hours/ 1 day for example). source-type
to determine whether a source of that kind is DISCONNECTED
. (will require changes on MP and/or schemas)time-out
based on the least frequency of source-data assigned to a source-type. ( Would this make frequencies mandatory for each source-data)What do you think @yatharthranjan @blootsvoets ? Let's discuss it here, so the decisions remain logged for future reference.
The sources information returned by the Rest API should also contain whether a source is currently connected or disconnected. A source is considered connected if its currently streaming data. This information is essential for dashboard.