Git Product home page Git Product logo

Comments (7)

cboden avatar cboden commented on June 19, 2024

Does the WebSocket protocol not already handle this with its protocol Ping/Pong frames?

from wamp-proto.

oberstet avatar oberstet commented on June 19, 2024

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.

oberstet avatar oberstet commented on June 19, 2024

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.

oberstet avatar oberstet commented on June 19, 2024

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.

oberstet avatar oberstet commented on June 19, 2024

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.

oberstet avatar oberstet commented on June 19, 2024

part of AP

from wamp-proto.

oberstet avatar oberstet commented on June 19, 2024

not sure why this is still open, but keeping the network alive is a transport layer job

from wamp-proto.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.