World: r3wp
[!Cheyenne] Discussions about the Cheyenne Web Server
older newer | first last |
Maxim 14-Jul-2010 [8546] | ok, but client-side caching should mitigate this difference . |
BrianH 14-Jul-2010 [8547] | I expect that the rest of the speedup came from the fact that Ruby is much slower than optimized JS. Still, not having to use Ruby is its own reward :) |
Terry 14-Jul-2010 [8548x2] | Doc, just an update regarding using the browser on the websocket host box closing as soon as the websocket connects.. seems to be a Google Chrome issue.. Safari 5 is working fine |
scratch the word "using" in that last post. Post posting.. a great time to proofread ;) | |
Dockimbel 14-Jul-2010 [8550] | Terry, Chrome is working ok here with my ws applications, but I've noticed such issues while writing them, wasn't sure if it was caused by the browser or my code. |
Terry 14-Jul-2010 [8551x4] | To keep Cheyenne on the html5 leading edge, you may want to add a "server-sent events" service as well. |
http://dev.w3.org/html5/eventsource | |
uses a text/event-stream mime type | |
It's basically a one way websocket communication... server -> browser . Not sure what the real advantage would be, perhaps less overhead? | |
Dockimbel 14-Jul-2010 [8555] | Interesting...Do you know if current browsers supporting ws, implement the EventSource interface too? |
Terry 14-Jul-2010 [8556x6] | I believe Safari 5 does |
yeah | |
here's a nice little tool http://html5test.com | |
The latest Chrome does as well. | |
FF needs to step up to the plate | |
Section 9 "Connectionless push and other features" in the W3 doc is interesting. | |
Dockimbel 14-Jul-2010 [8562] | My Chrome 5.0.375.99 scores a "no" at Server-Sent Events :( |
Terry 15-Jul-2010 [8563x3] | There's a Chrome 6 |
http://www.chromium.org/getting-involved/dev-channel#TOC-Windows | |
If you haven't tried Safari lately, check out Safari 5.. not bad. | |
Graham 15-Jul-2010 [8566x2] | Never! |
Apple software installers try to get every apple product downloaded onto your pc ... | |
Terry 15-Jul-2010 [8568x2] | Don't they all? |
Another advantage of web apps :) At least you can block the ads. | |
Terry 16-Jul-2010 [8570] | Scrap that whole Safari plug.. thing is buggy with websockets. |
Endo 23-Jul-2010 [8571] | good site to test web sockets http://jwebsocket.org/index.htm |
Endo 26-Jul-2010 [8572x2] | I wrote a very simple ws client protocol, http://rebolforum.com/index.cgi?f=printtopic&topicnumber=47 |
I write the pick function to return none if an error occurs. whole the function is inside an attempt pick port 1 ;--> none first port ;--> still return error but "first port" actually same with "pick port 1", it calls "pick", how it returns error? | |
Graham 26-Jul-2010 [8574] | I can't read unformatted source code .. .but isn't your pick missing an integer parameter?s |
Endo 26-Jul-2010 [8575] | yes when I paste it to the forum, all formatting goes out.. in http protocol scheme, pick takes just one argument, port. |
Graham 26-Jul-2010 [8576x2] | Really?? |
Never noticed ... let me look | |
Endo 26-Jul-2010 [8578x2] | p: open ws://localhost/test pick p 1 ;if no data returns none first p ;if no data returns error (but it calls pick??) |
oops, sorry, there is no "pick" in http. it is in ftp. | |
Graham 26-Jul-2010 [8580] | heh .. I was looking and looking and trying to find new glasses ...! |
Endo 26-Jul-2010 [8581] | in pop scheme also, document says: "Read the Nth message from the POP port" but pick function takes just port as an argument. |
Graham 26-Jul-2010 [8582x2] | I think that's because the docs are wrong |
It only allows you to pick the first message ... so that's why it ignores the integer parameter | |
Endo 26-Jul-2010 [8584x2] | no, it works, and the pick function is (in pop) pick: func [ "Read the Nth message from the POP port" port ][ read-message port 1 ] |
oh yes. but it works in my ws scheme. | |
Graham 26-Jul-2010 [8586x2] | well, I don't have a pop account to test it now |
but the source there says to read the first message ... not the nth | |
Endo 26-Jul-2010 [8588x2] | I put my ws protocol here http://www.moldibi.com/download/ws.txt |
I confused because, first p simply calls pick, my pick function inside an attempt block, so it cannot return an error. but "first port" returns an error, if no data. its not a big deal. but spent some hours on it, then I saw that "pick port 1" returns none instead of error (as expected) So I don't know what is different between "first port" and "pick port 1" | |
Graham 26-Jul-2010 [8590] | I don't understand your question ... |
Endo 26-Jul-2010 [8591x2] | anyway, not a big problem. |
ws protocol works, run the chat server (see the post on the forum) p: open ws://localhost/chat insert p "hello" pick p 1 == "hello" insert p "/nick endo" pick p 1 == "server: you known as endo" | |
Graham 26-Jul-2010 [8593] | and pick p 1000000 is the same? |
Endo 26-Jul-2010 [8594] | I guess so :) |
Graham 26-Jul-2010 [8595] | some ports a pick is a bit meaningless |
older newer | first last |