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

Janko
8-Jan-2010
[7353x2]
I just found out about a bug I was making and could only be discovered 
when cheyenne was first started, because some word was undefined 
then so it triggered an error, if I did some other things I couldn't 
see it but it would return wrong information in reality .. 


1. is there any way maybe that would make cheyenne "reset" each request 
(for debugging & testing purposes, not production) .. the -w option 
seems not to do this. 


this could probebly be solved by wrapping also those parts in functions 
... another question..


2. Is there any way I could see all globals I created so I could 
find wtich ones I "leaked" unintentionally .. 


it would be very helpfull if rebol could let you define functs that 
would warn you if you used or defined any global words
one solution is also that I define all words local to pageload in 
some object that is cleared on each pageload probably
Dockimbel
8-Jan-2010
[7355x2]
1) I use -w 0 daily, works ok here.
2) see the solution in Core group.
Btw, since 0.9.19, the RSP engine tries to catch all words defined 
in RSP scripts but outside of a local context in a hidden webapp 
context (one per worker process).
Janko
8-Jan-2010
[7357]
1) I tried -w before (I remembered you hinted me the last time to 
use it to always reload) but it didn't make the difference in this 
case (as far as I can tell).. does -w only work with source discributtions?
Dockimbel
8-Jan-2010
[7358]
It's : - w 0, -w only won't work, it expects the number of worker 
processes as argument.

It should work ok with both source and binary version. I'll make 
a test right know with 0.9.19 binary...
Janko
8-Jan-2010
[7359x2]
I tried cheyenne -vv -w 0   ; and now cheyenne - w 0 .. with same 
result
maybe I should better explain what I am doing so I won't steal your 
time here (and it's no problem basically as I will turn all global 
words that are only locally needed to something else) .. it's bad 
coding practica anyway
Dockimbel
8-Jan-2010
[7361x3]
0.9.19 binary works ok here in -w 0 debug mode.
Try testing with this script :

<%
either value? 'azerty [
	print "debug mode not working"
][
	print "debug mode is working ok"
	set 'azerty 1
]
%>
Hit F5 several times, it should always answer ok if Cheyenne is running 
with -w 0.
Terry
8-Jan-2010
[7364x2]
Doc, Im going to develop some rebol and flash apps that connect to 
Cheyenne via the websocket. What is the procedure for the handshaking?
I haven't heard a single sheep all day? 
No one is trying the demo :)
Dockimbel
8-Jan-2010
[7366]
Web socket protocol is fully described here : http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol


Quick protocol overview : http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol-68#section-1.2
Terry
8-Jan-2010
[7367x3]
Will try some experiments using Canvas and websockets.. here's some 
great examples

http://www.chromeexperiments.com/
Yeah, Doc.. was hoping for a condensed version seeing as you've done 
the whole learning curve.
This one is nice
http://www.chromeexperiments.com/detail/depth-of-field/
Gregg
8-Jan-2010
[7370]
Isn't that Doc's old v-balls demo? ;-)
Kaj
8-Jan-2010
[7371]
Thanks for the links, Terry. Busy bookmarking here
Terry
8-Jan-2010
[7372]
Another.. try shaking the browser

http://mrdoob.com/projects/chromeexperiments/ball_pool/
Gregg
8-Jan-2010
[7373]
Indeed. Thanks here too.
Terry
8-Jan-2010
[7374]
Now THIS is very cool use of CANVAS
http://www.universaloscillation.com/chrome/popups/
Kaj
8-Jan-2010
[7375]
Hm, those last two work fairly well on my ancient Firefox 1.5
Terry
8-Jan-2010
[7376]
Try it on Chrome.. much faster.
Terry
9-Jan-2010
[7377x5]
WS to AtomDB demo
http://shinyrockets.com/atom.html
Demo includes;
- websocket roundtrip timer
- ATOMDB query timer
- Example of changing a graphic when socket is closed.

