Difference between revisions of "Xebra Server Administration"

(New page: Category:Xebra =Modules= The server automatically launches the following modules: * mod_http: Listens to requests from the http plugin (Apache Module or IIS7 Handler) on port 55001. T...)
 
Line 1: Line 1:
 
[[Category:Xebra]]
 
[[Category:Xebra]]
 +
 +
=Run Xebra Server=
 +
 +
# Note that you should have compiled the translator before you run the server. 
 +
# If you have not done so, open the file $XEBRA_DEV/eiffel_projects/xebra_server/config.ini and adapt translator, compiler, and webapps_root to your configuration (see [[Xebra Server Config File]]).
 +
# Launch estudio and open the project $XEBRA_DEV/eiffel_projects/xebra_server/xebra_server-voidunsafe.ecf
 +
# Go to the Exceptions Handling dialog and disable DEVELOPER_EXCEPTION (this is due to a bug in the NET library that has not been fixed yet).
 +
# Open the Execution Parameters dialog and set "config.ini -d 10" as argument (see below for more info about run arguments).
 +
# Compile and run
 +
# Browse to http://localhost:55000/helloworld/. The server now translates, generates, compiles and finally runs the helloworld application.
 +
 +
  
 
=Modules=
 
=Modules=

Revision as of 13:42, 1 July 2009


Run Xebra Server

  1. Note that you should have compiled the translator before you run the server.
  2. If you have not done so, open the file $XEBRA_DEV/eiffel_projects/xebra_server/config.ini and adapt translator, compiler, and webapps_root to your configuration (see Xebra Server Config File).
  3. Launch estudio and open the project $XEBRA_DEV/eiffel_projects/xebra_server/xebra_server-voidunsafe.ecf
  4. Go to the Exceptions Handling dialog and disable DEVELOPER_EXCEPTION (this is due to a bug in the NET library that has not been fixed yet).
  5. Open the Execution Parameters dialog and set "config.ini -d 10" as argument (see below for more info about run arguments).
  6. Compile and run
  7. Browse to http://localhost:55000/helloworld/. The server now translates, generates, compiles and finally runs the helloworld application.


Modules

The server automatically launches the following modules:

  • mod_http: Listens to requests from the http plugin (Apache Module or IIS7 Handler) on port 55001. These request are forwarded to the appropriate webapp.
  • mod_console: Reads input from the console. The commands described below can be invoked.
  • mod_cmd: Listens to command request from the webapps on port 55002.

Webapps

Assume webapps are running

If assume_webapps_are_running was set, the server does not translate, compile and run the webapps. It just tries to connect immediately. This should be used when a webapp is launched in estudio for debugging and the server should not try to run and shutdown the webapp.

Development Mode

By default, a webapp is set to Development Mode which means that the server checks everytime a request was made if the webapp needs to be retranslated and compiled. This makes access to the webapp very slow. As soon as development of the webapp stopps, dev_mod should be set to off.

Fire off a webapp

If the server crashed and therefore could not properly shut down all webapps, they will still be running when the server is relaunched. Hence, the socket will be occupied when the server tries to launch a webapp. Use the fire command to fire off a possibly running webapp. The fire command tries to directly connect to the webapp and send a shutdown signal regardless if the webapp process is owned by the server or not.


Config File

Run Arguments

USAGE: 
    xebra_server <config_filename> [-d <debug_level>] [-c] [-r] [-v]
 
 OPTIONS:
    -d --debug_level               : Specifies a debug level. 0: No debug output. 10: All debug ouput. (Optional)
    -c --clean                     : If set, all webapps will be cleaned (Optional)
    -r --assume_webapps_are_running: If set, the server assumes that the webapps are already running and does not 
                                     translate, compile and run them before connect to them. (Optional)
    -h --help                      : Display usage information. (Optional)
    -v --version                   : Displays version information. (Optional)
 
 ARGUMENTS:
    <debug_level>: The debug level (0-10)
 
 NON-SWITCHED ARGUMENTS:
    <config_filename>: The path of the config.ini file to use.

Console Commands

General

  • 'help': Displays a list of commands.

Webapps

  • 'clean <name>': Cleans, re-translates, compiles and launches a webapp.
  • 'dev <name>': Sets developing mode of a webapp to on.
  • 'dev_all': Sets dev_mod to on on all webapps.
  • 'dev_off <name>': Sets developing mode of a webapp to off.
  • 'dev_off_all': Sets dev_mod to off on all webapps.
  • 'dev_on <name>': Sets developing mode of a webapp to on.
  • 'disable <name>': Disables a webapp.
  • 'enable <name>': Enables a webapp.
  • 'fire <name>': Sends shutdown signal to webapp.
  • 'get_sessions': Retrieves the number of sessions of all running webapps.
  • 'shutdown <name>': Shuts down a webapp.
  • 'translate <name>': Forces re-translation of webapp.
  • 'webapps': Displays the available webapps.

Server Control

  • 'exit': Shuts down the server.
  • 'reload': Reloads the server configuration file.
  • 'shutdown_webapps': Shuts down all webapps.

Modules

  • 'mlaunch <name>': Re-launches a server module.
  • 'modules': Displays the available modules.
  • 'mshutdown <name>': Shuts down a server module.