Skip to content

Communication

František Bereň edited this page Sep 18, 2026 · 2 revisions

Communication

Eighteen projects for talking to other systems — over the network, or over a wire to hardware. Use only what you need; they are independent of the data layer.

Network protocols

Protocol Client Server
REST / HTTP Birko.Communication.REST .REST.Server
gRPC .gRPC .gRPC.Server
GraphQL .GraphQL (queries, mutations, subscriptions) —
SOAP .SOAP —
WebSocket .WebSocket —
Server-Sent Events .SSE —
OAuth .OAuth, .OAuth.Providers (GitHub device flow) —
ASP.NET integration .AspNetCore —

REST in practice

using Birko.Communication.REST;

// cached per base URI — call it again with the same URI and you get the same instance
var client = RestClient.GetClient("https://api.example.com");

var json = client.Get("/products");
var made = client.Post("/products", """{"name":"Widget"}""");
           client.Put("/products/1", body);
           client.Delete("/products/1");
           client.Patch("/products/1", body);

// async equivalents
var async = await client.GetAsync("/products");

Each verb also takes optional headers and a query string:

client.Get("/products", queryString: "page=2", headers: new() { ["X-Tenant"] = tenantId });

💡 GetClient caches one RestClient per base URI for the process, so you do not create an HttpClient per call. Use RestClient.ClearCache() in tests.

Hardware and device protocols

Project For
.Network raw TCP/UDP, including multicast
.Modbus industrial PLCs
.Bluetooth BLE devices
.NFC tag read/write
.IR infrared
.Camera capture
.Hardware serial ports and general device access

These pull real hardware dependencies (System.IO.Ports and similar), which is a good reason to keep them in a separate aggregator if you split yours by layer.

Messaging

Separate from request/response — see also Workflow and Background Jobs:

  • Birko.MessageQueue — queue abstraction, with InMemory, Redis and MQTT backends
  • Birko.EventBus — publish/subscribe, with an outbox pattern for transactional delivery
  • Birko.Messaging — templated messages (email and similar), with a Razor renderer

Next

  • Security — authenticating the calls you make and serve
  • AI and LLM — provider calls are built on this layer

Clone this wiki locally