World: r3wp
[!Cheyenne] Discussions about the Cheyenne Web Server
older newer | first last |
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 [2987x3] | I think Cheyenne's webapps are protected by cookie authentication |
I need to access some images inside the webapp from a Rebol plugin. | |
I could store the images in the public directory ... but that's not secure. | |
Terry 9-Oct-2008 [2990] | You're using the plugin? Good luck |
Graham 9-Oct-2008 [2991] | trying ... trying ... trying ... |
Henrik 9-Oct-2008 [2992] | I'm not sure you can pass binaries from the DOM to the plugin, if that is what you are trying. |
Graham 9-Oct-2008 [2993] | nearly there! |
Terry 9-Oct-2008 [2994] | You need a proxy. |
Graham 9-Oct-2008 [2995] | why? |
Terry 9-Oct-2008 [2996x2] | Can a plugin manipulate the DOM of the page? |
REBOL/Plugin includes a function callable from REBOL scripts, do-browser, that allows you to execute and retrieve the result of browser script code. This script code may manipulate the browser's document object model (DOM), giving you the ability to interact with other elements in the HTML page. | |
Graham 9-Oct-2008 [2998] | so I could load the image as normal and then use the plugin to access the image? |
Terry 9-Oct-2008 [2999x2] | yeah |
well, you access some JS.. and it manips the image | |
Henrik 9-Oct-2008 [3001] | Yes, the plugin can manipulate the DOM. I still don't think you can load binaries into the plugin from the DOM |
Terry 9-Oct-2008 [3002] | you can message the plugin |
older newer | first last |