Overview

How to start a GeneWeb server

Starting the server

Starting a GeneWeb web server requires two tools:

  • gwd, the actual web server;

  • setup, the database setup portal.

These two tools are part of the main distribution and can be found on _build. If you built the project with make clean distrib, two scripts are available on the directory distribution/. Keep in mind they are scripts wrapping the actual binaries.

To start the server on the current directory:

_build/install/default/bin/geneweb.gwd -hd <location_of_hd_dir>

This will start the main web server on port 2317.

To start the setup server on the current directory:

_build/default/bin/setup/setup.exe -gd <location_of_gwsetup_dir>

This will start the setup server on port 2316.

Configuration

GeneWeb can be configured by defining a <base name>.gwb file. An example is available in the etc directory.

Architecture of GeneWeb

GeneWeb is built from three main components:

  • the storage of the genealogical trees, divided in a patch file and the actual data;

  • the libraries, reading the data from the storage and writing the patch file

  • the binaries and the web server, reading and writing the storage

../_images/diagram.png

Storage architecture

Libraries

  • Util: a library with miscellaneous useful modules for manipulating base data types.

  • Def: the definition of the main type definitions used in GeneWeb trees.

  • Sosa: describes a Sosa-Stradonitz numbering (known an Ahnentafel numbering), associating natural identifiers to individuals. This library is virtual and has three different implementations. One of these implementations is selected by the configuration script.

    • Sosa_array is one of the sosa implementations. It represents naturals as pair of integers stored in an array a such that sosa = a.(0) + base * a(1)) where base is a hardcoded constant.

    • Sosa_num is one of the sosa implementation based on the Big_int library.

    • Sosa_zarith is one of the sosa implementation based on the Zarith library.

  • Gwdb_driver: describes the storage implementation. While it is virtual, it currently has only one implementation, gwdb-legacy. It is wrapped by the gwdb library that exports many tools for database updates.

  • Core: core of GeneWeb for calculating consanguinity between persons.

  • GeneWeb_export : provides a functor for defining Json convertors for GeneWeb’s datatypes.

  • Def_show: defines formatters and string converters for GeneWeb’s datatypes.

  • GeneWeb: the main library. It contains several kinds of files, from utilitarian modules to HTML generation.

  • Gwb2gedLib: defines a function for exporting a base to a GEDCOM file.

  • Wserver: a light-weight web server, used by gwd and setup.

  • Gwd_lib: defines additional modules for the gwd web server.

  • GwuLib: defines useful functions for exporting a database to a .gw file.

The documentation of each module is available on the automatically generated documentation of geneweb ($ make doc)

Binaries

Official binaries

Here are the binaries maintained by GeneWeb:

  • Connex: calculates connex components of a base;

  • Consang: calculates the consanguinity level of individuals;

  • Ged2gwb: imports a GEDCOM 5.5.1 file to a GeneWeb base;

  • Gwb2ged: exports a base to a GEDCOM 5.5.1 base;

  • Gwc: creates a new database;

  • Gwd: starts GeneWeb’s main web server which allows to interact with bases;

  • Gwdiff: targets differences between two databases;

  • Fixbase: checks the consistency of a base and applies patches;

  • Gwgc: removes unused entries in GeneWeb’s arrays;

  • Gwrepl: an OCaml interactive top level, useful for scripts;

  • Gwu: exports a base to a .gw file;

  • Setup: a web server for selecting and creating databases.

For mor details about every binary, see:

Web-server and plug-ins

The gwd web server is customizable with plug-ins; code replacing the original behaviour of the web server handling requests. They are dynamically loaded by gwd at its start and each base can be activated through the .gwb file (plugins=* for activating all plug-ins, otherwise plugins=p1,p2,...).

A plug-in is composed of its code, a dune file for building and a META file, containing some informations about the plug-in itself.

Here is an example of META file:

` version:1 maintainers:OCamlPro depends:plugin1,plugin2 `

The only field taken into account by gwd is depends as it is used to check there are no circular dependencies between plug-ins.