Executables
mark
mark is intended to be the primary command line interface for client interactions with mKTL. The command line arguments describe its usage:
usage: mark [-h] [-s STORE] [--serial | --no-serial] [--wait | --no-wait]
{get,set,watch,list} [requests ...]
This is the mKTL command line interface. The real work is done in the
mktl Python library; this executable parses command-line flags, invokes
mktl routines to handle any/all requests, and otherwise waits until all
requests are complete. Note that the default is to execute all requests
in parallel.
positional arguments:
{get,set,watch,list} Request type
requests Whitespace-separated sequence of requests. For a get
or a watch request, this is a sequence of keys; for a
set request, this is a sequence of key=value
statements. For a list request this is a sequence of
stores.
options:
-h, --help show this help message and exit
-s, --store STORE Name of an mKTL store to prefix to all subsequent
keys.
--serial, --no-serial
Process all requests serially. The default is to
process requests in parallel.
--wait, --no-wait Wait until all set requests are complete before
exiting. The default is to wait. --no-wait is not
compatible with --serial.
Example usage:
mark get rosebud.model rosebud.length
mark get -s rosebud model length height color
mark set rosebud.speed=50
mark set -s rosebud speed=50 passengers=2 --no-wait
mark watch rosebud.model rosebud.length
mark watch -s rosebud model length height color
mark list -s rosebud
mark list rosebud redflyer
marked
The marked executable provides a command-line interface to invoke a
persistent daemon executing a mktl.Daemon
subclass to implement
application-specific functionality. The marked executable is intended
to be the common point of entry for any Python-based mKTL daemon.
The command line arguments describe its usage:
usage: marked [-h] [-m MODULE] [-s SUBCLASS] [-c CONFIGURATION] [-a APPCONFIG]
store alias
This is a generic mKTL daemon. The real work is done in the subclass of
mktl.Daemon (if any); this executable parses command-line flags, invokes
a mktl.Daemon instance to handle any/all requests, and otherwise waits
until the program is terminated.
The store name and configuration alias must be specified in order for
this daemon to function correctly; all other arguments are optional.
positional arguments:
store Name of this mKTL store.
alias Unique alias for the mKTL configuration associated
with this specific daemon; this is an arbitrary
string, and must be unique for this daemon within this
store.
options:
-h, --help show this help message and exit
-m, --module MODULE Module to import which contains the mktl.Daemon
subclass to invoke.
-s, --subclass SUBCLASS
Specific mktl.Daemon subclass to invoke; this is the
bare class name (Daemon), not a fully qualified class
name (mktl.Daemon).
-c, --configuration CONFIGURATION
File containing daemon-specific mKTL configuration of
items; if specified, the contents of this file will
supplant any cached daemon-specific configuration for
this store+alias.
-a, --appconfig APPCONFIG
Custom configuration file location, not used directly
by mKTL, but made available to the mktl.Daemon
subclass. How this directive is used is entirely up to
the application-specific subclass code.
For example, to run marked for the store 'rosebud', using the existing
on-disk configuration identified as 'innocence', first using the default
caching implementation, and then with a custom Kane.Sled subclass of
mktl.Daemon, one might invoke:
marked rosebud innocence
marked rosebud innocence --module Kane --subclass Sled
markguided
The markguided persistent daemon is a discovery aid, listening for UDP broadcasts on a well-known port number so that clients can be directed to a specific mKTL daemon handling requests for a specific store, or fraction of a store. While having a markguided daemon running is not a strict requirement it is a key component of automated discovery of mKTL stores on a local network.