4
I am starting to develop a scheduling system in Rails and I have the following problem:
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.
When the secretary modifies something on the agenda screen, for example, changes the patient status from "confirmed" to "waiting room".
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?
What you need is a two-way communication mechanism. Look for 'Websockets' or 'Pooling''.
– OnoSendai
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
– Caputo
@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
@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
– Caputo
Oh! Sorry @Caputo, lack of coffee here. =)
– OnoSendai
@Onosendai Disponha ;)
– Caputo
@Onosendai: is "Polling" and not "pooling"...
– zentrunix
@Joséx. I think it’s really pooling: https://en.wikipedia.org/wiki/Pooling_(resource_management)
– OnoSendai
@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/
– zentrunix