World: r3wp
[!Cheyenne] Discussions about the Cheyenne Web Server
older newer | first last |
Kaj 1-Sep-2008 [2747x2] | The problem was finding out that this was a problem, amidst all the other problems |
And besides, REBOL has dos2unix built-in :-) | |
Will 2-Sep-2008 [2749] | Robert: here is actual memory consumption after running for 157 days: ID Process Name User CPU RSIZE VSIZE 11591 rebol root 0.00 52.65 MB 75.64 MB 11592 rebol root 0.00 152.00 KB 27.72 MB 11593 rebol root 0.00 14.05 MB 39.41 MB 11594 rebol root 0.00 9.93 MB 30.80 MB 11595 rebol root 0.00 29.84 MB 52.00 MB 11596 rebol root 0.00 10.46 MB 30.84 MB 11597 rebol root 0.00 10.92 MB 30.33 MB 11598 rebol root 0.00 200.00 KB 27.72 MB 11599 rebol root 0.00 168.00 KB 27.72 MB 11600 rebol root 0.00 168.00 KB 27.72 MB 11601 rebol root 0.00 160.00 KB 27.72 MB 11602 rebol root 0.00 204.00 KB 27.72 MB 12464 rebol root 0.00 9.55 MB 30.74 MB 12465 rebol root 0.00 9.35 MB 30.29 MB 12466 rebol root 0.00 160.00 KB 27.72 MB 12467 rebol root 0.00 160.00 KB 27.72 MB 12513 sshd root 0.00 1.34 MB 29.89 MB 15246 rebol root 0.00 4.63 MB 29.34 MB 15247 rebol root 0.00 160.00 KB 27.72 MB 27117 rebol root 0.00 8.17 MB 30.45 MB 27118 rebol root 0.00 168.00 KB 27.72 MB |
Graham 2-Sep-2008 [2750] | always read and write in Rebol a foreign script. Sometimes you also need to pass it thru detab. |
Will 2-Sep-2008 [2751x2] | some comments: - the 52.65MB process is a memcache like uniserve service that has thousand of pages and partial data cached - every task-handler process (those that process rsp) have i18n module that caches data in memory |
ok I've just restarted and here is memory consumption for you to compare: ID Process Name User CPU RSIZE VSIZE 18455 rebol root 0.00 6.74 MB 30.32 MB 18456 rebol root 0.00 156.00 KB 27.72 MB 18457 rebol root 0.00 9.19 MB 30.58 MB 18458 rebol root 0.00 4.63 MB 29.34 MB 18459 rebol root 0.00 4.63 MB 29.34 MB 18460 rebol root 0.00 4.63 MB 29.34 MB 18461 rebol root 0.00 4.63 MB 29.34 MB 18462 rebol root 0.00 168.00 KB 27.72 MB 18463 rebol root 0.00 160.00 KB 27.72 MB 18464 rebol root 0.00 164.00 KB 27.72 MB 18465 rebol root 0.00 160.00 KB 27.72 MB 18466 rebol root 0.00 160.00 KB 27.72 MB | |
Robert 3-Sep-2008 [2753] | Wil, thanks. Looks very promising. |
Kaj 3-Sep-2008 [2754x2] | Graham, it's not always possible. In this case, I have REBOL scripts in AltME for remote update and collaboration, that are started by external launchers or the command line |
If someone edits a script on Windows, when it messes with the first line, it won't start any more on Linux | |
BrianH 3-Sep-2008 [2756x3] | Doc, where does Cheyenne get the location "C:\Documents and Settings\All Users\Application Data\Cheyenne" from? Is it hard-coded or do you retrieve it from the registry like Windows does? |
The registry key is "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders", the value is "Common AppData". | |
If you take your setting from there, Cheyenne will be compatible with Vista, Server 2008, and weird setups without change. | |
Gregg 3-Sep-2008 [2759] | I think you can also use the SHGetFolderPath API. |
BrianH 3-Sep-2008 [2760] | Yeah, that is the Windows API that retrieves the values from that area of the registry. You will need to determine which is easier: Using the built-in registry APIs or creating a routine! wrapper for SHGetFolderPath. |
Dockimbel 3-Sep-2008 [2761] | Cheyenne uses SHGetFolderPath( ) API. |
BrianH 3-Sep-2008 [2762] | Cool :) |
Dockimbel 3-Sep-2008 [2763x2] | I think that the API approach is more reliable across Windows versions and flavors. |
Robert: you can use get the wrapper for this API function in Cheyenne/misc/win32.r. | |
Graham 23-Sep-2008 [2765] | Doc, what's the appropriate way to process http methods ... such as delete, put, options, get, post ... if one wishes to write an API based upon these? |
BrianH 23-Sep-2008 [2766] | REST for Cheyenne! |
Graham 23-Sep-2008 [2767] | probably past his bed time now .... |
BrianH 23-Sep-2008 [2768] | He'll read later, and in the meanwhile you can read the Cheyenne docs, samples and source. |
Graham 23-Sep-2008 [2769x3] | I've only ever used RSP with Cheyenne. |
though I did build a smtp server using Uniserve once .... | |
Prior to today, the only thing I knew about REST was that it existed. Now, ... I'm thinking that it might just be the way to go to provide web services for non REBOL clients. | |
BrianH 23-Sep-2008 [2772] | The trick is that many HTTP clients only support GET and POST. |
Graham 23-Sep-2008 [2773x2] | which is why I was hacking the http protocol recently to add the others |
Presumably javascript supports all http verbs? | |
BrianH 23-Sep-2008 [2775x2] | I wouldn't presume that - test first. |
Or look it up. | |
Graham 23-Sep-2008 [2777] | is this the way to support all clients ? from cellphones, to pdas and then full featured client browsers |
shadwolf 23-Sep-2008 [2778] | well i only used get and post so i can't tell the others options |
BrianH 23-Sep-2008 [2779x4] | If you only use get and post, you can't do REST - it requires the others. |
Handheld devices may be another matter. Many of them have poor JavaScript support, and most don't support XMLHTTP. | |
Those might require old school HTML get/post interfaces. | |
Which can also be implemented as Cheyenne proxies to your same LNS service. | |
Graham 23-Sep-2008 [2783x2] | how would one use cheyenne to load/balancing redistributing the resources |
Cheyenne docs look a bit sparse ... the wiki sections are all looking for an author except for RSP. http://cheyenne-server.org/wiki/Main/HomePage | |
Dockimbel 24-Sep-2008 [2785x2] | Docs: I put the wiki online mainly because several peoples asked me for one so they can contribute by documenting Cheyenne... |
REST: The starting point is to authorize all HTTP methods by adding them in mod-static/method-support callback. Then, if Cheyenne doesn't choke on them (should be treated by default as a GET, but untested), you can write a dispatching RSP page that will basically do a : switch request/method [GET [...] POST [...] DELETE [...] ...]. The upcoming v0.9.19 release will bring a URL aliasing feature that will allow nicer and more RESTful URL. | |
Graham 24-Sep-2008 [2787] | so people asked for a wiki and then don't contribute? |
Dockimbel 24-Sep-2008 [2788] | Load balancing: if you're using RSP, you got it for free as each RSP is executed in its own separated process. |
Graham 24-Sep-2008 [2789x2] | I think Brian was talking about using Cheyenne to do load/balancing for another application |
as a proxy | |
Dockimbel 24-Sep-2008 [2791] | maybe the one that asked are now too busy...anyway, the wiki was a good testbed for enhanced PHP support in Cheyenne. |
Graham 24-Sep-2008 [2792] | method-support: func [req][ if not find [HEAD GET POST PUT] req/in/method [ req/out/code: 405 return true ] none ] |
Dockimbel 24-Sep-2008 [2793] | Proxy: it can be done but requires a little more work, like building your own mod-something and implementing an async client protocol in Uniserve (unless you want to use the built-in HTTP async client protocol). |
Graham 24-Sep-2008 [2794] | missing DELETE, OPTIONS, and FOO |
Dockimbel 24-Sep-2008 [2795] | just extend the method block list with whatever method you need |
Graham 24-Sep-2008 [2796] | so, how would one determine if it's a REST request or just a ordinary other request? |
older newer | first last |