World: r3wp
[!Cheyenne] Discussions about the Cheyenne Web Server
older newer | first last |
onetom 6-May-2011 [10251x2] | im chopping it down now |
did u get it? no immediate thoughts? | |
Dockimbel 6-May-2011 [10253x3] | I got it but was busy with other tasks. Will look into it in a few minutes. |
Error reproduced. Tested with similar code within RSP: <% ] %> is producing an error, but it is handled nicely. | |
onetom: fix pushed for the issue you have reported. Let me know if it works ok for you. | |
onetom 6-May-2011 [10256x6] | im getting different errors now, but trying to dig to its roots |
confirmed: my script works w r135 but not w r136 (this is a different script) | |
** Syntax Error : Missing [ at end-of-block ** Where: none ** Near: "(line 5) ]" thats all i get as an error msg | |
hmm... it's a .r file but it's in rsp format, so no rebol header but <% %> tags. so i guess it's the right behaviour | |
if i was calling the script .rsp and also bind-extern .rsp to the RSP handler then it worked too. is it something hardwired in cheyenne, if the extension is .r then is should be handled as a plain rebol script? | |
bugfix worked. thx | |
Dockimbel 6-May-2011 [10262] | s it something hardwired in cheyenne, if the extension is .r then is should be handled as a plain rebol script? Yes, .r scripts are processed as plain REBOL scripts but with the addition of the whole RSP API since r100 (http://code.google.com/p/cheyenne-server/source/detail?r=100). It has been officialy documented on the wiki only recently: http://cheyenne-server.org/wiki/Rsp/Basis ("No-template scripts" section). |
Kaj 6-May-2011 [10263] | Doc, did you get a chance to debug fast-rebol-cgi? |
onetom 6-May-2011 [10264x3] | my quesstion was rather: where and how is it hardwired that .r is executed in rsp context? is there an internal bind-extern RSP [ .r ] happening. do i need the rsp module for this alone or do i need that action module too? stuff like that. otherwise it feels pretty magical |
we have even experienced very strange behaviour with the unless value? 'some-func [ do %../lib/obj.r do %../lib/oid.r ] tactic. our to-object function defined in obj.r didnt have a value. we modified the script, did not restart cheyenne and it started working! | |
it was just happening with the binary version of cheyenne, iirc, so i dropped the case... | |
Dockimbel 6-May-2011 [10267x2] | Kaj: I thought it was fixed since r131: http://code.google.com/p/cheyenne-server/source/detail?r=131 |
AFAIR, mod-action is required for mod-rsp. bind-extern RSP .r is required to send .r scripts to the RSP handler in workers. | |
Kaj 6-May-2011 [10269x2] | See April 25 above. I used r135: |
It recognises the fast-rebol-cgi keyword in the globals now, but it doesn't seem to do anything. It seems to try to execute REBOL code as real CGI. It tries to use the shebang line and has permission problems with CGI files that it didn't have before | |
onetom 6-May-2011 [10271] | so, if there is no bind-extern RSP [ .r ] then where are the .r files get executed? within the main cheyenne process? |
Dockimbel 6-May-2011 [10272x3] | onetom: They should be just served as a static resource if the 'bind-extern directive is not used. |
Kaj: I'm looking into that issue right now. | |
Kaj: I've pushed a fix in r137 for fast-rebol-cgi. It was wrongly defined as a Globals section keyword instead of a Host section one. | |
Kaj 6-May-2011 [10275x2] | Ah, I was wondering about that |
So I have to define it for every applicable host? | |
Dockimbel 6-May-2011 [10277] | Yep. |
Kaj 6-May-2011 [10278x2] | Thanks, I'll try |
By the way, I still want to get rid of the loading of the REBOL CGI script on each request, even though I've minimised its size. It's a fallback script that now executes in the not-found handler. If I would change it from a fast-rebol-cgi script to an .r script, and put it in an ALIAS handler, would that preempt the loading of the script one each request? I'm not using the RSP interface, so the loading of that would be extra overhead. Would it still be faster than loading the small fast-rebol-cgi script? | |
Dockimbel 6-May-2011 [10280] | Hard question for past midnight, I think you've lost me after the first sentence. :-) |
Kaj 6-May-2011 [10281] | Oh, I thought I was the amateur. :-) Maybe a night sleep will enable you to answer it? |
Dockimbel 6-May-2011 [10282] | What are you calling the "not-found handler"? |
Kaj 6-May-2011 [10283] | 404 status |
Dockimbel 6-May-2011 [10284] | Ok. |
Kaj 6-May-2011 [10285x2] | Same way QM hooks into Cheyenne |
I mean, RSP templates are cached, right? So are the new .r files cached, too, instead of loaded on each request like CGI scripts? | |
Dockimbel 6-May-2011 [10287x2] | RSP templates: yes, .r files: I'm not sure, checking the code... |
.r: right, they are cached too when they are evaluated by the RSP handler. | |
Kaj 6-May-2011 [10289] | Cool, and refreshed when modified? |
Dockimbel 6-May-2011 [10290x2] | Sure. |
If I would change it from a fast-rebol-cgi script to an .r script I understand you want to use the RSP handler instead of the CGI handler? | |
Kaj 6-May-2011 [10292x2] | So do you think preparing the RSP interface for each request would still be faster than reading a small rebol-fast-cgi file every request? |
Yes, if that would be faster | |
Dockimbel 6-May-2011 [10294] | Hard to say, the RSP "preparation" overhead is much bigger than for CGI, but OTOH, the CGI script is not cached in memory... |
Kaj 6-May-2011 [10295] | I thought so. I'd have to do measurements to be sure |
Dockimbel 6-May-2011 [10296] | At least, not explicitly cached, but it will probably live in the system memory cache for disk files, so hard to say. |
Kaj 6-May-2011 [10297x3] | Thanks, that clears it up as far as we can get now |
It works. I'm now running the binary version of Cheyenne instead of the source version | |
That should mean I will now be able to use the 0MQ binding | |
onetom 7-May-2011 [10300] | hmm... i thought i can put my shared library code above the webapp root, but it seem to fail without any errors. what exactly is the purpose of the overwritten 'do function in the RSP handler? i don't quite get that depth/1 and arg/3 stuff |
older newer | first last |