i am working on an app which sends an rpc-request to a server. The requested value is printed out successfully. Now i don’t know how to realize the request so that if the value changes on the rpc-server, my meteor app shows the updated value. Any idea?
i am quite new to meteor and have no clue how to realize that. Some sort of realtime rpc stream or a loop?? any help is appreciated.
well the RPC-request i am sending is going to an extern server (non-meteor)… My issue is that the rpc.request() function is only called once when the meteor server starts up. What i need is that the meteor-server keeps requesting the rpc-data… because once the data on the rpc-server changes after my meteor-startup, my meteor application is not aware of the data-update (unless i manually initiate a new rpc-request)… but i want this to happen automatically…
The only way to make this work is long polling, set a 10 second interval which will poll for the data. Afterwards you can use meteors low level publish apis to turn it in to a pub/sub model.