Get desktop application:
View/edit binary Protocol Buffers messages
ActivateComponentReply is a reply to an ActivateComponentRequest.
(message has no fields)
ActivateComponentRequest is a request from a weavelet to ensure that the provided component is running somewhere. An ActivateComponentRequest also implicitly signals that a weavelet is interested in receiving routing info for the component via UpdateRoutingInfoRequest.
component name
is the component routed?
AppConfig holds configuration for a Service Weaver application.
Used in:
, , , , ,Application name (derived from binary if missing).
File name of the binary that implements the app.
Arguments to pass to the binary.
Environment variables available to the binary. Every entry should be of the form "key=value". If a key appears more than once, only the last value of the key is used.
Groups of components that must be co-located in the same OS process. This grouping allows the developer a level of control on where the Service Weaver runtime will place each component. For example, suppose that the application binary contains six components: A, B, C, D, E, and F. Furthermore, suppose that the developer specifies the following grouping in the config. colocate = [[A, B], [C, D, E]] In that case, no matter what algorithm the Service Weaver runtime uses to place the components, components A and B will always be grouped together, and components C, D, and E will always be grouped together. This means that a pair of replicas of the components can share in-memory state and communicate efficiently with each other (though not with other replicas). The placement algorithm the Service Weaver runtime uses varies across deployment environment. For example, a multiprocess deployer may choose to place each component into its own group, for maximum parallelism. A singleprocess deployer, on the other hand, may choose to group all of the components together. Regardless of which deployment environment is used, however, this configuration option guarantees that specified components will end up in the same group. Components are identified using their full package paths, e.g.: "github.com/my/project/package/ComponentName" with the exception of the component associated with the application main(), which is identified using the name "main".
A knob that lets the user specifies how many nanoseconds it expects for the rollout to take. This is used internally by Service Weaver to figure out the rollout strategy. If not specified, Service Weaver will pick a default value.
All config sections (includes [serviceweaver], [<deployer>], and [<component>] sections).
Assignment partitions a key space (e.g., the hash space [0, 2^64)) into a set of subregions, called slices, and assigns each slice to a set of replicas.
Used in:
The assignment for a component can change over time. Every one of these assignments is given a monotonically increasing version. Versions are unique for a given component, but not unique across components.
A slice of the key space and the replicas to which it is assigned.
Used in:
Inclusive start key. Strictly greater than the `start` value for the previous entry in the current assignment. The first slice should always set start to 0.
Replicas assigned to host this slice. Every address is of the form "<net>://<addr>" (e.g., "tcp://host:1234", "unix:///tmp/unix.sock").
A group of components.
Used in:
Deployment holds internal information necessary for an application deployment. TODO(mwhittaker): Delete this proto.
Unique identifier for the deployment.
Application configuration.
Run as a single process locally.
ExportListenerReply is a reply to an ExportListenerRequest.
The address of the proxy that forwards traffic to the listener, or empty if there is no proxy.
If non-empty, a non-retriable error. TODO(mwhittaker): This field exists as a hack to avoid a weavelet retrying this error. In the future, we should have a more robust way to avoid retrying certain errors.
ExportListenerRequest is a request from a weavelet to export the provided listener. Exporting a listener typically, but not always, involves running a proxy that forwards traffic to the provided address.
GetHealthReply is a reply to a GetHealthRequest.
GetHealthRequest is a request from an envelope for a weavelet's health.
(message has no fields)
GetListenerAddressReply is a reply to a GetListenerAddressRequest.
address to listen on
GetListenerAddressRequest is a request from a weavelet for the address the weavelet should listen on for a particular listener. Imagine a weavelet calls GetListener with LocalAdress localhost:9000. Here are some examples of how different deployers may handle a GetListenerAddressRequest. - The singleprocess deployer may instruct the weavelet to listen directly on localhost:9000. - The multiprocess deployer may instruct the weavelet to listen on localhost:0. It will separately start a proxy on localhost:9000. - The SSH deployer may instruct the weavelet to listen on $HOSTNAME:0. It will separately start a proxy on localhost:9000.
listener name
GetLoadReply is a reply to a GetLoadRequest.
GetLoadRequest is a request from an envelope for a weavelet's load report.
(message has no fields)
GetMetricsReply is a reply to a GetMetricsRequest. It only contains information about the metrics that have changed since the prior GetMetricsRequest.
GetMetricsRequest is a request from an envelope for a weavelet's metrics. There can only be one outstanding GetMetricsRequest at a time.
(message has no fields)
GetProfileReply is a reply to a GetProfileRequest.
encoded profile data
GetProfileRequest is a request from an envelope for a weavelet to collect and return a profile. Some profile types only support a single profile request at a time and an error will be returned if another profile request is active.
Type of the profile (e.g., heap, cpu).
Duration of CPU profiles, in nanoseconds.
GetSelfCertificateReply is a reply to a GetSelfCertificateRequest.
PEM-encoded blocks containing (1) the certificate identifying the weavelet and (2) the corresponding private key. Used for enforcing mTLS security across components.
certificate identifying the weavelet
private key corresponding to cert
GetSelfCertificateRequest is a request from a weavelet for its certificate and the corresponding private key.
(message has no fields)
HealthStatus specifies the health of a weavelet.
Used in:
InitWeaveletReply is the information provided by a weavelet to an envelope during the initial envelope-weavelet handshake.
Internal TCP address of the weavelet. This address will be passed to other weavelets as part of their RoutingInfo.
The deployer API version of the weavelet.
InitWeaveletRequest holds the initialization info passed to the weavelet by the envelope.
See AppConfig.Sections.
LoadReport contains load information for all routed components hosted by a particular weavelet.
Used in:
load for routed components
ComponentLoad includes load information for a component. The component's key space is divided into a number of slices, each of which is associated with a particular double-valued load. TODO(mwhittaker): In the short term, a weavelet will report one SliceLoad for every slice it is assigned. In the future, however, we may report load in more advanced ways.
Used in:
TODO(mwhittaker): In full generality, load is a generic application-specific double-valued measurement (e.g., total number of requests, size of components in memory). For now to simplify things, we assume load is measured as requests per second.
TODO(mwhittaker): For now, load is reported with respect to a given assignment. When the assignment changes, the load is reset. This approach works for rate-based load like requests per second, but not other non-rate based load like size of cached components.
SliceLoad includes the load of a slice, [start, end).
Used in:
inclusive
exclusive
The "size" of the slice. Given a slice [a, b), it's tempting to think the slice has size b - a. This has a couple of problems. 1. Even if a slice is large, only a few keys in the slice may be used. For example, a weavelet with slice [0, 2^60) may only receive requests for keys in the range [0, 100). 2. a and b are not necessarily numeric. Imagine we are performing range sharding on strings and have the slice ["ccbae", "hhaefi"). What is the size of this slice? We instead measure the "size" of a slice as an estimate of the number of keys accessed in the slice. For example, if a slice [0, 1000) receives requests for keys 0, 1, 2, 3, and 10, then the size of the slice is 5.
SubsliceLoad divides the load of a slice into smaller subslices. For example, given a slice [0, 100) and load 9.0, we may have the following subslices: SubsliceLoad{Start: 0, Load: 3.0} // [0, 20) SubsliceLoad{Start: 20, Load: 3.0} // [20, 80) SubsliceLoad{Start: 80, Load: 3.0} // [80, 100) TODO(mwhittaker): In the future, we likely want to report hot keys as their own slice. Change SubsliceLoad to support that.
Used in:
LogEntry is a log entry. Every log entry consists of a message (the thing the user logged) and a set of metadata describing the message.
Used in:
application name
deployment id
component name
weavelet id
time when logged (microseconds since epoch)
log level (e.g., debug, info, error)
source file
source line
user provided message
User-provided attributes and their associated values. The storage format is a name followed by its value, i.e.: name1, value1, name2, value2, name3, value3, ...
LogEntryBatch is a list of log entries.
MetricDef is the definition of a new metric.
Used in:
metric's unique id
name of the metric
type of metric
metric's help message
metric labels
histogram bucket bounds
MetricSnapshot is a snapshot of a metric. It is the union of a MetricDef and a MetricValue. TODO(mwhittaker): Move out of runtime.proto. It's not used by the pipe.
Used in:
,metric's unique id
name of the metric
type of metric
metric's help message
metric labels
histogram bucket bounds
value for counter and gauge, sum for histogram
histogram counts
MetricType specifies a particular kind of metric.
Used in:
,MetricUpdate contains metric updates.
Used in:
Metric definitions and updated values. All metrics are identified by their globally unique id. Two endpoints exchanging metric updates must ensure that a received metric value has been preceded by a metric definition with the same id, either in the current update or an earlier one.
metric definitions
metric values
MetricValue is the value associated with a metric.
Used in:
metric's unique id.
value for counter and gauge, sum for histogram
histogram counts
ProfileType specifies a type of profile.
Used in:
RoutingInfo contains routing information for a component. A weavelet uses a RoutingInfo to know where to send a remote method call.
Used in:
,If true, perform method calls on the component locally. Replicas and assignment are ignored. Currently, local must always be true or always be false for a given component.
The addresses of the weavelets hosting a replica of the component. Every address is of the form "<net>://<addr>" (e.g., "tcp://host:1234", "unix:///tmp/unix.sock"). For non-local components, a weavelet will execute method calls on one of these replicas.
Routing assignment, if the component is routed.
SemVer represents a [semantic version][1] of the form "<major>.<minor>.<patch>". For example, the semver "0.12.3" has major=0, minor=12, and patch=3. [1]: https://semver.org/
Used in:
Span is a proto-based representation of an open-telemetry Span [1]. [1]: https://opentelemetry.io/docs/concepts/signals/traces/#spans TODO(spetrovic): Rename to TraceSpan.
Used in:
Span name
Span trace id, 16 bytes long.
Unique span id, 8 bytes long.
Parent span id, 8 bytes long
Span start time (microseconds since epoch)
Span end time (microseconds since epoch)
Links to other spans
Events that occured in the span's lifetime
Span status
Instrumentation library that created the span
Number of span attributes dropped due to limits being reached.
Number of links dropped due to limits being reached.
Number of events dropped due to limits being reached.
Number of spans that consider this span a direct parent.
Span attributes.
Used in:
, , ,Used in:
Attribute type
Used in:
Used in:
Type describes the type of the value.
Used in:
Used when no value is set
Event represent an event that occurred in the span's lifetime.
Used in:
Even name
Time event was recorded (micros since epoch)
Event attributes
Number of attributes dropped due to limits being reached.
Span's role in the trace.
Used in:
Library stores information about the instrumentation library that created the span.
Used in:
Name of the instrumentation library, typically the package name of the library.
The version of the instrumentation library
Schema url of the telemetry emitted by library
Link represents the link a span has to another span.
Used in:
Span trace id
Unique span id
Span attributes
Number of span attributes dropped due to limits being reached
Resource describes an entity (e.g., a Service Weaver component) this span belongs to.
Used in:
URL that describes the shape and a composition of data for this span.
Resource attributes
Scope stores information about the instrumentation scope that created the span.
Used in:
Name of the instrumentation library, typically the package name of the library.
The version of the instrumentation scope
Schema url of the telemetry emitted by scope
Status represents the status for a span.
Used in:
Span status code
Error text; set only for an ERROR code
Used in:
TraceSpans is a list of Span messages.
UpdateComponentsReply is a reply to an UpdateComponentsRequest.
(message has no fields)
UpdateComponentsRequest is a request from an envelope to the weavelet to update the set of components it should be running. Currently, the set of components must only ever increase over time.
UpdateRoutingInfoReply is a reply to an UpdateRoutingInfoRequest.
(message has no fields)
UpdateRoutingInfoRequest is a request from an envelope to the weavelet to update its routing information for a particular component.
VerifyClientCertificateReply is a reply to a VerifyClientCertificateRequest. If the client certificate cannot be verified, an error should be returned rather than an empty reply.
The set of components hosted by the weavelet that the client is allowed to invoke methods on.
VerifyClientCertificateRequest is a request from a weavelet to verify the identity of a client that is attempting to connect to the weavelet.
Client's certificate chain. Each certificate in the chain is represented as a DER-encoded ASN.1 structure.
VerifyServerCertificateReply is a reply to a VerifyServerCertificateRequest.
(message has no fields)
VerifyServerCertificateRequest is a request from a weavelet to verify the identity of the server it is attempting to connect to.
Server's certificate chain. Each certificate in the chain is represented as a DER-encoded ASN.1 structure.
Name of the component the server is meant to be hosting.
WeaveletArgs is the information provided by an envelope to a weavelet when the weavelet is created.
app name
globally unique deployment id
globally unique weavelet id
run the main function?
Should weavelets establish mTLS connections with each other?
Address on which the weavelet's internal network listener should listen on (e.g., "localhost:12345", ":0"). If the address is empty, it defaults to ":0", like net.Listen. Note that for some deployers, the internal network listener can listen on an arbitrary port (don't set the port number). However, for deployers where listeners are prestarted (e.g., Kubernetes deployers), the port number should be propagated from the deployer.
Unix domain socket path where weavelet should serve Control component method calls.
A redirect entry instructs the weavelet to direct calls made to component to be instead sent to the component named target at the specified address.
Used in: