Skip to content

Protocol Documentation

Table of Contents

Top

java/dev/enola/core/connector/enola_connector.proto

AugmentRequest

Field Type Label Description
entity dev.enola.core.Entity

AugmentResponse

Field Type Label Description
entity dev.enola.core.Entity

ConnectorServiceListRequest

See dev.enola.core.ListRequest

Field Type Label Description
id dev.enola.core.ID
related_filter ConnectorServiceListRequest.RelatedFilterEntry repeated

ConnectorServiceListRequest.RelatedFilterEntry

Field Type Label Description
key string
value dev.enola.core.ID

ConnectorServiceListResponse

See dev.enola.core.ListResponse

Field Type Label Description
entities dev.enola.core.Entity repeated

GetDescriptorsRequest

No string type_url here, because a Connector simply returns everything.

Intentionally empty.

GetDescriptorsResponse

Field Type Label Description
protos google.protobuf.FileDescriptorProto repeated This has to be in order of dependencies, so reverse import order. For example, for the connectors/demo's demo_data.proto which has an import "google/protobuf/timestamp.proto" this has to FIRST contain the Timestamp's and THEN the Something's FileDescriptorProto.

ConnectorService

This is the API which Enola Connectors implement. Enola Core calls this API for each of the listed connector of an EntityKind. Enola clients (such as a CLI or UI) use the EnolaService, instead of this directly. This is the gRPC equivalent of the internal EntityAspect Java API.

Method Name Request Type Response Type Description
Augment AugmentRequest AugmentResponse
List ConnectorServiceListRequest ConnectorServiceListResponse
GetDescriptors GetDescriptorsRequest GetDescriptorsResponse

Top

java/dev/enola/core/enola_core.proto

Entity

Field Type Label Description
id ID
ts google.protobuf.Timestamp
related Entity.RelatedEntry repeated Related Enola Entities. Intended for consumption by both machines as well as humans. Key is EntityKind#related.key (modeled by EntityRelationship), value is ID.
link Entity.LinkEntry repeated URIs linked to this entity providing additional information about it on other systems.

Key is EntityKind#link.key, value is an URI, often pointing to "back-end" state information, used e.g. to determine an Entity's status, etc.

If http[s]: then these are informational and destined to be displayed to a human on a UI, but not "machine readable" for interpretation. Any other URI scheme is intended to be (only) machine readable and up to the client to interpret. This URI may well be specific to the respective schema connector.

These can be requested to be "inlined" in responses. | | data | Entity.DataEntry | repeated | Data about the Entity, in machine readable form. Key is EntityKind#data.key, value is an Any protobuf. |

Entity.DataEntry

Field Type Label Description
key string
value google.protobuf.Any

Entity.LinkEntry

Field Type Label Description
key string
value string

Entity.RelatedEntry

Field Type Label Description
key string
value ID

GetFileDescriptorSetRequest

Intentionally empty (currently).

GetFileDescriptorSetResponse

Field Type Label Description
protos google.protobuf.FileDescriptorSet

GetThingRequest

Field Type Label Description
iri string IRI of Thing to get. This may use an enola: scheme, see https://docs.enola.dev/concepts/uri.

GetThingResponse

