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

Ammon
13-Dec-2008
[3548]
Hrm...  The script wasn't loading the image where I thought it was. 
The data was actually Binary!  not Image!  so I'll have to do some 
more digging...
Dockimbel
13-Dec-2008
[3549]
I saw such issue in Cheyenne a few times with an older REBOL version 
(2.5.xx) and it was caused by a REBOL GC bug. Never saw such behaviour 
since then.
Ammon
13-Dec-2008
[3550]
I'm using the encapped version...
Ammon
14-Dec-2008
[3551]
Heh...  A more effecient design goes a long way.  I've minimized 
requests to the server and dropped the memory usage by about 75%


Speaking of minimized requests...  Has anyone done any AJAX/JSON 
stuff with Cheyenne?
Graham
14-Dec-2008
[3552]
Yes
Ammon
14-Dec-2008
[3553]
Can you elaborate or point me to something somewhere that demonstrates 
how you did it?  I'm being lazy and I don't want to figure it out 
on my own. ;-)
Graham
14-Dec-2008
[3554x3]
Ask Terry ... he has he says.
I also installed the yahoo javascript libraries ... and they're using 
Ajax ... and it's all being served by cheyenne
Ajax is just javascript making an asyn http call
Ammon
14-Dec-2008
[3557]
I know what AJAX is.  ;-)  I've used it many times, I've just never 
set up the server side before.  I am planning on using the json.r 
script from the Library...  I'll just play with it and see what I 
come up with...
Ammon
15-Dec-2008
[3558]
Strange...  


I added some working JSON...  Somehow the .rsp file handling the 
JSON request is using functions that aren't including in the rsp 
file.  Is it supposed to do that?
Chris
15-Dec-2008
[3559]
Do you have an example?
Ammon
15-Dec-2008
[3560]
I have tag.r that has 

tag: context [add: does [something]]


I DO tag.r on most of my RSP pages but not on json.rsp yet I'm using 
TAG/ADD in json.rsp without problems.
Chris
15-Dec-2008
[3561]
Sounds like it is being set globally?
Ammon
15-Dec-2008
[3562]
tag is being set globally but I didn't expect includes to be persistent 
across different pages.
Dockimbel
15-Dec-2008
[3563x2]
Having your TAG word already defined is a side-effect of persistent 
RSP processes. You should *NEVER* rely on it, because your script 
can be executed within a different process where the word may not 
have been defined.
Btw, if your %tag.r script is required in most of your RSP scripts, 
just DO it once in 'on-session-start (in %app-init.r).
Maxim
15-Dec-2008
[3565]
btw, love the new website  :-)
Will
15-Dec-2008
[3566]
feature request: add on-global-page-start and on-global-page-end, 
same as on-page-start and on-page-end but executed for all rsp pages, 
not only for webapps
Dockimbel
15-Dec-2008
[3567x2]
Maxim: thanks, it still needs a lot of work to be completed : integration 
of a CureCode instance for bug tracking, writing lot of documentations,...
Will: I'll consider that for the next release.
BrianH
16-Dec-2008
[3569]
Has anyone written Atom or RSS output code in RSP? I am going to 
need to do so right away and every possible speedup helps.
Kaj
16-Dec-2008
[3570x2]
I remember an RSS output snippet. It's probably in the REBOL library
By Chris, if I'm not mistaken
Chris
16-Dec-2008
[3572]
http://www.rebol.org/view-script.r?script=emit-rss.r
Luis
17-Dec-2008
[3573]
http://www.ross-gill.com/page/Atom+in+a+Hurry
BrianH
17-Dec-2008
[3574]
Thank you both :)
Henrik
20-Dec-2008
[3575]
Graham, did you ever get to switch to slicehost or linode?
Maarten
20-Dec-2008
[3576x2]
I have slicehost. Highly recommended.
Fast, super simple. Not the cheapest, but you definetely get what 
you pay for (which is very good, in their case). They also have good 
docs and wikis - that's an example for many services!
Graham
30-Dec-2008
[3578]
What's the minimum you need to run Cheyenne?  the encapped binary 
and what else?
Dockimbel
30-Dec-2008
[3579]
A config file, but if you don't provide one, Cheyenne will create 
a default one in the same folder.
Graham
30-Dec-2008
[3580]
Thanks
Graham
31-Dec-2008
[3581x4]
This is interesting.   I'm launching cheyenne on startup each time 
my app starts.  But to see if it is already running, I check by opening 
a port.
p: open/direct tcp://127.0.0.1:8002 close p


but this causes Cheyenne ( latest encapped version ) to shut down!
I tested this with the above and a rebol console to reproduce it.
I guess I should check with read http://127.0.0.1:8002 instead, but 
that's slower.
but does it mean I can crash any Cheyenne server remotely at will?
Henrik
31-Dec-2008
[3585x3]
Graham, try mine and let's see what happens.
although I still am running an older version...
I have to go for a bit...
Graham
31-Dec-2008
[3588x3]
Oops .. changed this group to non web public ...shouldn't have posted 
this is a web public group
No, it's okay with yours.  I'm guessing it only crashes on localhost.
phew!
Will
31-Dec-2008
[3591]
Graham, do you have any custom services? no problem here with that 
code:
  p: open/direct tcp://127.0.0.1:80 close p  
  p: open/direct tcp://127.0.0.1:80 close p
  p: open/direct tcp://127.0.0.1:80 close p
  p: open/direct tcp://127.0.0.1:80 close p
  p: open/direct tcp://127.0.0.1:80 close p
  read http://127.0.0.1:80                        
;   {<html>
<head>
^-<title>Welcome!</title>
</head>
<body>
<img src="logo.png">
<center>
<h2>Congratulations, you are running Cheye...
Graham
31-Dec-2008
[3592]
this is just the Cheyenne binary ... nothing else, and running on 
8002
Will
31-Dec-2008
[3593]
hmmm, I'm running from source
Graham
31-Dec-2008
[3594x3]
>> p: open/direct tcp://localhost:8002 close p p: open/direct tcp://localhost:8002 
print "ok"
close p
** Access Error: Cannot connect to localhost
** Near: p: open/direct tcp://localhost:8002 print "ok"
>>
the ok does not print because Cheyenne has quit
this though is fine


>> p: open/direct tcp://localhost:8002 print "ok" close p p: open/direct 
tcp://localhost:8002
print "ok" close p
ok
ok

so timing appears critical
Henrik
31-Dec-2008
[3597]
Graham, I have to check my console, because I think mine auto-restarts 
on quit.