synchronize two screens

Asked

Viewed 136 times

4

I am starting to develop a scheduling system in Rails and I have the following problem:

  1. Let’s say I have two open screens in my book:

    1.1 - First screen opens on doctor’s computer.

    1.2 - Second screen opens on the computer of the secretariat.

  2. When the secretary modifies something on the agenda screen, for example, changes the patient status from "confirmed" to "waiting room".

  3. Automatically the doctor screen should be updated.

    3.1 Must be updated without the doctor giving "F5" on the page.

    3.2 This update should be automatic.

    3.3 And only the patient status and not the entire screen should be updated on the doctor’s scheduling screen.

My doubt would be, what are the tools that I will need to do this? Can I do this with angulaJs and nodejs and Rails?

  • 2

    What you need is a two-way communication mechanism. Look for 'Websockets' or 'Pooling''.

  • Vote for Websockets @Onosendai :). Link to an angular module to use Websockets (https://github.com/wilk/ng-websocket) I just didn’t understand why to use 2 backend technologies

  • 1

    @Caputo can be one or the other, there’s no need for both. By 'two-way communication', I just meant that both the browser and the server are active (no one waits exclusively and passively for a message from the other.)

  • @Onosendai, I agreed with your suggestion ;) I only voted for the Websockets as a suggestion. The second part, where I questioned that I didn’t understand two back end technologies, is why the AP put Nodejs and Rubyonrails then questioned about the two backend technologies

  • Oh! Sorry @Caputo, lack of coffee here. =)

  • @Onosendai Disponha ;)

  • @Onosendai: is "Polling" and not "pooling"...

  • @Joséx. I think it’s really pooling: https://en.wikipedia.org/wiki/Pooling_(resource_management)

  • @Onosendai AJAX, Websockets, long Polling, server sent Events, Comet, all this is related...look at just a few links: http://stackoverflow.com/questions/10028770/in-what-situations-would-ajax-long-short-polling-be-preferred-over-html5-websock http://stackoverflow.com/questions/31715179/differences-between-websockets-and-long-polling-for-turn-based-game-server http://stackoverflow.com/questions/11077857/what-are-long-polling-websockets-server-sent-events-sse-and-comet http://dsheiko.com/weblog/websockets-vs-sse-vs-long-Polling/

Show 4 more comments

1 answer

-1

Browser other questions tagged

You are not signed in. Login or sign up in order to post.