Field Type Label Description
thing google.protobuf.Any TODO Just directly return Things, instead of Any! (Or oneOf Things

ID

ID of an Entity known to Enola, fully qualified. Can be formatted to and parsed from several different string text forms, see Java class dev.enola.core.IDs.java

Field Type Label Description
ns string Namespace. Serves to distinguish same entity names (below). This is optional if in your use of Enola you avoid name conflicts. It's like in C# or "package" in Java or Go or the xmlns: from XML Schema, or whatever the hell confusing thing ;) that Python is doing about this. Validated to only contain [a-z0-9_.] characters, so it's safe in URLs. By convention can contain '.' for sub-namespacing, but does not have to. The namespace of an Entity is always the same as its EntityKind.
entity string Entity Kind Name. This is mandatory and thus always present. This refers to an EntityKind and not an individual Entity, despite the name. (In practice this is just shorter and clearer for people to understand.) Validated to only contain [a-z0-9_] characters, so it's safe in URLs.
paths string repeated Path. This is mandatory and thus always present with at least 1 element. Think of this as what would typically uniquely identify this entity IRL; e.g. a "hostname" or some UUID or a S/N or whatever is its "primary key". Validated to only contain [a-z0-9_-.] characters, so it's safe in URLs. (This restriction could in theory be relaxed, if there was a strong need to support it; as long as sufficient test coverage is added for correct encoding in URIs, see https://en.m.wikipedia.org/wiki/URL_encoding.) Multiple "segments" are supported for "composed keys", for example a network/context/namespace/name kind of ID.

ListEntitiesRequest

Request for a list of entities. For the https://docs.enola.dev/use/library/ example model, examples could be: A. Set 'kind' to 'book_kind', without the 'isbn' path - list all B. Set 'kind' to 'book', and the 'library' path - from a specific library Note that for the example library model you would not use the related_filter, as the only two related (the 'library' and the 'kind') are available in the paths; but if it had any other related, one could filter one or several of those.

Field Type Label Description
eri string This is an https://docs.enola.dev/concepts/uri.
related_filter ListEntitiesRequest.RelatedFilterEntry repeated Filters on related entities. The key is as in EntityKind or Entity's .related, and the value is the ("scope") related entity to filter on. If there is more than one, these are AND, not OR.

ListEntitiesRequest.RelatedFilterEntry

Field Type Label Description
key string
value ID

ListEntitiesResponse

Field Type Label Description
entities Entity repeated TODO Any instead of Entity? Or (better!), abandon ListEntities() entirely repeated google.protobuf.Any things = 1;

EnolaService

This is the API with which Enola clients (such as a CLI or UI) connect.

Method Name Request Type Response Type Description
GetFileDescriptorSet GetFileDescriptorSetRequest GetFileDescriptorSetResponse
GetThing GetThingRequest GetThingResponse
ListEntities ListEntitiesRequest ListEntitiesResponse

Top

java/dev/enola/core/enola_ext.proto

File-level Extensions

Extension Type Base Number Description
type string .google.protobuf.FieldOptions 2734

Top

java/dev/enola/core/meta/enola_meta.proto

Connector

Field Type Label Description
error string Always fails with this error message (for testing, only). TODO Remove this again? This was really useful in earlier testing, only.
java_class string Java class name for in-process connector on the Java classpath.
fs FileSystemRepository
grpc string Invokes remote connector via gRPC. The "connection string" here is a target endpoint in hostname:port format. (It's NOT an URI, so there is no scheme:// nor any /path/ or #fragment.)

Data

Field Type Label Description
label string Human readable label, may be shown on a UI.
description string Short 1-2 sentences of description, may be shown on a UI e.g. as tooltip.
tags Data.TagsEntry repeated Tags.
type_url string The fully qualified name of the (root) Protocol Buffer Message; see https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/any.proto

Data.TagsEntry

Field Type Label Description
key string
value string

EntityKind

Kind of an Entity, as in message Entity.

Field Type Label Description
id dev.enola.core.ID ID. The ns may be filled in by the reader, if omitted in *-model.textproto. The entity is the name of THIS EntityKind! This is typically never changed anymore after initial creation. The path contains' the segments' names (here, whereas in Entity it's the "values").
label string Human readable label of entity, may be several words, any case. This can easily be changed at any time.
emoji string The Emoji shown as prefix to the name in UIs, if there is no logo.
logo_url string Logo (as URL; either absolute, or URL relative to the model's textproto file location - from where a UI will serve it).
doc_url string Documentation description (as URL; either absolute, or URL relative to the model's textproto file location - from where a UI will serve it).
related EntityKind.RelatedEntry repeated Description of related Entities. The string keys here match Entity#related's.
link EntityKind.LinkEntry repeated Description of URL links. The string keys here match Entity#links's.
data EntityKind.DataEntry repeated Description of data about the Entity, in machine readable form. The string keys here match Entity#data's.
connectors Connector repeated

EntityKind.DataEntry

Field Type Label Description
key string
value Data

EntityKind.LinkEntry

Field Type Label Description
key string
value Link

EntityKind.RelatedEntry

Field Type Label Description
key string
value EntityRelationship

EntityKinds

Field Type Label Description
kinds EntityKind repeated

EntityRelationship

Entity#related map model; its key is the same as this in EntityKind#related.

Field Type Label Description
label string Human readable label, may be shown on a UI.
description string Short 1-2 sentences of description, may be shown on a UI e.g. as tooltip.
id dev.enola.core.ID ID reference to another Entity. This ID's ns/entity/paths fields can contain a template, like Link#uri_template. Alternatively, this can be left empty, and set by connectors.
tags EntityRelationship.TagsEntry repeated Tags.

EntityRelationship.TagsEntry

Field Type Label Description
key string
value string

FileSystemRepository

Field Type Label Description
path string
format FileSystemRepository.Format

Import

Field Type Label Description
types string repeated URLs from where to load additional referenced Types.

Entity#link map model; its key is the same as this in EntityKind#link.

Field Type Label Description
label string Human readable label, may be shown on a UI.
description string Short 1-2 sentences of description, may be shown on a UI e.g. as tooltip.
uri_template string URI template, to create URL. As an ID URI Template (RFC 6570); see https://en.wikipedia.org/wiki/URI_Template. The available variables are the ID's path parameters, as well as a special proto.* which allows to declaratively create links out of the Any proto (instead of coding link generation in the service; which is always still also possible).
tags Link.TagsEntry repeated Tags.

Link.TagsEntry

Field Type Label Description
key string
value string

Property

Field Type Label Description
id uint32
link string Link to something related. Intended both for human consumption in a UI, as well as machine readable linked data relationships. Typically a Template of an (HTML a/href-like) HTTP URL, or enola: URI. Template parameters refer to other properties of the Type.
labels Property.LabelsEntry repeated Human readable label of this property, may be several words, any case. This is a map where the key is an IETF BCP 47 "language code" (like "en" or "de-CH") and the value is text in that language. These can easily be changed at any time without breaking anything in Enola.
doc string Documentation description (as URL; either absolute, or URL relative to the model's location - from where a UI will serve it). TODO Is this a [(dev.enola.type) = "enola.dev/url"]? Really??

Property.LabelsEntry

Field Type Label Description
key string
value string

Type

Unique ID of this Type. For example, "d19974d6-0695-458d-bdd4-3ad89578db92".

This "provides a relatively short yet unambiguous way to refer to a type", as "fully-qualified type names may be large and waste space when transmitted on the wire", and it "lets programmers change the symbolic name while keeping a fixed ID" (inspired by https://capnproto.org/language.html#unique-ids).

It's recommended that this is set by the human author of the Type, but if it's not, it will be automatically generated by hashing the name. (This defeats the purpose of a "permanent" ID - but it's at least possible to set it later, if a name is ever changed.)

TODO "Nicely render" this in the Web UI, using dev.enola.core.ByteSeq. TODO Do we really this, actually? bytes id = 1 [(dev.enola.type) = "enola.dev/id"];

Field Type Label Description
name string Short technical name of this Type. Must be unique within the environment this Enola instance operates. Publicly, using something that looks like an IRI/URI/URL is a simple way for uniqueness. For example, "your.org/something" (which is technically a relative URI, by chance). This string is NOT (necessarily) a valid URL; e.g. you (generally) cannot "http GET your.org/something". As a convenience for humans which type this into their web browser, your.org MAY set up a "redirector" which responds with a 30x to somewhere "interesting" for a human (not a machine), but that's just "nice", nothing more. Enola will never use it as anything else than simply a unique string.
uri string URI Template of instances of this Type. For example, "hello/{message}" - where the parameter "message" refers to a property; so instances would be e.g. "hello/world" and "hello/planets". TODO Rename Type.uri to iri_template! (Because that's what this really is.)
labels Type.LabelsEntry repeated Human readable label of this type, may be several words, any case. This is a map where the key is an IETF BCP 47 "language code" (like "en" or "de-CH") and the value is text in that language. These can easily be changed at any time without breaking anything in Enola.
doc string Documentation description (as URL; either absolute, or URL relative to the model's location - from where a UI will serve it). TODO Is this a [(dev.enola.type) = "enola.dev/url"]? Really??
emoji string The Emoji shown as prefix to the label in UIs, if there is no logo. This is not necessarily unique.
logo_url string Logo (as URL; either absolute, or URL relative to the model's location - from where a UI will serve it).
legacy EntityKind EntityKind. This is from the original Enola design, and may later be removed. TODO Should this really be embedded? Really? Probably better an ID as reference? Good test! string entity_kind = 10 [(dev.enola.type) = "enola.dev/EntityKind"];
proto string Protocol Buffers Message. For example, "google.protobuf.Timestamp". TODO We need to be able to "annotate" (?) Proto descriptors for LD…
string google.protobuf.Empty A "simple type" that "extends" a string. This is useful to add "semantics" to strings; e.g. URL, Email, etc.
binary google.protobuf.Empty A "binary" type, with "content" that's an (unstructured) bytes sequence.
java string
javas string repeated

Type.LabelsEntry

Field Type Label Description
key string
value string

Types

Types are a collection of enola:dev.enola.core.meta.Type.

This is kind of like a https://en.wikipedia.org/wiki/Domain_of_discourse#Universe_of_discourse or the https://en.wikipedia.org/wiki/Universe_(mathematics).

Field Type Label Description
types Type repeated TODO Implement, with @Test! Import import = 1;

FileSystemRepository.Format

Name Number Description
FORMAT_UNSPECIFIED 0
FORMAT_TEXTPROTO 1
FORMAT_YAML 2
FORMAT_JSON 3

Top

java/dev/enola/core/util/enola_util.proto

Log

TODO Log isn't actually used, just yet…

Field Type Label Description
url string
inline Log.Inline

Log.Entry

Field Type Label Description
ts google.protobuf.Timestamp
severity Log.Severity
text string

Log.Inline

Field Type Label Description
entries Log.Entry repeated

Log.Severity

Inspired by https://cloud.google.com/service-infrastructure/docs/service-control/reference/rpc/google.logging.type, but could be extended here, as there is no real direct connection between this and GCP logging.

Name Number Description
SEVERITY_UNSPECIFIED 0 The log entry has no assigned severity level.
SEVERITY_DEBUG 100 Debug or trace information.
SEVERITY_INFO 200 Routine information, such as ongoing status or performance.
SEVERITY_NOTICE 300 Normal but significant events, such as start up, shut down, or a configuration change.
SEVERITY_WARNING 400 Warning events might cause problems.
SEVERITY_ERROR 500 Error events are likely to cause problems.
SEVERITY_CRITICAL 600 Critical events cause more severe problems or outages.
SEVERITY_ALERT 700 A person must take an action immediately.
SEVERITY_EMERGENCY 800 One or more systems are unusable.

Scalar Value Types

.proto Type Notes C++ Java Python Go C# PHP Ruby
double double double float float64 double float Float
float float float float float32 float float Float
int32 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. int32 int int int32 int integer Bignum or Fixnum (as required)
int64 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. int64 long int/long int64 long integer/string Bignum
uint32 Uses variable-length encoding. uint32 int int/long uint32 uint integer Bignum or Fixnum (as required)
uint64 Uses variable-length encoding. uint64 long int/long uint64 ulong integer/string Bignum or Fixnum (as required)
sint32 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. int32 int int int32 int integer Bignum or Fixnum (as required)
sint64 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. int64 long int/long int64 long integer/string Bignum
fixed32 Always four bytes. More efficient than uint32 if values are often greater than 2^28. uint32 int int uint32 uint integer Bignum or Fixnum (as required)
fixed64 Always eight bytes. More efficient than uint64 if values are often greater than 2^56. uint64 long int/long uint64 ulong integer/string Bignum
sfixed32 Always four bytes. int32 int int int32 int integer Bignum or Fixnum (as required)
sfixed64 Always eight bytes. int64 long int/long int64 long integer/string Bignum
bool bool boolean boolean bool bool boolean TrueClass/FalseClass
string A string must always contain UTF-8 encoded or 7-bit ASCII text. string String str/unicode string string string String (UTF-8)
bytes May contain any arbitrary sequence of bytes. string ByteString str []byte ByteString string String (ASCII-8BIT)