Skip to content
/ malaya Public

CHR-style logic programming for nodejs using JSON

License

Notifications You must be signed in to change notification settings

jkozak/malaya

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

A major new version is coming. Please wait for that before downloading.

Malaya is a logic-based relational data storage and processing system.

There’s a class of applications which are about taking in data from a variety of sources, weaving them together with past data and sending appropriate data out. They typically run forever and are often called daemons or services.

Such applications include:

  • trading systems
  • messaging systems, client/server and distributed
  • instrumentation and control, e.g. IoT
  • CI systems, chat bots

Malaya is designed to make this easier. It is a system for the concise and rapid expression, implementation and deployment of rule-based persistent reactive systems. Data is everywhere JSON; persistent storage is based around a hash-chained journal of updates which is tamper-proof and maintains the system’s entire history; it is thus eminently auditable.

It consists of:

  • JSON pattern matching
  • a logic programming system based on CHR
  • a persistence layer based on prevalence
  • plugins to implement
    • timers
    • sockets
    • websocket
    • REST
    • file I/O
    • slack, matrix, SSB, IRC, &c
    • stripe
    • email

The current implementation is in-memory and runs on top of nodejs; it should run wherever that runs.

Malaya is developed on linux and LTS versions of nodejs.

Examples and documentation to come. The language is nearly stable; the codebase is currently in-flux but expected to settle down by mid-2019 for comment as version 0.9.*: a 1.0.0 release is anticipated by the beginning of 2020.