Kernel SNAPSHOT

Released under the LGPL v3

Interchangeable feature-modeling kernels for variED. `kernel.api` is the stable facade consumed by both the JVM server and the ClojureScript browser client. It exposes the same editing and synchronization API for two implementations: * `kernel.api.locking` applies operations immediately. The server serializes access with its traditional lock; this is the default mode. * `kernel.api.collaborative` retains variED's original optimistic, real-time collaboration and conflict-resolution algorithm. The server selects `:locking` or `:collaborative` before initialization and includes that mode in the initialization context, so every client transparently selects the matching implementation. Written in Clojure to allow for a functional core, imperative shell architecture. Can be run in the JVM (on the server) or transpiled to JavaScript (on the client). Run `lein repl` and `(require '[kernel.api :as api])` to access the facade. Call `(api/setKernelMode :collaborative)` before `serverInitialize` to select the collaborative implementation; otherwise the locking implementation is used. Run `lein test` to run the integration tests. Run `lein codox` to generate this documentation. Start with the `kernel.api` namespace, then consult `kernel.api.locking` or `kernel.api.collaborative` for implementation details.

Installation

To install, add the following dependency to your project or build file:

[kernel "SNAPSHOT"]

Namespaces

kernel.api

Stable facade shared by the collaborative and traditional-locking kernels.

kernel.api.collaborative

API of the kernel.

kernel.api.locking

A traditional, server-serialized kernel implementation.

kernel.api.locking-server

Internal server startup adapter for the traditional locking kernel.

kernel.core

Functional core of the kernel.

Public variables and functions:

    kernel.core.causal-dag

    Causal Directed Acyclic Graph, CDAG for short. The CDAG captures compound operations’ dependencies.

    kernel.core.compound-operation

    Compound Operation, CO for short. Compound operations are sequences of primitive operations (kernel.core.primitive-operation). They correspond to feature modeling operations.

    kernel.core.conflict-cache

    Conflict Cache, CC for short. Caches all conflicts a site detected.

    kernel.core.conflict-relation

    Conflict relation used by the MOVIC algorithm (kernel.core.movic to detect conflicts between competing operations.

    kernel.core.conflict-resolution

    Utilities for assisting in conflict resolution.

    kernel.core.feature-model

    Feature Model, FM for short. Implements a feature model representation and mutation operators.

    kernel.core.garbage-collector

    Garbage Collector, GC for short. Periodically prunes a site’s data structures to keep them as small as possible.

    kernel.core.history-buffer

    History Buffer, HB for short. Serves as a central storage for operation metadata. Only a performance optimization and not essential.

    Public variables and functions:

    kernel.core.message

    Defines what kinds of messages are exchanged among sites.

    kernel.core.movic

    The MOVIC algorithm introduced by Sun and Chen, 2002 for handling conflicting operations.

    kernel.core.primitive-operation

    Primitive operation, PO for short. Primitive operations create or update only one object in a feature model at a time. They are building blocks for more complex compound operations (kernel.core.compound-operation).

    kernel.core.topological-sort

    Sorts a set of compatible operations topologically according to kernel.core.compound-operation/preceding?.

    kernel.core.vector-clock

    Vector Clock, VC for short. Vector clocks are used to track causality of operations in the system.

    Public variables and functions:

    kernel.helpers

    Host-specific helper functions.

    kernel.i18n

    Defines strings for internationalization purposes.

    Public variables and functions:

    kernel.shell

    Imperative shell of the kernel.

    Public variables and functions:

      kernel.shell.client

      Client site control.

      kernel.shell.context

      Global site context. Contains all state managed by a particular site.

      Public variables and functions:

      kernel.shell.server

      Server site control.

      kernel.shell.site

      Site control shared both by clients and the server.