- Font-face demo (another HTML 5 feature that allows ANY font in 
a webpage .. see the <style> on the page
Font used is DroidSans.. can download for free from -> http://www.fontsquirrel.com/fonts/Droid-Sans
Funny thing is, if your "ATOMDB Query time:" changes randomly? That 
means someone else is running the test, and their results are being 
broadcast to your browser.
HOW COOL IS THAT!
A couple lines of code and you could create a live chart displaying 
the various times folks are getting, including geo location etc
Janko
9-Jan-2010
[7382x2]
What woudl be the best way to do some casual source code protection 
of cheyenne webapp if you want to distributte it as a "download and 
install" option. I guess I could make some sort of code obfuscator 
that would change the names to something without meaning, is there 
anything better one could do?
I am usually for not complicating with this but this webapp is of 
classical competetive scene as will also still run as online service 
so I want to prevent that competitors could too easily study it , 
find any possible weaknessess etc...
Dockimbel
9-Jan-2010
[7384x2]
Janko: I have in my todo list a full virtual system to add to Cheyenne 
allowing embedding webapps in a encapped Cheyenne. It can be done 
by replacing every filesystem accessing functions (DO, LOAD, READ, 
WRITE,...) by custom ones getting files from memory. The hard part 
is to integrate such approach within Cheyenne preserving perfomances 
for normal filesystem accesses while avoiding redundant code, this 
needs time for designing and prototyping.


I can't see an easy way to protect you webapps right now, but maybe 
other might have found a way to do that?
Terry: interesting links, so we might get rid of flash soon, no?
Kaj
9-Jan-2010
[7386]
Unless we need Flash to get at web sockets from older browsers
Dockimbel
9-Jan-2010
[7387]
Can't older browsers use some JS layer simulating web sockets like 
js.io library?
Kaj
9-Jan-2010
[7388x2]
I hoped so at first, but it seems to be a different system
The only way I've heard of to do WebSocket in older browsers (almost 
all of them right now) is the Flash implementation
Janko
9-Jan-2010
[7390]
I think not, older brosers only have xmlhttp (ajax) option, iframes 
and other comet like tricks but they can't do a socket .. I haven't 
seen what js.io does.. if you wanted to make a "pure" html chat without 
comet or polling you made JS that talked to invisible 1px flash and 
flash has XMLSocket or something like that. But I heard recently 
that it can be used for other things than xml ..
Terry
9-Jan-2010
[7391x3]
Flash would be the best way to interface with older browsers via 
sockets. 
JQuery  <=> Flash <=> Cheyenne


Although it's not necessary, I only push Javascript back to the DOM 
manipulation. (Hence the need for a JS dialect.. specifically JQuery)
Doc, Flash's core strength (animation) is quickly evaporating.
Hmm, the last person to run the atom demo had a 6971.28.. second 
'round trip' .. wonder what happened there?
Terry
10-Jan-2010
[7394]
I think it's official.. Flash is dead.


I was modifying some flash xmlsocket based apps to work with Cheyenne 
websockets,  and then realized, why bother? I can do it all with 
HTML 5

HTML 5 has.. 
 
CANVAS AND VIDEO

http://www.youtube.com/watch?v=Kdf0x8am1cg&feature=player_embedded#
chroma key effect. 

http://www.youtube.com/watch?v=ZN_r9jxL0-A&feature=player_embedded

LOCAL STORAGE
Chrome has SQLite built in, accessible via JS
Pekr
10-Jan-2010
[7395]
Flash might move to RIA (but who's interested to do real apps in 
Flash?) or - many mp3 etc vendors are doing their UI using flash. 
As for html 5, we are still talking vapor, unless it is supported 
by most browsers, which are used by most ppl IE still has 62% of 
share, and IIRC CSS3 and HTML5 are going to be supported in IE9. 
How long do you think will it take to replace those 60% of IEs out 
there by IE9? Well ... I know what you are trying to say ... it is 
inevitable ... but ... not yet, not yet :-) .... this probably belongs 
to advocacy though ....
Dockimbel
10-Jan-2010
[7396x5]
Flash might move to RIA
 : it's already done, it's called "Flex".
who's interested to do real apps in Flash?
 http://www.adobe.com/products/flex/buzz/customers/list.html
ActionScript, which is Flex's programming language is now in #19 
in Tiobe's index.
Maybe Flash usage for sockets, animations, games and videos might 
start dropping soon, but as an application framework engine, its 
usage keeps raising.
rising
Terry
10-Jan-2010
[7401x2]
raisin
I used flash as an application framework for an engineering co once.. 
one of the biggest mistakes of my career.