shesmu

Built-In

Shesmu provides only a small handful of built-in services.

Actions

These actions are available on any instance:

Constants

These constants are available on any instance:

Functions

These functions are available on any instance:

Note that paths can be joined with the + operator and strings can be joined using interpolation (e.g., "{x}{y}").

Input Formats

These input formats are available on any instance:

Signatures

These signatures are available on any instance:

Constants from JSON

Simple boolean, integer, strings, and sets of the former can be stored as simple constants in JSON files. Create a JSON file ending in .constants as follows:

{
  "life_the_universe_and_everything": 42
}

This will provide the constant life_the_universe_and_everything to olives. Updating the file will update the value seen by the olives if the type is the same.

Fake Actions

For debugging, it’s often useful to have a simulating server that has the same actions as production, but doesn’t do anything with them.

To configure this, create a file ending in .fakeactions as follows:

{
  "url": "http://shesmu-prod:8081,
  "allow": ".*",
  "prefix": ""
}

where url is the Shesmu server to copy and allow is a regular expression of which action definitions to copy. An optional prefix can be applied to the names of all the action definitions.

If the remote server is not accessible, download the /actions endpoint to a file ending in .fakeactiondefs. This will create a similar set of fake action definitions, though statically.

Then, use an olive and actnow file to generate corresponding actions using the fake action definitions.