that is a very good point! hmm, at a hunch, id guess that latency is probably approximately proportional to speed.
this is a testable proposition. either way, you'd need to wait more than a round trip to findout. interesting question, though. On Tue, Jul 31, 2012 at 6:52 AM, Mark Hahn <m...@hahnca.com> wrote: >> this should manifest it self in node as write() === false on your >> HttpResponse object, > > This won't work unless you are sending a big payload, bigger than the > buffer. How could you do that when the page first connects? I assume he > needs the info asap in order to tailor some behavior. > > > On Mon, Jul 30, 2012 at 1:30 AM, Dominic Tarr <dominic.t...@gmail.com> > wrote: >> >> no, you should be able to detect network speed, because tcp uses smart >> end points, and dumb relays. >> >> basically, if the network is "slow", packets will be dropped before >> they reach the other end, and have to be resent. this should manifest >> it self in node as write()=== false on your HttpResponse object, and a >> 'drain' event it is ready again. >> >> if you stop writing to a stream when it asks, then this should >> theoretically be something like the network speed. of course, you >> could have the client stream something back, too. >> >> here are two modules for measuring the throughput of streams, >> >> https://github.com/fent/node-streamspeed >> https://github.com/dominictarr/probe-stream >> >> keep in mind that it may not be accurate if you are piping to the >> network with a stream that doesn't respect pause. >> >> it's probably best to have the detector on the receiving end. >> >> On Mon, Jul 30, 2012 at 12:04 PM, Mark Hahn <m...@hahnca.com> wrote: >> > I assume you mean the network speed to a particular client on each >> > session. >> > The client side is almost always the limiting factor and will vary from >> > session to session. >> > >> > I would do it by measuring the page load time in javascript and then >> > sending >> > the test result to the server, maybe using ajax, and then saving this >> > info >> > in the server's session store for that particular client. The server >> > can >> > then adjust its behavior however it wants. >> > >> > On Sun, Jul 29, 2012 at 4:35 PM, jerome <jeromecoving...@gmail.com> >> > wrote: >> >> >> >> I guess my point is, if anybody has any information on the process of >> >> detecting network speeds, and adjusting behavior between the >> >> client/server >> >> in response, I'd be interested in exploring what's possible. >> >> >> >> -- >> >> Job Board: http://jobs.nodejs.org/ >> >> Posting guidelines: >> >> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines >> >> You received this message because you are subscribed to the Google >> >> Groups "nodejs" group. >> >> To post to this group, send email to nodejs@googlegroups.com >> >> To unsubscribe from this group, send email to >> >> nodejs+unsubscr...@googlegroups.com >> >> For more options, visit this group at >> >> http://groups.google.com/group/nodejs?hl=en?hl=en >> > >> > >> > -- >> > Job Board: http://jobs.nodejs.org/ >> > Posting guidelines: >> > https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines >> > You received this message because you are subscribed to the Google >> > Groups "nodejs" group. >> > To post to this group, send email to nodejs@googlegroups.com >> > To unsubscribe from this group, send email to >> > nodejs+unsubscr...@googlegroups.com >> > For more options, visit this group at >> > http://groups.google.com/group/nodejs?hl=en?hl=en >> >> -- >> Job Board: http://jobs.nodejs.org/ >> Posting guidelines: >> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines >> You received this message because you are subscribed to the Google >> Groups "nodejs" group. >> To post to this group, send email to nodejs@googlegroups.com >> To unsubscribe from this group, send email to >> nodejs+unsubscr...@googlegroups.com >> For more options, visit this group at >> http://groups.google.com/group/nodejs?hl=en?hl=en > > > -- > Job Board: http://jobs.nodejs.org/ > Posting guidelines: > https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines > You received this message because you are subscribed to the Google > Groups "nodejs" group. > To post to this group, send email to nodejs@googlegroups.com > To unsubscribe from this group, send email to > nodejs+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/nodejs?hl=en?hl=en -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en