finstall Achitecture page

This page describes the current (as in: work in progress) architecture of finstall and supersedes any previous documentation on this topic.

Back end

Back-end is a network server application written in Python that forks to background. Serves XML-RPC messages and broadcasts announcements of its presence so networked front-ends can connect.

XML-RPC is a stateless protocol, and most of the operations the server does (like: GetDrivePartitions, AddUser, etc.) are also stateless (though some like the AddUser example before have implicit side-effects). Some actions, however, require strong state keeping and/or are not suitable for synchronous RPC operation. Those are usually also long-lasting and so are implemented as asynchronous threads in the server, named "jobs", whose progress can be queried from the front-end. Some jobs (like InstallJob) implicitly require other jobs to be finished first (like PartitionJob). Their order of invocation in current implementation is canonical.

The back-end invokes standard system utilities (command-line programs like sysctl, fdisk, etc.) to do the work.

Future work

The big features that need to be implemented soon are:

The intention is that the back-end is available for use for multiple front-ends, some of which could have user interfaces (either graphical or textual), but some of which could be completely automated (essentially a batch file of XML-RPC calls). The long-term intention for the back-end is for it to be written in C (for example using the BSD-licensed xmlrpc-c library) so it could be included in the base system and become a system-wide configuration backend.

A part of the plan was to use mDNS for broadcast but since the mDNS project from SoC 2007 wasn't completed on time and was not friendly to scripting languages, this was temporarily replaced with a custom UDP broadcasts.

Front end

Front-end is a Python application using GTK for user interface. It implements a "wizard-like" interface with standard "previous -> next" behaviour.

The user interface itself is developed using GLADE, and has home-grown support for GUI and text templates, enabling work on different steps of the wizard interface without trampling other steps. The interface relies on standard GTK look and feel. Steps of the wizard modify the internal state of the front-end installer. As such, the front-end drives the stateless back-end.

Most function calls are synchronous, gathering or setting such information as network interfaces' states, etc. Asynchronous long-lasting jobs are presented in the interface with a "progress bar" updated from GTK GUI timers (asynchronously but within GTK thread-safety).

This front-end is started from an icon placed on the LiveCD's X.Org + XFCE desktop.

Future work

Future work for the front-end mostly mirrors that of the back-end:

Other

Other things currently done for the finstall project are:

Overall

Current state of finstall is that it's usable for simple installs on blank drives. This install mode will set up a default partition layout in any of the chosen file systems (UFS+SU, UFS+GJ, ZFS, ext2), install the base system and default packages and configure basic system properties and services (like hostname, network interfaces, sshd, etc.).

finstall/Architecture (last edited 2008-06-17 21:38:09 by localhost)