Comments (7)
Does the WebSocket protocol not already handle this with its protocol Ping/Pong frames?
from wamp-proto.
No. The semantics of WS Ping/Pongs require the payload to be returned verbatim. There is no "discard" and "request discard length". If i.e. it would be sufficient to keep up the radio state to only have 2kb/s downstream, then I don't wanna consume upstream bandwidth, but only do PINGs that request that amount via request_discard_length.
Also the payload is limited to 125 octets. I didnt yet do systematic investigation whether it makes a difference having 4kb/s in more smaller payloads, or fewer larger payloads.
Another issue: WS Pings are not required to reach the other peer (endpoint). Intermediaries might take a shortcut and do the Pong reply themselves. They are hop-by-hop ..
I dont think WS Ping/Pongs have been designed well enough, i.e. with mobile in mind ..
from wamp-proto.
Here is the test heartbeat proggy using WS Ping/Pongs I used.
https://github.com/oberstet/scratchbox/blob/master/python/heartbeat/client.py
Totally unscientific and lacking .. but it worked for me to keep the HSPA actually in "snappy state" all the time.
Would be very interesting in tests on your mobile network whatever .. tweak the
BEAT_SIZE = 100
BEATS_PER_SEC = 5
and see what happens to the RTTs.
And good implementation would adapt to the network:
โProbing network defined HSPA radio state promition and demotion timeouts.โ
and then tune BEAT_SIZE up/down and BEATS_PER_SEC dynamically ..
from wamp-proto.
Someone send me this very interesting study:
http://www.stevesouders.com/blog/2011/09/21/making-a-mobile-connection/
Main takeaway: there is a tradeoff between initial latency and power consumption.
Well, right. Thats obvious. But: the timeouts for radio state transitions seems to be chosen by carrier, and different.
There are 2 more points:
The author suggests that web app developers might do periodic fetches of some 1 pixel img. Nice idea, since then I can consume someones else server bandwidth;)
So why include PING/PONG in WAMP then?
Fetching imgs via HTTP only works for browser clients.
A comment points out a simple fact: when I am on power plugged, there is no reason to conserve the last mW! So in that situation, I basically always want the highest radio state. Carriers might view that differently of course .. they wanna downgrade radio so less resources are consumed on their side.
from wamp-proto.
This is in WAMPv2:
[HEARTBEAT, IncomingSeq|integer, OutgoingSeq|integer]
[HEARTBEAT, IncomingSeq|integer, OutgoingSeq|integer, Discard|string]
The heartbeat allows to notify the peer up to which incoming heartbeat all incoming WAMP messages have been processed, and announce an outgoing hearbeat sequence number in the same message.
It also allows to inject discarded payload for the radio channel thingy discussed above.
from wamp-proto.
part of AP
from wamp-proto.
not sure why this is still open, but keeping the network alive is a transport layer job
from wamp-proto.
Related Issues (20)
- Web site: Add stuff to "Users and Resources" section HOT 10
- Best practice for error answer? HOT 1
- Unspecified Behavior for Callee Leaving During CALL HOT 19
- Unclear behavior for caller leaving during CALL request HOT 7
- Propagation of frozen options in progressive call invocations HOT 6
- Error URI for expired progressive call race condition HOT 3
- Is `wamp.close.goodbye_and_out` deprecated in favor of `wamp.close.normal`? HOT 5
- `wamp.error.no_such_session` is not documented HOT 1
- `wamp.registration.match` matching algorithm is undefined HOT 3
- Should subscriptions to meta events fire the `wamp.subscription.on_subscribe` event? HOT 1
- Tolerating old CALL request IDs when progressive invocations are supported HOT 4
- Add Payload to Abort HOT 28
- Add `REGISTER.Options.forward_timeout` option HOT 2
- Broken Applet on wamp-proto.org
- Equivalent of 500 Internal Server Error in WAMP HOT 5
- Incorrect maximum raw socket limit HOT 1
- Error URI for Rate Limiting Purposes HOT 25
- Add AsyncAPI to comparison on web site
- Update spec contributors HOT 4
- What if session scope request id exceed maximum? HOT 21
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wamp-proto.