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
9-Jan-2010
[7378x4]
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.
Dockimbel
10-Jan-2010
[7403x5]
SVN r59 : experimental mod-upload released.  This new mod adds server-side 
API for querying realtime progress info on uploaded files. See the 
demo : http://localhost/upload.html(not commented yet).

Current restrictions:
- works only when posting one file at a time in a given <form>.

- can't make it work for IE (IE seems to have an issue with setTimeout( 
) method).
Help would be appreciated to solve or workaround the setTimeout() 
issue with IE.
If you're testing the upload demo locally, be sure to pick a file 
big enough (at least 10 Mbps). Don't worry about uploaded files, 
the target script (show.rsp) doesn't save them, so the server's copy 
will be deleted as soon as the upload is finished.
This mod-upload version is unsuitable for production yet, the upload 
tokens on server are not garbage-collected.
10 Mbps => 10MB
Terry
10-Jan-2010
[7408x2]
After updating the SVN, I get a 

 id: 'cannot-open
    arg1: "/c/websock2/Cheyenne/mods/mod-upload.r"

and the file is not there.
should have some default error trapping for socket-apps in the http.cfg 
file, no? One typo brings the whole server down.
Terry
11-Jan-2010
[7410x3]
Working on some websocket experiments.. 
http://shinyrockets.com/exper.html


- simple canvas game... Losing the game publishes the fail , ip and 
port to everybody.
I'm curious as to lag around the world (should add geocaching i suppose)
Doc, any thoughts on a standard protcol for sockets? xml?
Dockimbel
11-Jan-2010
[7413x7]
mod-upload: it was missing, it's in the repository now.
standard protocol for sockets : JSON.
take the reb-services dialecting approach and format it in JSON ;-)
Typos errors in config file should be caught, what kind of typo was 
that?
Btw, keep in mind that defining a "standard" protocol above web sockets 
goes against its primary purpose : provide a general purpose packet-oriented 
communication channel. It would be like defining a "standard" protocol 
above TCP.


For practical usage with JS clients, JSON data format is the way 
to go. Don't forget that the web socket implementation in Cheyenne 
is partial, only TEXT frames are supported currently. I could add 
the binary support also, but I don't have a need for that for now. 
If someone has a *real* need for that, let me know.
IE issue fixed with upload.html. It wasn't a settimeout( ) issue, 
it was a IE caching all the AJAX responses.
SVN r61

FEAT: added request/store function to help manage uploaded files 
(see %changelog.txt).
FIX: IE issue with upload.html (cache issue). Works ok in IE now.
DOC: upload API documented in %www/upload.html.
Terry
11-Jan-2010
[7420x5]
JSON was my first thought.. but I think I'll build a custom "data 
format" using triples to keep inline with the back end.. still thinking 
about it.
I guess the binary support would go hand in hand with your new upload 
script?
There's a blur with websockets.. traditional usage takes a form, 
serialize and send to the server as a associative array in the url.. 
With sockets, that's not necessary. 

Forms are becoming less relevant.. As individual fields can do their 
own thing.. 

<input type="text" onblur="ws.send(this.val());">
Even non-form elements can be used.. 

<p id="myparagraph"  onchange="ws.send(this.text);">
Lorem ipsum
</p>
BTW, the typo wasn't in the config file, but in my ws app,  If one 
app doesn't work, should the whole server come down?
Dockimbel
11-Jan-2010
[7425]
Binary support / upload: these are 2 different things. Uploading 
files (access to local filesystem) still requires FORM with multipart/form-data 
encoding.
Terry
11-Jan-2010
[7426x2]
Hmm, maybe not with WS?
Might even get away with partial file uploads, incrementals etc.