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

Maxim
24-May-2009
[4915]
how do I use rconsole to tell cheyenne to reload a mod that has changed 
on disk... 


or does cheyenne detect mod-file changes and reload them automatically?
Dockimbel
24-May-2009
[4916x2]
You can't. Mods are part of Cheyenne's kernel and the priority of 
each mod's callback is determined relatively to the other mods during 
Cheyenne boot (kind of competition for higher priority for each phase). 
Reloading a mod would required reloading all the mods, breaking most 
of the active connections (CGI, RSP, FastCGI,...). So the answer 
is : kill and reload Cheyenne.
<required> = require
Maxim
24-May-2009
[4918x2]
with your permission I would like to rebrand ssh-admin to  Cheyenne-admin.

its like a stand-alone cpanel for cheyenne-based systems.


All the current file and system commands options to manage the host 
server too will be complimented with any tools needed to configure 
and control cheyenne and any mods which are installed.
ok, so you build static blocks of callbacks, when loading the mods... 
I guess.
Dockimbel
24-May-2009
[4920]
Exactly.
Maxim
24-May-2009
[4921]
ok, so first cheyenne command in cheyenne-admin: "restart"  :-)
Dockimbel
24-May-2009
[4922]
I make a hash! list of all the phases' callbacks, so the impact on 
performances remains very low.
Maxim
24-May-2009
[4923x2]
:-)
so is the branding of cheyenne-admin ok with you?
Dockimbel
24-May-2009
[4925]
Go on for the name, my own Cheyenne admin panel is still at a very 
early stage.
Maxim
24-May-2009
[4926]
mine is already capable of all the file browsing/upload/download 
to the server  :-)
BrianH
24-May-2009
[4927]
Link? :)
Maxim
24-May-2009
[4928x5]
hehehe, will be providing the link to my site once its on-line, and 
then will start working on revault, for which I also purchased domains.
I am using this site as a showcase for all of my work.  including 
web, visual arts, music, design, programming, etc.
I have soooo much stuff on my disk which is just screaming to be 
released!
cheyenne-admin also has a *VERY* nice GUI, using GLayout.
already using cheyenne-admin to setup my bash user config files (~/.xxxx 
files) copying files locally, editing in ultra-edit, and uploading 
them back  
all via one click for xfer   :-)
I'm lazy  hehehehe
Graham
24-May-2009
[4933]
what do you use the admin for ?
Maxim
24-May-2009
[4934]
Note this is a linux server-side only tool (currently).
currently:
	-remote browing of files in a gui.
	-uploading/downloading any files to/from the webserver
	-running command-lines remotely
soon: 
	-chmoding remote files
	-handling webserver start/stop/restart  remotely.
	-more as time goes by.
Graham
24-May-2009
[4935x2]
so you run the tool on the server PC?
ie. you can't run it from a client PC?
Maxim
24-May-2009
[4937x4]
nope locally.
I meant the server has to be a linux box.
anyone know if there is a detailed doc on sessions within cheyenne?
what we need with !cheyenne are minial examples of services and mods 
which implement all callbacks and give just a small comment on why 
and when it is called... this would help soo much in understanding 
how to implement cheyenne extensions.


I am currently looking at the rsp code and its so huge and complex 
that its a big daunting to grasp the whole by looking at its parts.
Dockimbel
25-May-2009
[4941]
Mod-RSP is the most complex one and it does a lot of things. Sessions 
in Cheyenne are RSP-specific. There's a synchronization system in 
RSP sessions for protection of session data from corruption in concurrent 
executions. That may be easy to understand by just reading the code. 
Anyway, feel free to ask for explanations of specific code parts.
Maxim
25-May-2009
[4942x5]
yep it is complex hehe
you mean that if two requests are sent to different task-handlers 
they will resync when the later is done?
or is it rather some kind of semaphore?
there are too few comments (read as almost none ;-) in your code, 
 and that doesn't slow down server in any way   ;-D
I mean... more comments wouldn't slow down the server hehehe
Dockimbel
25-May-2009
[4947x3]
Sorry: that may be easy = that may not be easy
It works using a semaphore (session/busy?: yes|no). It used to be 
very fined-grained with distinction of RSP scripts just reading session 
data from scripts modifying session data, but it was even more complex 
to maintain and the RSP source static analysis I was doing could 
never be 100% accurate (it''s easy to bypass any form of static analysis 
in R2). So now, it just blocks concurrency inside a user session 
(only 1 RSP script per user session allowed).
Session data is passed to task-handlers along with each request and 
saved back in main process on task-handlers response.
Maxim
25-May-2009
[4950x2]
so an rsp script cannot call another rsp script within its links 
for images, for example?
well, actually it can... its just not going to download concurrently.
Dockimbel
25-May-2009
[4952x3]
Yes it can, from the server perspective, it's just a sequence of 
RSP requests.
If you can think of a solid method for allowing concurrency in the 
same user session, while preserving session data from corruption, 
I'll be very interested.
I should add : without loosing performances.
Maxim
25-May-2009
[4955]
a part from having handler tcp interaction, I can't think of any 
a part from identifying a way to detect which session data is being 
used by both scripts.
Dockimbel
25-May-2009
[4956]
It's always possible to write session data to disk or to a DB and 
rely on the DB locking system to ensure that data is safe, but there's 
a performance overhead in that case that I'm afraid, may not result 
in any speed gain for the user. It also requires to have a DB engine 
installed on all servers running Cheyenne using RSP sessions, which 
might be overkill in some situations.
Maxim
25-May-2009
[4957x4]
this being said... mod-remark will be using persistent liquid nodes 
for session and post/get parameter side of things, and its possible 
that I might store session data outside of the server itself, using 
a liquid-tcp node. 


so that access to actuall session data could be brokered outside 
the server's jurisdiction, extremely efficiently, locked one value 
at a time. and any access/change could be perpetuated to other handlers 
when they attempt to lock to one session value.
the idea being that interacting via xml request or full page refresh, 
with only part of a page parameters, creates the same output  :-)
sorry, stores the same session information.  allowing the same output 
depending on the required refresh.
you could actually have one page sending xml requests to the server 
in ajax, and another page refreshes with the results of those requests...


the second page could also send a page request with the some parameters 
sent, and the server will reflect all changes to the current session/page 
so far.
Dockimbel
25-May-2009
[4961x2]
I thought also about doing a TCP based session server (with session 
variable granularity), but the overhead in synchronization would 
hit performances (and scalability) too much IMO. If each time you're 
setting a new value to a session variable in a script, you have to 
query a TCP server (even a local one), that would have a huge impact 
on a script execution time.
That impact may not be significant (nor noticeable) if your server 
is handling 1req/s, but it would be if you have to handle 50req/s.
Maxim
25-May-2009
[4963x2]
might still be much faster than a db call.  but the real game-changing 
aspect of mod-remark is that a document in ram, will only render 
parts of itself which are changed, or which cannot be cached, so, 
unless you've actually changed a parameter, it knows that it hasn't 
changed and will not need to ask for the broker to give it back the 
value.  in fact, it wont even process that part of the page, only 
using the data in its local node cache directly.
header/ footer / current login state box/ static page content... 
this can be shared accross sessions, across the entire site, or as 
granular as a single page request.