relay_server library

Relay server library for CRDT Socket Sync.

A relay server rebroadcasts opaque CRDT change blobs to the other clients of a room and persists them in a RelayStore, without ever interpreting CRDT data: merging is entirely a client concern.

Classes

AwarenessMessage
base class for awareness messages
AwarenessQueryMessage
message to query the awareness state
AwarenessStateMessage
message with the awareness state
AwarenessUpdateMessage
message to update the awareness state
ClientAwareness
Client awareness state
ClientSession
Client session on server
CompressedCodec<T>
Codec for messages with optional compression
Compressor
Interface for data compression
CRDTSocketServer
CRDT socket server interface
DocumentAwareness
Document awareness state
ErrorMessage
Error message.
InMemoryRelayStore
In-memory RelayStore implementation.
JsonMessageCodec<T>
A message codec that uses JSON for serialization.
Message
Base class for all messages exchanged over a connection.
MessageCodec<T>
Interface for encoding and decoding messages
MessageTypeValue
Marker interface for a message type's integer code.
NoCompression
No compression implementation
OutboundQueue
A serialized, byte-bounded outbound send queue.
PingMessage
Ping message to check the connection.
PluginAwareMessageCodec
A message codec that can be used to encode and decode messages for a list of MessageCodecs.
PongMessage
Pong message.
Protocol
Class that handles the communication protocol.
RelayAckMessage
Acknowledgement of a RelayPushMessage, relay to client.
RelayChangesMessage
Change blobs rebroadcast from relay to the other clients in the room.
RelayClientSession
Relay client session on server.
RelayCompactionCoordinator
Decides when the relay asks a client to upload a snapshot to compact a room log.
RelayHelloMessage
Join request sent from client to relay after connecting.
RelayLogEntry
One persisted opaque change blob of a relay room log.
RelayMessage
Base class for relay messages.
RelayProtocol
Constants of the relay protocol.
RelayPushMessage
Change blobs pushed from client to relay.
RelaySessionEvent
Base class for the relay session events.
RelaySessionEventChangesPushed
Session event for change blobs pushed to a relay room.
RelaySessionEventJoined
Session event for a client that joined a relay room.
RelaySessionEventSnapshotUploaded
Session event for a snapshot uploaded to compact a relay room log.
RelaySnapshotRecord
The latest snapshot of a relay room.
RelaySnapshotUploadMessage
Snapshot uploaded from client to relay to compact the room log.
RelayStateRequestMessage
Request the current room state, client to relay.
RelayStore
Pluggable, CRDT-agnostic persistence for relay rooms.
RelayWelcomeMessage
Join response sent from relay to client.
ServerAwarenessEvent
server awareness event
ServerAwarenessPlugin
Server awareness plugin.
ServerEvent
Class representing a server event
ServerSyncPlugin
Base class for all server plugins.
SessionEvent
Session event.
SessionEventGeneric
Session event for a generic shared event (error, ping, disconnect).
SessionEventTypeValue
Marker interface for the type of a SessionEvent.
SyncPlugin
Base class for all server and client plugins.
Transport
An interface for transporting messages, define the methods necessary to send and receive messages, independently from the underlying transport mechanism.
TransportConnection
An interface for transporting messages, define the methods necessary to send and receive messages, independently from the underlying transport mechanism.
TransportConnector
An interface for the transport connection

Enums

AwarenessMessageType
Awareness message types
MessageType
Core protocol message types (range 0-19).
RelayMessageType
Relay message types (range 20-39).
RelaySessionEventType
Session event types of the relay protocol.
ServerAwarenessEventType
server awareness event type
ServerEventType
Enum representing the server event types
SessionEventType
Session event types shared by every communication mode.

Mixins

SocketServerProvider
A provider that provide the server instance.

Exceptions / Errors

OutboundBufferOverflow
Thrown when an OutboundQueue would exceed its byte bound.