Version 13, last updated by Eric Maupin at October 25, 2010 12:08 UTC
Barrel is a standalone server runner for Gablarski with a set of backend plugins. Download here: http://www.gablarski.org/download.php#server
Barrel Configuration
The configuration file that comes in the Barrel archive (Barrel.exe.config) is pre-configured for most users. For the most part, you'll probably just want to change the basic visible settings like the name:
<barrel name="Barrel of Monkeys" description="You need an explanation?" port="42912">
You'll also probably at least want to double check the default Gablarski.LocalServer configuration.
<configSections>
The Barrel configuration file is a standard XML .NET Configuration File. This section defines what custom configuration sections may be present and where to load them from. Any providers (backend or connection) that provide custom configuration options will need to be listed in this section, the author should provide instructions on how to add it.
Default configuration sections:
- barrel is Barrel's configuration section and must be left in.
- log4net is a logging framework and is what enables the console to display information messages. See log4net configuration.
- localserver is Gablarski.LocalServer.dll's configuration section.
<barrel>
This is the main configuration section for the Barrel server.
Attributes:
- name
- The name of the server
- description
- The description of the server.
- port
- Optional (default: 42912). The port for standard network connections.
- network
- Optional (default: true). Can be set to "true" or "false" to enable or disable the built in network provider.
- password
- Optional (default: none). Sets a server password.
Providers
This is a list of all the providers to use for the server. This includes both backend providers and connection providers. If you're not changing to a custom or memory based provider or adding a new connection provider, you can ignroe this section.
The list is more or less just a list of type names, just like the <configSections> section. Barrel will automatically detect what type of provider each provider is an add them as appropriate. If any provider fails to start, Barrel will log a warning and keep searching for providers. If any type of provider is missing or if the only type of the provider has failed to start, Barrel will log a fatal error and exit. If there's more than one provider of the same provider type (two user providers, even of different implementations for example), Barrel will log a fatal error and exit.
It is not currently possible to use a single provider from a type that implements multiple providers, it will detect all implementations and use them. (This may change in the future, but it is generally not recommended that a single type implement all providers.)
Backend Providers
Gablarski's server utilizes a set of providers for most basic functionality like user registration, channel management, etc. These providers are essentially specific types of plugins and can be swapped in and out, so the Barrel configuration allows for selecting them. While you're welcome to use any provider you or someone else writes (especially handy for custom integration with an existing community), Gablarski and Barrel each ship with a set of providers designed to handle most needs.
Guest providers
As stated, the core Gablarski library ships with memory-only guest-based providers. This means that there is no user registration (the first user to join is the admin, much like an unregistered IRC channel), channels do not retain through a restart and permissions are uncontrollable. These are the providers used when using the "Start Local Server" functionality of the Windows client, but are not really recommended for a Barrel server. Currently there is no configuration for these providers:
| Provider type | Type name |
|---|---|
| User Provider | Gablarski.Server.GuestUserProvider, Gablarski |
| Permissions Provider | Gablarski.Server.GuestPermissionProvider, Gablarski |
| Channel Provider | Gablarski.Server.LobbyChannelProvider, Gablarski |
Gablarski.LocalServer
Gablarski.LocalServer is a set of backend providers for users, channels, permissions, etc utilizing a local SQLite database. Currently this is only supported on Windows/.NET.
| Provider type | Type name |
|---|---|
User Provider |
Gablarski.LocalServer.UserProvider, Gablarski.LocalServer |
Permissions Provider |
Gablarski.LocalServer.PermissionProvider, Gablarski.LocalServer |
Channel Provider |
Gablarski.LocalServer.ChannelProvider, Gablarski.LocalServer |
Configuration
Gablarski.LocalServer is configured through a set of general settings, including settings specific to individual providers. Note that it is not required that you provide settings for providers you are not using (ie. if you're using the channel provider and not the user provider, you can leave out the user provider settings.)
Warning for first time users: The first account registered with the Gablarski.LocalServer user provider is the admin account. Make sure you login to your server and register first thing.
General settings
- database
- The full or relative path to the database to use for any and all of the providers used from Gablarski.LocalServer
User Provider settings
- registration
- The registration mode for the user provider. Valid options are: "None", "Normal", "Approved", "PreApproved", "WebPage", "Message"
- registrationContent
- If registration is "WebPage", this is the URL. If registration is "Message", this is the message to display. For any other value of registration, this is meaningless.
log4net
The default configuration file comes with a log4net section already in-place to give basic information messages on the console running the server. A logging appender has also been included by default so if you'd like to keep logs, the easiest way is to add an appender ref to it:
<root> <level value="INFO" /> <appender-ref ref="Console" /> <appender-ref ref="Log" /> </root>
Gablarski includes logging information throughout it's code base. The level value can be adjusted anywhere from FATAL all the way to DEBUG, but INFO is the recommended level for general usage. Warning: DEBUG level is intended only for debugging and is processing intensive and may result in extreme CPU usage as well introducing breaks into audio (possibly being unintelligible on slower systems.)
For more information on configuring log4net: http://logging.apache.org/log4net/release/manual/configuration.html