World: r3wp
[!Cheyenne] Discussions about the Cheyenne Web Server
older newer | first last |
Dockimbel 5-Oct-2008 [2939] | I've released it as beta and posted the download link here, so main Cheyenne's users already have it. |
Terry 7-Oct-2008 [2940] | Nenad, if I run Cheyenne, then do something like this... (on a newer XP box) a: 1000 while [a > 0][read http://mydomain.com/a: a - 1] It blazes along fine.. but gets about half way.. then just stalls.. waiting.. then further results will just trickle in.. stall.. a few more .. etc Why? Memory and CPU are hardly touched? |
Oldes 7-Oct-2008 [2941x3] | some security limiter of XP to prevent DoS attacks? |
check your system event log | |
http://www.mydigitallife.info/2005/11/15/windows-xp-sp2-tcp-connection-limit-event-id-4226/ | |
Terry 7-Oct-2008 [2944x2] | I was thinking it may be the ISP throttling to prevent DoS ? |
but it's from the same box. | |
Dockimbel 7-Oct-2008 [2946] | It's not a concurrency issue, READ is blocking, so just one connection at a time. I run the same test here (XP-SP3) several times, no problem. AFAIR, the same test was running just fine on SP2. |
Terry 7-Oct-2008 [2947x2] | why would my READ block, and not yours? |
Would it be an embed issue? | |
Dockimbel 7-Oct-2008 [2949x2] | Cheyenne has an async kernel. |
Are you running your test in the same process as Cheyenne ? | |
Terry 7-Oct-2008 [2951] | no |
Dockimbel 7-Oct-2008 [2952] | R2 port behaviour is blocking by default. |
Terry 7-Oct-2008 [2953] | ahh.. so you didn't test with R2? |
Dockimbel 7-Oct-2008 [2954] | I've tested with Uniserve to achieve concurrency and with Apache's ab testing tool. |
Terry 7-Oct-2008 [2955] | I didn't see it as a big issue.. served up 500 pages in a few seconds.. just wondering why? |
Dockimbel 7-Oct-2008 [2956] | Check your OS's TCP parameters. |
Terry 7-Oct-2008 [2957] | I built a little Memcached system if you're interested. |
Dockimbel 7-Oct-2008 [2958] | What are the features of your memcached system ? |
Terry 7-Oct-2008 [2959x4] | It's a cache (block!)of key/value pairs.. the query is turned into a checksum, and compared against cache, if it matches, and the expiry hasn't expired, it returns the value rather than calling the DB. If the key isn't found, or has expired, then it pulls the query from the DB, and stores it in the cache. The cache is stored in memory.. so blazing |
I've set it up to use my AtomDB.. but could be quickly tweaked for SQL | |
The checksum is the key key: checksum trim thequery | |
Another feature, if the cache is hit, then the key, value and expiry is cut, and inserted into the front of the cache.. making the most popular queries at the very beginning of the block. The less used queries will eventually pop off the tail as new queries are added. Although I haven't finished that last bit yet. | |
Dockimbel 7-Oct-2008 [2963x3] | I already use such memcache system in Cheyenne's RSP engine (but duplicated in each RSP process). Using a single server would reduce the memory usage but I would loose RSP's DB connection pooling and parallel queries advantages. |
My memcache is slective, it only caches the queries declared by user, not all queries. The MySQL backend that I use already does a good job at general query caching. | |
selective | |
Terry 7-Oct-2008 [2966x2] | Im using this one a little differently .. I have a central repository of code that runs the framework. When you fire up a copy of the framework, it pulls only the pieces it requires to run from the repository, and loads into memory. So it automates any code updates, gives a massive performance boost as it's in ram, and provided terabytes of reusable code, images, js, css etc. |
Another local ram-based AtomDB handles user specific data.. and this is saved in a rather unique flat file system. | |
Graham 7-Oct-2008 [2968x4] | This is more of a general html question, but since I'm using RSP, I'l ask it here. |
I want to be able to edit my rsp pages remotely, and I've got this file here called edit.rsp | |
<html> <title> Editor </title> <body> <% filename: to-file request/content/filename if (suffix? filename) <> %.rsp [ quit ] ; if filename = %edit.rsp [ quit ] either source: select request/content 'source [ ; a http post, so save it write filename dehex source ][ source: read filename ] val-tag: rejoin [ {<input type="hidden" value="} form filename {" name="filename">} ] replace/all source "<" "<" replace/all source ">" ">" print rejoin [ <form method="POST" action="/hylafax/edit.rsp"> <input type="submit" value="Save"> <hr> <textarea rows="40" cols="140" name="source" > source </textarea> val-tag <p/> <input type="submit" value="Save"> ] include-file %footer.inc %> | |
Problem is, if I edit edit.rsp using edit.rsp, then my entities get changes to their equivalents So, this line replace/all source "<" "<" gets changed to replace/all source "<" "<" No matter .. just figured it out! replace/all source "<" join "&" "lt;" | |
Chris 7-Oct-2008 [2972] | Shouldn't you also escape ampersands? |
Nicolas 7-Oct-2008 [2973] | Hi, I'm new to cheyenne. I've tried http://localhost/and I get the message It works!. But I can't view my site. How can I ? Any tips? |
Henrik 7-Oct-2008 [2974] | Where do you store your site? |
Graham 7-Oct-2008 [2975] | I tried escaping ampersands and that got really wierd. |
BrianH 7-Oct-2008 [2976] | In the case above you are using ampersands properly. |
Graham 8-Oct-2008 [2977x2] | Are RSP errors logged as well? Or just to the web page? |
Trying to debug other people's RSP errors where the client doesn't record them :( | |
Dockimbel 8-Oct-2008 [2979x3] | Look in latest v0.9.19. By default, RSP errors are catched and logged in a %rsp-errors.log file in Cheyenne's home directory. It works well for RSP webapps, but not really tested yet for standalone RSP scripts (there might be some bug/issue in that case). |
See the changelog file. | |
Production vs Debug mode. In Production mode, when an RSP error occurs, Cheyenne displays a general error page (or a custom one if defined in config file) and logs the error on server. | |
Graham 8-Oct-2008 [2982x2] | this was a standalone rsp page. |
and tehre is no %rsp-errors.log file in the %Cheyenne directory. | |
Will 8-Oct-2008 [2984] | I have errors mailed to me and a code 204 returning to the client 8-) |
Graham 9-Oct-2008 [2985] | Is there a chance to use basic authentication instead of using cookies to access pages inside the webapp? |
Terry 9-Oct-2008 [2986] | you would need to pass some kind of identifier with each REST.. the web is stateless |
Graham 9-Oct-2008 [2987x2] | I think Cheyenne's webapps are protected by cookie authentication |
I need to access some images inside the webapp from a Rebol plugin. | |
older newer | first last |