World: r3wp
[!Cheyenne] Discussions about the Cheyenne Web Server
older newer | first last |
Dockimbel 9-Jul-2010 [8462x2] | I could do some hotfix to CureCode too if required |
but no evolution (for now at least) | |
Graham 9-Jul-2010 [8464] | There was a wish to add a documentation type to curecode |
Dockimbel 9-Jul-2010 [8465] | ah, that could be added easily, I'll try to scan the CC channel here to see look for easy changes this weekend. |
Graham 9-Jul-2010 [8466] | Just to allow users to add examples of how to use functions etc .. since many people do not have access to the various "wiki"s |
Terry 10-Jul-2010 [8467x4] | Doc, the websocket problem discussed earlier seems related to this.. http://code.google.com/p/chromium/issues/detail?id=28453 |
things work fine as long as i use a domain name, but as soon as I go localhost:81 or 127.0.0.1:81, it goes south. | |
It also seems ok if using default port 80.. | |
hmm, now its working fine everyway.. feel free to completely ignore my previous noise, and I'll just pretend it was all a bad dream | |
Endo 10-Jul-2010 [8471] | is there a ws:// protocol implementation for R2? How do I connect to a server and use websocket without a browser? |
Graham 10-Jul-2010 [8472] | There isn't. |
Endo 10-Jul-2010 [8473] | any plan? or is it difficult do you think? |
Graham 10-Jul-2010 [8474] | http://www.whatwg.org/specs/web-socket-protocol/ Doesn't look very difficult .. if you need it, start a bounty for it |
Endo 10-Jul-2010 [8475] | thanks, I'll try. |
Graham 10-Jul-2010 [8476x2] | I had a quick look at the first few pages and it seems to use framing, with only one frame type defined at present. |
Now Ladislav is the master here having written the beer protocol which multiplexes different frames over tcp .. so I'm sure he could do this if there are any difficulties. | |
Endo 10-Jul-2010 [8478] | Thank you. One last question, is the latest binary version of Cheyenne support web sockets? or it is the svn version which supports it? |
Graham 10-Jul-2010 [8479] | Dunno .. never used web sockets ... Doc?? |
Graham 11-Jul-2010 [8480] | What uses are people finding for web sockets? |
Endo 11-Jul-2010 [8481] | Do you mean people use it for what? |
Graham 11-Jul-2010 [8482x5] | Yes .. |
I presume that a web socket "function" will block all of Cheyenne until it is completed. | |
Unless there's a way of handing off to one of the spare cheyenne processes | |
I presume Terry is using web sockets to communicate to cheyenne instead of using rsp or cgi | |
and cheyenne is an embedded web server | |
Endo 11-Jul-2010 [8487x4] | well, I'm planning to make an turn based online game, but not inside a browser, client will be a separate rebol application. it will be connected to a web socket, and player did somthing it will be sent to all other players |
I can use cgi aswell but there is no way to detect if a player disconnected. | |
But yes it blocks the whole Cheyenne process so it should be a very small and fast function. | |
Btw, I guess the latest svn version of Cheyenne supports web sockets as in changelog.txt which is 0.9.20. The latest binary version on web site does not, V0.9.19. | |
Kaj 11-Jul-2010 [8491] | How do you know it blocks? Doc explained it doesn't |
Endo 11-Jul-2010 [8492] | it says in Cheyenne documents? |
Graham 11-Jul-2010 [8493x3] | the docs say it blocks |
See http://code.google.com/p/cheyenne-server/source/browse/trunk/Cheyenne/www/ws-apps/ws-test-app.r | |
As this is running in main process, when ;-- any handler runs, it will block the server, so, you have to keep your code ;-- very efficient, it should run in between 1ms and 10ms if you want your Cheyenne ;-- server be able to scale to hundreds of concurrent clients. That's the cost to ;-- pay for not having multi-threading...Anyway, you can use the 'do-task function ;-- to run longer code without blocking. | |
Dockimbel 11-Jul-2010 [8496x3] | Websocket server code can be run from two places: either in Cheyenne main process (allows accessing all clients ports and detecting ports open/close events) or in RSP scripts (using 'do-task function from a websocket app) when the job takes too much time (like accessing a database). |
Terry: tested Sensha (Extjs re-branded), looks good but way too slow even on a Android with latest hardware (1Ghz CPU)...too bad. | |
I guess it's only good for desktops with a touch screen, not for mobile devices. | |
Graham 11-Jul-2010 [8499] | So, we could use this to send email instead of RSP script? Just have to upload attachements base 64 encoded still I guess as it is still a text protocol |
Dockimbel 11-Jul-2010 [8500] | Graham: I don't see the relation between websockets and sending emails...what problem are your trying to solve? |
Graham 11-Jul-2010 [8501x3] | I use Cheyenne to send email ... via Rsp |
Sounds like I can forgo the sendmail.rsp script which a user might damage and just use a web socket instead | |
Or am I not understanding this correctly | |
Dockimbel 11-Jul-2010 [8504] | Graham: websocket is just an evolution of the HTTP protocol, it's not TCP, you can't contact a SMTP server from a browser directly if this is what you have in mind. |
Henrik 11-Jul-2010 [8505] | AFAIK, websockets is for replacing AJAX. |
Dockimbel 11-Jul-2010 [8506] | AJAX will remain in use I guess, having a permanent connection is not always required and makes servers less scalable. Websockets will mainly replace all COMET tricks for server-side events. |
Graham 11-Jul-2010 [8507] | Doc, you have a mail server inside Cheyenne .. .that's what I want to use. |
Dockimbel 11-Jul-2010 [8508] | Graham: I don't see any advantages in using websockets rather than classic requests then? Btw, you can't upload files from a browser using websockets AFAIK. |
Graham 11-Jul-2010 [8509x3] | Doc, I have a Rebol app .. that uses Cheyenne as an helper app ... so I would be using it from my Rebol app ... |
I would just have to use an ws:// protocol ... yet to be written | |
The possibly advantage is that I don't need an rsp script on the user's drive that might get damaged or deleted .. | |
older newer | first last |