ulo
ulo
Documentation

Start here

Coming from NestJSNestJS topics, mapped

The model

Protocols

OverviewRPC controllersStreamingClientDeadlinesServerLinksTCPUDPNATSRedisRabbitMQMQTTKafka

Integrations

Operating

Reference

Microservices

UDP

The UDP link, one frame per datagram, for unary calls and events.

The UDP link sends one frame per datagram and replies to the sender's address.

app.bind(ulo_rpc::Server::new(ulo_rpc_udp::Udp::new("0.0.0.0:7001")));

What it does not do

  • Streams. Only unary calls and events. A server that mounts a handler with a streamed shape is refused when it prepares, and a client refuses stream, send_stream and duplex before any I/O with Unimplemented and the reason shape_unsupported. request is the call for one reply.
  • Delivery. Datagrams are unordered and nothing is retried. A lost request or reply is the caller's Timeout.
  • Large payloads. A frame is at most 65,507 bytes, envelope included. A larger payload fails with BadRequest and the reason payload_too_large.
  • TLS. DTLS is not supported and Udp has no tls method.
  • Host names. The endpoint is an IP address and port. The link resolves no host name, and an inherited socket is refused because the activation adopts listening TCP sockets only.

Settings

MethodEffect
Udp::new(endpoint)text, a SocketAddr or an Endpoint
codec(Codec)JSON by default; Codec::Cbor carries raw bytes
with_handle(Handle)the tokio runtime for the link's sockets and tasks, when it is built outside one

Behaviour shared with TCP

The server answers a pattern with no handler itself: unavailable, reason pattern_unhandled. Calls are addressed to a server, max_inflight applies, and at the drain the server answers unavailable to every request its socket already holds.

A datagram that arrives after the socket has closed reaches no one, and its caller sees its own Timeout. The link declares its drain unconfirmed for that reason.

TCP

The TCP link, frames multiplexed over one connection, with a tokio and a smol implementation.

NATS

The NATS link, queue-group subscriptions, inbox replies and no-responders.

On this page

What it does not doSettingsBehaviour shared with TCP