So, as a couple of you know I've been posting questions about Mutation Observers. After understand those, now comes the ultimate question - How real time should RTC be? To me Real Time means real time, i.e. as soon as it happens it's sent somewhere and acted upon almost instantly - network dependent. And the only other dependency should be execution time.
However, there's one problem with this; Consider the case, if I take mutation observers and say I have a web page with a canvas overlay that can be drawn on and I've filtered the mutation observer to listen for those changes. Now, ever time the cursor is moved, it logs an event with (x,y) + other element/style info.
If I decide I want to go down the route of RTC then the network will get clogged up with 100's of requests per session. OR do I debounce/rate limit the number of data transfer connections and therefore not really hold up to the true meaning of RTC ?
Is there a different angle I should be looking at this from?
Could I find a middle ground such as debounce for 50ms?
tl;dr Real time experience vs network useage, how do i choose? What are peoples thoughts and experiences with RTC?
The definition of "Real Time" is
This means RTC sends messages which have to arrive in a certain time-frame to be called real-time. As far as I know, the time limit for RTC is a soft limit, meaning there is no number of milliseconds.
If you want to do RTC, or any network communication at all, be careful with what you send, keep traffic to a minimum (especially when your users might be on mobile). Sending hundreds of requests is a bad idea. You could improve on that by using WebRTC or WebSockets, so you have a socket connection instead of lots of requests. Even then, sending over a lot of data will still be a lot of data. Only send what you really need! You do not have to enforce Mutation Observers. You really should select the best tool for the job! And then there still is the issue of what you send. You should always prefer small binary over text-based protocols when on the wire. You could use something like pson to achieve that.