In-memory lookups of past interactions, indexed by keywords.

What it does

Lookups may be read from and written to using LookupWriters, LookupReaders and LookupExterminators.

Multiple lookups may exist in a single instance of ApolloGeese at any given time, and are universally accessible among Services resident in a single instance of ApolloGeese. 

Lookups can be told apart by the lookupname, provided upon initialization of each Lookup-related service.

The Lookup system may be compared to a very simple in-memory database, it may be compared to more familiar SQL database concepts as follows:

LookupReader SELECT-query
LookupWriter INSERT-query
LookupExterminator DELETE-query

The similarities end here, largely; the database-connection and disk-storage are both skipped and indexing using Lookups is done directly and only to RAM. (In fact, it only occured to me to make the read/write/delete comparison at the time of writing these docs.)

Behind the scenes

A single lookup consists of a two hashmaps;

The first hasmap is used for doing the quick lookups by combinations of keywords; a search with two keywords produces two lists that will be combined into one by means of an 'AND' or 'OR' contained in the lookup query.

The second hashmap is used for quickly finding stored interactions by their identity (meta) field and is at the time of writing this only neccesary for quickly removing items. (Like the LookupExterminator does).

How it works

Source code below is also available on github including required html files.

    plugins = [
        // Lookup*
        // PostFieldReader
        // HttpService
        // Template
        // SiteSubsection

    instances = {
        forms = Template(f"lookups/forms.html");

        search = PostFieldReader(
            field_keywords = "^[\\w|\\s]+$"
        ) {
            successful->Template(f"lookups/found.html") {
                    lookupname = "example",
                    lookupkeyname = "keywords"
                ) {

        save = BodyReader(
            field_meta = "^[\\w]+$",
            field_keywords = "^[\\w|\\s]+$",
            field_content = ".*"
        ) {
            ) {
                    lookupname = "example",
                    lookupkeyname = "keywords",
                    metaname = "meta");

        remove = BodyReader(
            field_meta = "^[\\w]+$"
        ) {
            successful->Template(f"lookups/removed.html") {
                    lookupname = "example",
                    metaname = "meta"

        example = Template(
        ) {
            content->SiteSubsection() {

        server = HttpService(
            prefixes = ["http://*:8080/"]) {