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

Kaj
9-May-2011
[10501x12]
/resources/
/resources/Cheyenne/
/resources/UniServe/
Structure of a package:
programs/cheyenne for the binary version
framework/libraries/ for support programs
data/ for other support files
Structure in the system:
etc/httpd.cfg Ugly legacy Unix name, and currently impossible. Would 
like Cheyenne to use any location and name
/var/log/ Ugly legacy Unix name, but standard place for logs. Currently 
only possible by starting Cheyenne source version from /var/. Impossible 
with binary version
/users/Kaj/tryrebol.esperconsultancy.nl/ Sites can be anywhere
Software conforming to general open source and GNU conventions has, 
often standardised, options to appoint all these locations, at build 
time or at run time
Dockimbel
9-May-2011
[10513]
Thanks for the detailed review. I think I will need to work on an 
abstraction layer for files location in all possible cases: sources/binary 
x platforms.
Kaj
9-May-2011
[10514x2]
I'd hope it would be quite simple, but I don't how the encapper works
don't know
Dockimbel
9-May-2011
[10516]
It is absolutely not simple:
- Cheyenne binaries use a memory-based virtual file system.

- When run from sources, files internal relative paths depends on 
where the REBOL binary is run from.

- REBOL on Windows has 2 different working folders (one for REBOL, 
one for the system), while on UNIX, it seems that there is only one 
(from the REBOL POV).


Make a cross product of items and you'll have all possible combinations 
to manage.
Kaj
9-May-2011
[10517]
Bummer
Dockimbel
9-May-2011
[10518x3]
I would like to take this opportunity to clean up things and hide 
the low-level mess under a unique abstraction layer.
I think I will make a new virtual filesystem for Cheyenne that will 
abstract all files accesses (including web sites). This would have 
the additional benefit of allowing to encap web sites files too (a 
feature I wanted to have since a long time).
This is quite a big change, so will need several steps to complete. 
I will first just patch the current way to allow relocating config 
and error files for UNIX users.
onetom
9-May-2011
[10521]
can we start out with a documentation / sample implementation 1st, 
please?

it sounds like a project which can be very well reused in other cases 
too.


i've outlined the mentioned directory areas here: http://piratepad.net/KkvkZ9AtME
Dockimbel
10-May-2011
[10522]
Thanks for the summary. I need to study every cases first anyway 
and find a clean and simple way to implement it. My first idea would 
be to use a custom scheme for that, like vfs:// that would resolve 
all virtual paths transparently.
Kaj
10-May-2011
[10523]
Does the encapper modify the file scheme? Couldn't that be extended?
Dockimbel
10-May-2011
[10524x2]
No, the encapper has no effect on file scheme.
File scheme is native, so no, it can't be extended.
Kaj
10-May-2011
[10526]
Is the VFS in the binary your own, then?
Dockimbel
10-May-2011
[10527]
Yes, but it is a very basic one and you need to use custom function 
calls, like: do-cache, load-cache, read-cache....
Kaj
10-May-2011
[10528x4]
Ah, that explains the differences between the binary and source versions. 
It would be good to neutralise those
It would also have been good if the file scheme in REBOL were hackable. 
Per-app namespaces are always useful
You'd basically get the framework Tamas wants
Any problem in computer science can be solved by adding another indirection.
Dockimbel
10-May-2011
[10532]
Kaj: I have pushed a fix for the verbose mode making Cheyenne crash 
when running as none-root. It works well here on my Linux box. Let 
me know if you have other issues (locally generated files issue aside).
onetom
10-May-2011
[10533]
btw, http://equi4.com/starkit/index.htmlis an encapping solution 
for tcl.

i just accidentally saw it mentioned in a rebol blog entry: http://www.rebol.com/cgi-bin/blog.r?view=0375#comments
 :)
Kaj
10-May-2011
[10534x2]
TCL has a capable VFS, similar to REBOL
Doc, it works, with -vvvvvv and even when I've run it as root first. 
It can't create all its logs then, but at least it doesn't crash. 
Thanks again!
Maxim
11-May-2011
[10536]
Doc, trying to start cheyenne   on win7 with UAC enabled, I get this 
error message: 

You need administrator rights to switch to Windows Services mode 
!
   

thing is I've never tried to switch to windows Service mode!!!


a part from the warning popping up the rebol console, the app seems 
to work ok.

this is with all releases I've tried, including the v142 release.
Dockimbel
11-May-2011
[10537]
the warning popping up the rebol console
 Are you running it from sources?
Maxim
11-May-2011
[10538]
yes
Dockimbel
11-May-2011
[10539]
Looking at the sources, I've found a code path leading to this error 
msg where the internal /quiet refinement is not honored. Fixing that.
Maxim
11-May-2011
[10540]
stupid question, can the source version run as a service, or only 
the binary one?
Dockimbel
11-May-2011
[10541x3]
IIRC, you can run it from sources too. Instead of putting cheyenne.exe 
as the service target, it will put rebol.exe.
But you might have issues with paths.
Max: fix released.
Maxim
11-May-2011
[10544]
thks.
onetom
11-May-2011
[10545x2]
11/5-23:48:50.843304-[HTTPd] Trying phase url-to-filename ( mod-static 
)

11/5-23:48:50.843599-## Error in [uniserve] : On-received call failed 
with error: make object! [
    code: 312
    type: 'script
    id: 'cannot-use
    arg1: 'path
    arg2: 'none!
    arg3: none
    near: [cfg/root-dir req/in/path req/in/target]
    where: 'rejoin
] !

any idea what can this be?
im not sure how to interpret the error message
(and why can't we see a line number for the error, btw?)
Kaj
11-May-2011
[10547]
Is your configuration complete? Seems like it may be missing the 
root dir
onetom
11-May-2011
[10548x3]
hm... i thought i wrote a message before the previous one or rather 
together with it... :/  or i just imagined... possible. i was tired.
ah, i wrote it to my collegue then forgot to write here too
so the issue was:

i had no default vhost defined and i was accessing a non-defined 
vhost.


but kaj, how can u read what u've just said from this error message?

those args are completely fucked up too. there is a lit-word of a 
datatype's name but without an exclamation mark, then comes none! 
as lit-word, then comes none as ... i don't know for sure, as a value?