r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[!Cheyenne] Discussions about the Cheyenne Web Server

Terry
15-Jan-2010
[7531x2]
Doc, have you looked at eventmachine for Ruby?
I have Cheyenne and EventMachine arguing with each other via sockets 
:)
Dockimbel
15-Jan-2010
[7533]
EventMachine: no, looks like yet another event-driven network engine.
Terry
15-Jan-2010
[7534x2]
It is.
but has threading
Graham
15-Jan-2010
[7536]
Any clues on running R3 for cgi ?
Dockimbel
16-Jan-2010
[7537]
R3 should work as CGI with Cheyenne as long as you provide a correct 
shebang line.
Graham
16-Jan-2010
[7538]
on windows?
Dockimbel
16-Jan-2010
[7539x2]
On all platforms where Cheyenne can run.
You can test with Perl's examples in %www/perl/.
Terry
17-Jan-2010
[7541x2]
Doc, this lastest ws:// demo I've been working on is so killer, that 
I'm going to send you $100 to put towards Cheyenne/ websocket development.

All you need is a donation box.... https://www.paypal.com/cgi-bin/webscr?cmd=p/xcl/rec/donate-intro-outside
Didn't know you could do this, but  Ogg Vorbis files can be stiched 
together using read/binary. (There's a hint :)
Will
17-Jan-2010
[7543]
Terry we are eager to see your new demo 8-)
Dockimbel
17-Jan-2010
[7544x4]
Terry: waouh, a brand new pair of shoes! Thanks! :-) I'll look at 
how to add that donation button on Cheyenne's web site.
SVN r62


FEAT: RSP scripts can now set response/buffer to a file! value allowing 
main process to transfer it optimally (see changelog.txt)

FEAT: worker tasks now have a more readable and cleaned-up command 
line.

FIX: fixed a bug with internal UniServe's DNS cache querying preventing 
'open-port from working in some cases.
This last fix was blocking sometimes the builtin MTA to connect to 
DNS or MX servers.
<last bug>
NickA
17-Jan-2010
[7548]
Graham,  I've used this code to obtain get/post data in Cheyenne:

REBOL [title: "sitebuilder" file: %sitebuilder.cgi]
print "content-type: text/html^/"
print [<HTML><HEAD><TITLE>"Sitebuilder"</TITLE></HEAD><BODY>]
either system/options/cgi/request-method = "POST" [
    submitted-bin: make string! input
] [
    submitted-bin: system/options/cgi/query-string
]
submitted: decode-cgi submitted-bin

That replaces this Apache CGI code:

#!./rebol276 -cs
REBOL []
print "content-type: text/html^/"
print [<HTML><HEAD><TITLE>"Sitebuilder"</TITLE></HEAD><BODY>]
read-cgi: func [/local data buffer][
    switch system/options/cgi/request-method [
        "POST" [
            data: make string! 1020
            buffer: make string! 16380

            while [positive? read-io system/ports/input buffer 16380][
                append data buffer
                clear buffer
            ]
        ]
        "GET" [data: system/options/cgi/query-string]
    ]
    data
]
submitted: decode-cgi submitted-bin: read-cgi

HTH :)
Graham
17-Jan-2010
[7549]
Nick .. I'm using R3alpha ..and initial testing showed I can't get 
the command line in r3alpha
Dockimbel
18-Jan-2010
[7550]
Donation buttons added to Cheyenne web site at bottom if some of 
you feel inclined to help me spend more time on this project. ;-)
Graham
18-Jan-2010
[7551x2]
I sent you enough money to buy the right shoe!
Someone else can pay for the left one :)
Carl
18-Jan-2010
[7553]
Graham... could be unicode problem.  R3 expects the args as unicode. 
See host-kit os/host-main.c  -- really simple.
Graham
18-Jan-2010
[7554]
Seems I should get the host-kit :)
Dockimbel
19-Jan-2010
[7555]
Graham: thank you, I'll go buy the right one today and hope that 
nobody else buy the left one before I get new donations. :-)
Graham
19-Jan-2010
[7556]
hehe
Terry
19-Jan-2010
[7557]
Ok.. there's a pair of shoes.. that's 1.5 . Just need one more person 
and you'll have 2 pairs.
Dockimbel
19-Jan-2010
[7558]
Carl: after testing, SUing Cheyenne to a non-root user works, but 
not for the helper processes that REBOL starts itself in its boot 
process (only for main process, other processes started with LAUNCH 
or CALL all get the proper user id). I'll make a documented report 
to BrianH.
Terry
19-Jan-2010
[7559]
Here's another teaser demo.. I think it's a first.  Broadcasting 
TTS to a page via  websocket.
http://shinyrockets.com/echo.html
Dockimbel
19-Jan-2010
[7560]
Terry: thanks! Looks like I will even get a pair of dancing shoes 
for saturday nights! :-)
Terry
19-Jan-2010
[7561]
hmm.. your chat an mine came through at the same time.. must be the 
queueing
Dockimbel
19-Jan-2010
[7562]
Echo has a nice voice, spelling is very good AFAICT.
Terry
19-Jan-2010
[7563]
Yeah, one of the better TTS. Ogg Vorbis 16bit
Dockimbel
19-Jan-2010
[7564x2]
Yep, got both at the same time too. Could the lag between the button 
click and the response be reduced? I guess that having all the voice 
processing done locally (using a REBOL app) could make it realtime?
How much data does it send to the client browser for, e.g. "hello 
word"?
Terry
19-Jan-2010
[7566]
The first message takes some time.. every repeat is quicker.
Dockimbel
19-Jan-2010
[7567x2]
Got your last message 3 times...looks like a cache or block needs 
to cleared.
to <be> cleared.
Terry
19-Jan-2010
[7569x2]
i clicked it 3 times in rapid sucession.
I have a forever loop that checks the processing of the TTS.. once 
it's ready, it pushes it.. That's where the lag comes from. But then 
the .ogg file is cached, and much faster.
Dockimbel
19-Jan-2010
[7571]
Oh, it was just a cheering up! :-)
Terry
19-Jan-2010
[7572x2]
Yeah :)
There is a faster method, but saving it for other stuff.
AdrianS
19-Jan-2010
[7574]
Terry, is the demo not really working right now? I don't seem to 
get anything back.
Terry
19-Jan-2010
[7575]
Should be working.. it's alpha though
Dockimbel
19-Jan-2010
[7576]
AdrianS: are you using Chrome 4?
AdrianS
19-Jan-2010
[7577x4]
yes - I did manage to get a response once
after quite a long time
but it doesn't seem to work anymore
wow, I got a response after more than 4 minutes - is that the lag 
mentioned above?