I have a system organized in microservices: we can simplify the structure with backend server, frontend server and client. Data are quite limited (hundreds of redis keys) and each client can recevie them filtered in different ways (for these filters I think I will use socket.io namespaces or rooms).

  • the backend produces data and publishes them on Redis
  • the frontend receives Key Space Notification for data and publishes the whole data on a websocket
  • the client visualizes these data.

Now my problem is that backend produces data for next 4 hours, but the client is required to show only next 1 hour. Obviously I cannot modify backend rate.

How could I narrow the time window of the data for the client but be sure that eventually, all data will be published towards clients? The only idea I have is to use some kind of timer, but I would like to know if someone has already experienced this.

  • In the second bullet, is the notification publised or is the full data published on the websocket? How much data are we talking about? Different data for each client or same data shared with all? These things might help you get a better answer. – joshp Sep 3 '20 at 18:44
  • thanks, I edited the question. – Marco Stramezzi Sep 4 '20 at 6:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.