<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: John Davis</title>
    <description>The latest articles on DEV Community by John Davis (@unicomp21).</description>
    <link>https://dev.to/unicomp21</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4220958%2Fa89f6130-c5de-4f78-b194-bfbe014f3374.jpg</url>
      <title>DEV Community: John Davis</title>
      <link>https://dev.to/unicomp21</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/unicomp21"/>
    <language>en</language>
    <item>
      <title>Packed structs on the wire, now in the browser: Cap'n-Proto-style gRPC without giving up protobuf</title>
      <dc:creator>John Davis</dc:creator>
      <pubDate>Mon, 23 Nov 2026 22:58:59 +0000</pubDate>
      <link>https://dev.to/unicomp21/packed-structs-on-the-wire-now-in-the-browser-capn-proto-style-grpc-without-giving-up-protobuf-17oi</link>
      <guid>https://dev.to/unicomp21/packed-structs-on-the-wire-now-in-the-browser-capn-proto-style-grpc-without-giving-up-protobuf-17oi</guid>
      <description>&lt;p&gt;v0.46.0 of grpc-over-datachannels closes the last gap in the&lt;br&gt;
struct codec story: the packed, Cap'n-Proto-style wire format&lt;br&gt;
that native languages got in v0.45 now works in every&lt;br&gt;
browser-tier language too — JavaScript, Python, Lua, PHP, and&lt;br&gt;
Ruby — and in the Wasm builds of Swift, Dart, C++, Zig,&lt;br&gt;
Kotlin, and Scala.&lt;/p&gt;

&lt;p&gt;Quick refresher on the design. Protobuf is, and remains, the&lt;br&gt;
default wire format and the interop format. But on&lt;br&gt;
low-latency internal paths — kernel-bypass adapters,&lt;br&gt;
latency-sensitive fan-outs, hot loops where protobuf's&lt;br&gt;
varint/tag walk is the cost — you can opt a message into a&lt;br&gt;
second codec at generation time:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight protobuf"&gt;&lt;code&gt;&lt;span class="c1"&gt;// protoc --grpc-dc-js_opt=struct_codec=true ...&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Generated messages gain &lt;code&gt;marshalStruct()&lt;/code&gt; / &lt;code&gt;unmarshalStruct()&lt;/code&gt;&lt;br&gt;
companions emitting the packed DCS1 layout: a small header&lt;br&gt;
(magic, length, schema fingerprint, presence bitmap), one&lt;br&gt;
fixed slot per field in field-number order, then a variable&lt;br&gt;
area for strings, nested messages, repeated elements, and&lt;br&gt;
sorted map entries. No tags, no varints on the hot path; field&lt;br&gt;
access is offset arithmetic.&lt;/p&gt;

&lt;p&gt;Opt-in is per endpoint, never silent:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="n"&gt;channel&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setStructCodec&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// client&lt;/span&gt;
&lt;span class="n"&gt;server&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setStructCodec&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;  &lt;span class="c1"&gt;// server&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The client marks the call with &lt;code&gt;dc-codec: struct-v1&lt;/code&gt; HEADERS;&lt;br&gt;
a server that hasn't enabled it answers UNIMPLEMENTED rather&lt;br&gt;
than quietly falling back. Protobuf servers and clients that&lt;br&gt;
never heard of any of this keep working untouched — that's&lt;br&gt;
the point of negotiating at the edges: structs inside,&lt;br&gt;
protobuf at the boundary, transcode where they meet.&lt;/p&gt;

&lt;p&gt;The browser implementations are pure, descriptor-driven&lt;br&gt;
transcoders over each language's existing dynamic protobuf&lt;br&gt;
model — no native bridge, which is exactly why they also work&lt;br&gt;
in Wasm, where there is no cdylib to call into. Every&lt;br&gt;
implementation is proven byte-identical against a Go golden:&lt;br&gt;
the conformance corpus (&lt;code&gt;scripts/test-struct-corpus.py&lt;/code&gt;) now&lt;br&gt;
admits 21 drivers, all passing, and v0.46 extends it with a&lt;br&gt;
second, proto2 shape covering explicit defaults, unpacked&lt;br&gt;
repeated fields, and extensions (which ride the&lt;br&gt;
unknown-fields tail verbatim).&lt;/p&gt;

&lt;p&gt;Also in this release: a third Google interop peer. After&lt;br&gt;
grpc-java and grpc-go, &lt;code&gt;oracle/dart-interop&lt;/code&gt; runs the&lt;br&gt;
canonical gRPC interop cases over google's grpc-dart runtime&lt;br&gt;
in both directions, and every language suite now exercises&lt;br&gt;
grpc-java, grpc-go, and grpc-dart clients against its&lt;br&gt;
generated server, plus its generated client against all three&lt;br&gt;
servers.&lt;/p&gt;

&lt;p&gt;If you generate stubs in the browser playground, struct&lt;br&gt;
generation is available there too — the pure transcoders ship&lt;br&gt;
in the bundled runtimes, so what you download runs as-is.&lt;/p&gt;

&lt;p&gt;Release notes and packages (npm, PyPI, pub.dev, crates.io,&lt;br&gt;
NuGet, Maven, RubyGems, LuaRocks, JSR):&lt;br&gt;
&lt;a href="https://github.com/browser-grpc/grpc-over-datachannels/releases/tag/v0.46.0" rel="noopener noreferrer"&gt;https://github.com/browser-grpc/grpc-over-datachannels/releases/tag/v0.46.0&lt;/a&gt;&lt;/p&gt;

</description>
      <category>grpc</category>
      <category>webrtc</category>
      <category>webdev</category>
      <category>performance</category>
    </item>
    <item>
      <title>One WebRTC stack, sixteen languages: deleting the mirrors</title>
      <dc:creator>John Davis</dc:creator>
      <pubDate>Thu, 19 Nov 2026 18:53:09 +0000</pubDate>
      <link>https://dev.to/unicomp21/one-webrtc-stack-sixteen-languages-deleting-the-mirrors-5g6f</link>
      <guid>https://dev.to/unicomp21/one-webrtc-stack-sixteen-languages-deleting-the-mirrors-5g6f</guid>
      <description>&lt;p&gt;grpc-over-datachannels started the way most multi-language&lt;br&gt;
projects do: one WebRTC stack (ICE, DTLS, SCTP) written in&lt;br&gt;
Rust, then mirrored by hand into Go and JavaScript so each&lt;br&gt;
native stack could run standalone. Three implementations&lt;br&gt;
of the same protocols, kept in sync by discipline and a&lt;br&gt;
conformance suite.&lt;/p&gt;

&lt;p&gt;That discipline already failed once. In v0.32 a fragment&lt;br&gt;
reassembly bug — fragments merged across a message&lt;br&gt;
boundary — wedged ordered delivery in one stack while the&lt;br&gt;
others were fine. The fix taught us the actual lesson: the&lt;br&gt;
state machines that must not drift should not exist three&lt;br&gt;
times. So 0.44.0 deletes two of them.&lt;/p&gt;

&lt;h3&gt;
  
  
  Sans-io cores, two consumption shapes
&lt;/h3&gt;

&lt;p&gt;The Rust stack was already mostly pump-driven: feed a&lt;br&gt;
datagram in, get packets and events out, no sockets or&lt;br&gt;
threads inside. We finished that extraction for all three&lt;br&gt;
protocols:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;SCTP: &lt;code&gt;dc-sctp-ffi&lt;/code&gt; (C ABI) + &lt;code&gt;dc-sctp-wasm&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;DTLS: the handshake lifted into a resumable flight
machine (&lt;code&gt;DtlsHandshake&lt;/code&gt;), &lt;code&gt;dc-dtls-ffi&lt;/code&gt; + &lt;code&gt;dc-dtls-wasm&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;ICE: the agent turned out to be sans-io already;
gathering/TURN/mDNS were always host-side. &lt;code&gt;dc-ice-ffi&lt;/code&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;dc-ice-wasm&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Go consumes the cores through cgo behind small seams&lt;br&gt;
(&lt;code&gt;sctpAssoc&lt;/code&gt;, &lt;code&gt;DtlsConn&lt;/code&gt;, the &lt;code&gt;IceAgent&lt;/code&gt; API). JavaScript&lt;br&gt;
consumes the same cores compiled to Wasm. The browser&lt;br&gt;
bridge and every generated facade language ride the same&lt;br&gt;
Rust runtime. There is now exactly one SCTP, one DTLS,&lt;br&gt;
and one ICE implementation in the project.&lt;/p&gt;

&lt;p&gt;The honest cost: about 311 ns per delivered message&lt;br&gt;
across the FFI versus 173 ns for the old mirrored Go&lt;br&gt;
stack. We measured it, and we'd pay it again: it's the&lt;br&gt;
price of one conformance-tested implementation instead of&lt;br&gt;
three that can drift. Throughput on the echo path is&lt;br&gt;
~8,300 messages/second at 0.36 ms mean RTT (mux_bench).&lt;/p&gt;

&lt;h3&gt;
  
  
  Flipping the defaults found the bugs
&lt;/h3&gt;

&lt;p&gt;The mirrors stayed as the default until every consumer&lt;br&gt;
was wired. Flipping Go and JS to the Rust cores — then&lt;br&gt;
deleting the mirrors — is where the interesting failures&lt;br&gt;
lived:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The DTLS pump that died on &lt;code&gt;undefined&lt;/code&gt;.&lt;/strong&gt; In the Wasm
adapter, one non-application DTLS record (a session
ticket) mapped Rust's &lt;code&gt;None&lt;/code&gt; to JavaScript &lt;code&gt;undefined&lt;/code&gt;,
the receive check tested only for &lt;code&gt;null&lt;/code&gt;, and every
endpoint pump threw. Sequential tests passed; eight
concurrent rendezvous dials killed all eight pumps.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The 64-packet queue.&lt;/strong&gt; Bursty MiB messages overflowed
the peer's small DTLS demux queue; the drops became SCTP
retransmit storms and truncated chunk echoes — but only
on the (slightly slower) FFI path. The queue is 4096
deep now, and there's a permanent queued tail-drop
blast regression test in the Rust suite.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A registry test that raced itself.&lt;/strong&gt; Two client
endpoints shared one in-memory transport and raced for
frames; it hung for 9m56s in GitHub CI before timing
out (that failure is what the current public CI red was
sitting on). One transport pair per client; fixed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Public CI archaeology.&lt;/strong&gt; The generated repos' Go,
browser, and interop jobs each needed the cores built
before use — three generator fixes, shipped as export
fixups.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Oracles without mirrors
&lt;/h3&gt;

&lt;p&gt;Deleting a second implementation deletes your differential&lt;br&gt;
oracle, so the conformance net is now mirror-free by&lt;br&gt;
design: OpenSSL differentials for DTLS (&lt;code&gt;dtls_openssl&lt;/code&gt;,&lt;br&gt;
&lt;code&gt;crypto_openssl&lt;/code&gt;), the shared SCTP vectors through every&lt;br&gt;
surface, the ICE consent/trickle suites against the core,&lt;br&gt;
and full Go + JS suites that only have the Rust path to&lt;br&gt;
run on. &lt;code&gt;make ci-status&lt;/code&gt; sweeps the generated repos'&lt;br&gt;
CI in one command; it's all green on v0.44.0.&lt;/p&gt;

&lt;p&gt;The mirrors totaled roughly 4,400 lines of Go and&lt;br&gt;
JavaScript. What's left is one stack, maintained once,&lt;br&gt;
spoken everywhere.&lt;/p&gt;

</description>
      <category>grpc</category>
      <category>webrtc</category>
      <category>rust</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Authenticating a rendezvous server with passkeys, and a Kafka client in every language</title>
      <dc:creator>John Davis</dc:creator>
      <pubDate>Tue, 17 Nov 2026 10:19:36 +0000</pubDate>
      <link>https://dev.to/unicomp21/authenticating-a-rendezvous-server-with-passkeys-and-a-kafka-client-in-every-language-129h</link>
      <guid>https://dev.to/unicomp21/authenticating-a-rendezvous-server-with-passkeys-and-a-kafka-client-in-every-language-129h</guid>
      <description>&lt;p&gt;Two releases of grpc-over-datachannels landed together&lt;br&gt;
this month, and they share a theme: closing the "yes, but&lt;br&gt;
in production?" gaps. 0.42.0 adds authentication and&lt;br&gt;
authorization to the rendezvous server. 0.41.0 extracts&lt;br&gt;
the Kafka client into its own native library with wrappers&lt;br&gt;
in every language we generate for.&lt;/p&gt;
&lt;h3&gt;
  
  
  Who is allowed to open a channel?
&lt;/h3&gt;

&lt;p&gt;The rendezvous server brokers peer introductions, and&lt;br&gt;
until now it trusted any caller who could reach it. It can&lt;br&gt;
now require an HMAC-SHA256 bearer token on every call:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;base64url(protobuf claims) + "." + base64url(HMAC-SHA256)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The claims are &lt;code&gt;sub/iss/aud/exp/nbf/iat/scopes[]/jti&lt;/code&gt; —&lt;br&gt;
one wire layout, implemented identically in the generated&lt;br&gt;
JS, Go, and Rust servers and pinned by a single shared&lt;br&gt;
test vector, so a token minted for one stack validates on&lt;br&gt;
the other two. Verification happens before dispatch: bad,&lt;br&gt;
missing, or expired tokens fail &lt;code&gt;UNAUTHENTICATED&lt;/code&gt;; a valid&lt;br&gt;
token without the scope a method needs fails&lt;br&gt;
&lt;code&gt;PERMISSION_DENIED&lt;/code&gt;. Required scopes are a per-method-path&lt;br&gt;
map in the serve options, and verified claims reach the&lt;br&gt;
handler (&lt;code&gt;ctx.claims&lt;/code&gt; in JS, &lt;code&gt;ClaimsFromContext&lt;/code&gt; in Go,&lt;br&gt;
&lt;code&gt;CallCtx.claims&lt;/code&gt; in Rust). Clients attach tokens per call&lt;br&gt;
with &lt;code&gt;rendezvousChannel(descriptor, { token | getToken })&lt;/code&gt;,&lt;br&gt;
so token refresh is a callback, not a rebuild. Auth is&lt;br&gt;
rendezvous-only by design — there is no protoc option,&lt;br&gt;
because the DataChannel itself is the authenticated&lt;br&gt;
channel once the introduction is made.&lt;/p&gt;

&lt;p&gt;Where do tokens come from? &lt;code&gt;examples/rendezvous-auth/&lt;/code&gt; is&lt;br&gt;
a stdlib-only WebAuthn issuer in Node: it verifies passkey&lt;br&gt;
registration and login over HTTPS and mints rendezvous&lt;br&gt;
tokens. The rendezvous server never sees WebAuthn data —&lt;br&gt;
it checks HMACs, the issuer checks passkeys, and the two&lt;br&gt;
meet only at the shared secret. A browser-free synthetic&lt;br&gt;
credential test covers the ceremony end to end.&lt;/p&gt;

&lt;h3&gt;
  
  
  One Kafka client, every language
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;browser-grpc/kafka-native&lt;/code&gt; is the in-process Kafka&lt;br&gt;
protocol client extracted from the kafka-proxy sidecar,&lt;br&gt;
published as a Rust crate and a Python wheel via Trusted&lt;br&gt;
Publishing. Every native wrapper binds the same C ABI&lt;br&gt;
(&lt;code&gt;kafka_native_new_v2&lt;/code&gt;, with SASL PLAIN/SCRAM and TLS):&lt;br&gt;
Python, Ruby (Fiddle), Dart (dart:ffi), C# (P/Invoke),&lt;br&gt;
Java (JNI), PHP (FFI), JavaScript (N-API), and Go (cgo).&lt;br&gt;
The generated &lt;code&gt;kafka-grpc&lt;/code&gt; clients and the in-process form&lt;br&gt;
factor cross-check each other record-for-record in a&lt;br&gt;
differential gate — all compression codecs, consumer&lt;br&gt;
groups, offsets — and since 0.42.0 the KIP-932 share-group&lt;br&gt;
session RPCs (&lt;code&gt;OpenShareGroup&lt;/code&gt;, &lt;code&gt;SharePoll&lt;/code&gt;, &lt;code&gt;ShareAck&lt;/code&gt;,&lt;br&gt;
&lt;code&gt;CloseShareGroup&lt;/code&gt;) dispatch through the FFI too, matching&lt;br&gt;
the proxy surface in every generated wrapper. KIP-848&lt;br&gt;
next-generation consumer groups (server-side assignment,&lt;br&gt;
epoch fencing) are in, with the classic protocol as&lt;br&gt;
automatic fallback.&lt;/p&gt;

&lt;p&gt;The pattern worth stealing: generate the protocol once,&lt;br&gt;
bind it everywhere, and make the form factors grade each&lt;br&gt;
other's homework in CI. Two independent paths to the same&lt;br&gt;
broker leave very few places for a bug to hide.&lt;/p&gt;

&lt;p&gt;Both releases are live on npm, PyPI, pub.dev, crates.io,&lt;br&gt;
NuGet, Maven Central, RubyGems, LuaRocks, and JSR. If you&lt;br&gt;
put rendezvous auth in front of a real deployment, we'd&lt;br&gt;
like to hear which scopes you ended up needing — the&lt;br&gt;
per-method map is deliberately boring, and boring is what&lt;br&gt;
you want from an authorization surface.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Watch:&lt;/strong&gt; &lt;a href="https://youtu.be/KJ98a4ApZ4E" rel="noopener noreferrer"&gt;Kafka over gRPC: a Rust Kafka proxy with generated clients&lt;/a&gt; · &lt;a href="https://youtu.be/PujUnQyxKWg" rel="noopener noreferrer"&gt;A generated event bus over gRPC&lt;/a&gt; · &lt;a href="https://www.youtube.com/@JohnDavis-jf3on" rel="noopener noreferrer"&gt;John Davis on YouTube&lt;/a&gt;&lt;/p&gt;

</description>
      <category>grpc</category>
      <category>webrtc</category>
      <category>security</category>
      <category>kafka</category>
    </item>
    <item>
      <title>gRPC over DataChannels 0.43.0: host/plugin support and packet-loss instrumentation</title>
      <dc:creator>John Davis</dc:creator>
      <pubDate>Tue, 17 Nov 2026 10:09:56 +0000</pubDate>
      <link>https://dev.to/unicomp21/grpc-over-datachannels-0430-hostplugin-support-and-packet-loss-instrumentation-3a0p</link>
      <guid>https://dev.to/unicomp21/grpc-over-datachannels-0430-hostplugin-support-and-packet-loss-instrumentation-3a0p</guid>
      <description>&lt;p&gt;0.43.0 of grpc-over-datachannels is out. Two headline&lt;br&gt;
features: a host/plugin model that lets one public endpoint&lt;br&gt;
serve out-of-process plugins (a community request, issue&lt;/p&gt;

&lt;h1&gt;
  
  
  2), and unified packet-loss instrumentation that follows a
&lt;/h1&gt;

&lt;p&gt;call across the SCTP, TCP, and HTTP/2 legs of its path.&lt;/p&gt;

&lt;h3&gt;
  
  
  One endpoint, many plugin processes
&lt;/h3&gt;

&lt;p&gt;The request was simple to state: expose one grpc-dc&lt;br&gt;
endpoint, and let independent processes register services&lt;br&gt;
on it at runtime, without recompiling the host. 0.43.0&lt;br&gt;
builds that from pieces the runtimes already had:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;IPC transports.&lt;/strong&gt; The Rust, JS, and Go runtimes speak
one length-prefixed framing over stdio and Unix domain
sockets, so a plugin is just a grpc-dc server whose
transport is a pipe instead of a DataChannel.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Runtime registration.&lt;/strong&gt; Servers can register and
unregister services after &lt;code&gt;serve()&lt;/code&gt; starts, in all three
runtimes — a plugin connecting is a registration, a
plugin exiting is an unregistration.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Interceptor chains.&lt;/strong&gt; Server interceptors compose in
order; the rendezvous auth check from 0.42.0 is the
built-in first interceptor. JS interceptors can supply
verified claims to handlers; Go interceptors can replace
the call context.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;DC-to-DC routing.&lt;/strong&gt; A host forwards by path prefix
(&lt;code&gt;route_prefix&lt;/code&gt;), so &lt;code&gt;/my.PluginService/&lt;/code&gt; can live in
another process — or behind another DataChannel — while
everything else stays local.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Discovery.&lt;/strong&gt; The well-known &lt;code&gt;grpcdc.registry.v1.Registry&lt;/code&gt;
service lists registered services and returns their
descriptors, so dynamic clients can call plugin services
with no codegen.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The reference deployment is &lt;code&gt;examples/plugin-host&lt;/code&gt;: a Rust&lt;br&gt;
host with a Node plugin process. Plugin lifecycle (spawn,&lt;br&gt;
restart, upgrade) deliberately stays the host&lt;br&gt;
application's job — the runtime provides the seams, not a&lt;br&gt;
process manager. SPEC.md documents the model.&lt;/p&gt;

&lt;h3&gt;
  
  
  Packet loss, measured on every leg
&lt;/h3&gt;

&lt;p&gt;DataChannels don't lose packets the way TCP does — SCTP&lt;br&gt;
retransmits inside the association — so "is my call slow&lt;br&gt;
because of loss?" previously had no answer from the&lt;br&gt;
runtime. Now every SCTP association reports&lt;br&gt;
&lt;code&gt;AssociationStats&lt;/code&gt;: packets and chunks sent/received,&lt;br&gt;
retransmits split fast vs timeout, duplicates received.&lt;br&gt;
One &lt;code&gt;LinkStats&lt;/code&gt; snapshot unifies that with the TCP leg&lt;br&gt;
(wire-level counters from the smoltcp sidecar) and the&lt;br&gt;
HTTP/2 leg (frames, streams, flow-control stalls), all&lt;br&gt;
mirroring the same field shape the generated stats types&lt;br&gt;
already used. A live gate exercises all three legs of one&lt;br&gt;
call and asserts the counters move.&lt;/p&gt;

&lt;h3&gt;
  
  
  Also in 0.43.0
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Rendezvous coverage grew teeth: TURN through a real
coturn and STUN browser legs against the Go listener,
rendezvous over IPv6, browser auth against Go and Rust
servers, and adversarial listener tests (garbage input,
12-peer demux). One finding for coturn users: loopback
listeners also need &lt;code&gt;--allow-loopback-peers&lt;/code&gt;, or relay
candidates silently never work (issue #1, a config fix,
now regression-tested).&lt;/li&gt;
&lt;li&gt;Kafka differentials now run in five languages (Python,
JS, Go, Dart, C#): transactional produce through one form
factor, read-committed consume through the other.&lt;/li&gt;
&lt;li&gt;Crypto cross-checks against OpenSSL (P-256 both
directions, P-384 ECDH, TLS 1.2 client handshake), and
every export now ships CONTRIBUTING/SECURITY community
files.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Packages for this release are live on npm (grpc-dc,&lt;br&gt;
kafka-grpc, eventbus-grpc), PyPI, pub.dev, crates.io,&lt;br&gt;
NuGet, Maven Central, RubyGems, LuaRocks, and JSR, with&lt;br&gt;
GitHub Packages mirrors, and generated runtimes for Rust,&lt;br&gt;
Go, JS, Python, Java, C#, C++, Swift, Kotlin, Dart, Zig,&lt;br&gt;
Lua, Ruby, PHP, Scala, and C. If you build a plugin host,&lt;br&gt;
we'd like to hear what lifecycle model you wrap around it —&lt;br&gt;
that part is intentionally yours.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Watch:&lt;/strong&gt; &lt;a href="https://youtu.be/LwrXpnlMlgA" rel="noopener noreferrer"&gt;gRPC over WebRTC DataChannels&lt;/a&gt; · &lt;a href="https://youtu.be/VB24tRXPTdE" rel="noopener noreferrer"&gt;WebRTC-Direct: gRPC peers with no signaling server&lt;/a&gt; · &lt;a href="https://www.youtube.com/@JohnDavis-jf3on" rel="noopener noreferrer"&gt;John Davis on YouTube&lt;/a&gt;&lt;/p&gt;

</description>
      <category>grpcwebrtcrustwebdev</category>
    </item>
    <item>
      <title>gRPC over DataChannels 0.40.0: distributed tracing (beta), a Rust TCP proxy, and a browser-safe SCTP</title>
      <dc:creator>John Davis</dc:creator>
      <pubDate>Mon, 09 Nov 2026 14:07:02 +0000</pubDate>
      <link>https://dev.to/unicomp21/grpc-over-datachannels-0400-distributed-tracing-beta-a-rust-tcp-proxy-and-a-browser-safe-sctp-10ob</link>
      <guid>https://dev.to/unicomp21/grpc-over-datachannels-0400-distributed-tracing-beta-a-rust-tcp-proxy-and-a-browser-safe-sctp-10ob</guid>
      <description>&lt;p&gt;0.40.0 of grpc-over-datachannels is out. The headline is&lt;br&gt;
distributed tracing (beta) that works the same way in every&lt;br&gt;
generated runtime — 15 native languages plus the browser —&lt;br&gt;
but the release also carries an SCTP delivery overhaul and a&lt;br&gt;
measurement about browser packet sizes that changed how every&lt;br&gt;
stack in the project sends data.&lt;/p&gt;

&lt;h3&gt;
  
  
  Tracing that follows the call
&lt;/h3&gt;

&lt;p&gt;Register a span observer and every generated client and&lt;br&gt;
server emits spans with durations and the W3C sampled flag.&lt;br&gt;
Unsampled trace contexts still propagate — they just don't&lt;br&gt;
record. The part that matters in practice: nested calls&lt;br&gt;
parent automatically. When a handler makes its own outbound&lt;br&gt;
gRPC call, that call joins the inbound trace with no manual&lt;br&gt;
context plumbing (ambient context on native runtimes,&lt;br&gt;
explicit trace-context binding in the browser). A&lt;br&gt;
client-originated call starts a root span when there is no&lt;br&gt;
parent, and the TCP/DataChannel proxy emits its own span for&lt;br&gt;
proxied calls, so a trace survives the hop from a stock&lt;br&gt;
HTTP/2 client into a DataChannel service.&lt;/p&gt;

&lt;p&gt;Every language ships a TRACING.md next to its TESTS.md, and&lt;br&gt;
the test suites assert the full client/server parent chain —&lt;br&gt;
including the Wasm matrix, which pairs native and facade&lt;br&gt;
browser runtimes in both directions and checks that server&lt;br&gt;
spans parent to client spans in the same trace. Two real&lt;br&gt;
bugs fell out of that coverage: span-id seeding that trapped&lt;br&gt;
on &lt;code&gt;wasm32-unknown-unknown&lt;/code&gt;, and a Lua span clock that broke&lt;br&gt;
in hosts without the &lt;code&gt;os&lt;/code&gt; library. Both are fixed and now&lt;br&gt;
covered by checks that run against the published packages.&lt;/p&gt;

&lt;p&gt;It's designated beta behind one central flag in the&lt;br&gt;
generator; the runtime stays dormant until your application&lt;br&gt;
registers a tracer.&lt;/p&gt;

&lt;h3&gt;
  
  
  The 2048-byte wall
&lt;/h3&gt;

&lt;p&gt;While adding large-message legs to the browser matrix, we&lt;br&gt;
found something worth sharing: Chromium silently drops SCTP&lt;br&gt;
packets larger than 2048 bytes. A 2028-byte packet was acked;&lt;br&gt;
a 2128-byte packet was retransmitted forever — no error, no&lt;br&gt;
close, just a call that never completes. Chromium's own&lt;br&gt;
outgoing datagrams top out around 1225 bytes.&lt;/p&gt;

&lt;p&gt;Our three hand-rolled SCTP stacks (Rust, Go, JS) now&lt;br&gt;
fragment at 1152-byte payloads: one chunk per packet, the&lt;br&gt;
whole packet comfortably inside the datagrams browsers&lt;br&gt;
themselves emit, and no IP fragmentation on real network&lt;br&gt;
paths. Receivers were always size-agnostic; this is purely a&lt;br&gt;
sender-side budget, and it's now enforced everywhere with&lt;br&gt;
the measurement recorded in the code.&lt;/p&gt;

&lt;p&gt;Alongside that, all three stacks gained RTT-measured&lt;br&gt;
retransmit timers (SRTT/RTTVAR feeding the RTO, replacing a&lt;br&gt;
fixed 1-second recovery), O(1)-amortized reassembly, and a&lt;br&gt;
truthful advertised receive window that shrinks for&lt;br&gt;
gap-buffered data. The proxy stress leg grew to 8 MB; the&lt;br&gt;
browser matrix now pushes 192 KiB unary calls (just under&lt;br&gt;
the RTCDataChannel single-message cap) through 20/20 runtime&lt;br&gt;
pairs in Chromium and Firefox. A paced throughput bench&lt;br&gt;
(&lt;code&gt;make bench-throughput&lt;/code&gt;) baselines our JS stack against&lt;br&gt;
Chromium's native one.&lt;/p&gt;

&lt;h3&gt;
  
  
  Also in 0.40.0
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;A dependency-free Rust TCP/DataChannel proxy in both
directions: stock HTTP/2 clients call a grpc-dc server,
grpc-dc clients call a stock HTTP/2 backend, TLS on both
sides, compression terminated in the proxy. A new
malformed-input corpus for the JS ingress proxy (garbage
prefaces, truncated frames, gzip bombs, mid-message
resets) found and fixed a status-mapping bug.&lt;/li&gt;
&lt;li&gt;Embedded: the raw-Ethernet Echo proof now fragments a
10 KiB call across ~7 Ethernet frames each way and streams
over the no-IP transport.&lt;/li&gt;
&lt;li&gt;Fresh-consumer gates run against the published packages
(npm kafka-grpc shown here), so packaging regressions get
caught outside the repo.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Packages for this release are live on npm (grpc-dc,&lt;br&gt;
kafka-grpc, eventbus-grpc), crates.io, pub.dev, NuGet,&lt;br&gt;
Maven Central, LuaRocks, and JSR, with generated runtimes&lt;br&gt;
for Rust, Go, JS, Python, Java, C#, C++, Swift, Kotlin,&lt;br&gt;
Dart, Zig, Lua, Ruby, PHP, Scala, and C. If you try the&lt;br&gt;
tracing beta, we'd like to hear where the model chafes —&lt;br&gt;
it's the last big surface we expect to iterate on before&lt;br&gt;
calling it stable.&lt;/p&gt;

</description>
      <category>webdev</category>
    </item>
    <item>
      <title>gRPC in the browser without grpc-web: the wire protocol over a WebRTC DataChannel</title>
      <dc:creator>John Davis</dc:creator>
      <pubDate>Sun, 01 Nov 2026 17:22:26 +0000</pubDate>
      <link>https://dev.to/unicomp21/grpc-in-the-browser-without-grpc-web-the-wire-protocol-over-a-webrtc-datachannel-43g3</link>
      <guid>https://dev.to/unicomp21/grpc-in-the-browser-without-grpc-web-the-wire-protocol-over-a-webrtc-datachannel-43g3</guid>
      <description>&lt;p&gt;grpc-web exists because browsers can't speak HTTP/2 trailers.&lt;br&gt;
The usual answer is a translation proxy in front of your service.&lt;br&gt;
We took a different one: run the actual gRPC wire protocol —&lt;br&gt;
length-prefixed frames, HPACK-free, all four call shapes — over a&lt;br&gt;
single WebRTC &lt;code&gt;RTCDataChannel&lt;/code&gt;, and generate the runtime for it&lt;br&gt;
from your &lt;code&gt;.proto&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;grpc-over-datachannels&lt;/strong&gt; is that experiment, grown up:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Dependency-free generated runtimes for 16 languages&lt;/strong&gt; —
JavaScript/TypeScript, Go, Rust, Python, Ruby, PHP, Lua, C,
C++, Dart, Java, Kotlin, Scala, Swift, C#, and Zig. Browser and
native. The generated code is stdlib-only; there is no grpc
library underneath it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Our own WebRTC stack.&lt;/strong&gt; ICE, DTLS, and SCTP written from
scratch, so the native clients don't depend on a WebRTC library
either.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Graded against stock gRPC.&lt;/strong&gt; The generated implementations are
tested against the reference implementations through a
TCP↔DataChannel proxy — the oracle is the real thing, not a
reimplementation of it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;WebRTC-Direct.&lt;/strong&gt; A server prints one certhash multiaddr; a
client dials it. No signaling server. Direct on a LAN, through a
TURN relay behind symmetric NAT, or full ICE with STUN in peer
mode — with runnable examples in every language.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A Kafka proxy in Rust.&lt;/strong&gt; &lt;code&gt;grpcdc.kafka.v1.Kafka&lt;/code&gt; exposes
Apache Kafka as a generated gRPC service, so any generated
client — including a browser tab — can produce and consume
without a Kafka client library. The same generated e2e suite
runs against Kafka and Redpanda in CI.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you only have thirty seconds, the whole pitch is a 2-minute&lt;br&gt;
video: &lt;a href="https://youtu.be/LwrXpnlMlgA" rel="noopener noreferrer"&gt;https://youtu.be/LwrXpnlMlgA&lt;/a&gt; — and the Kafka proxy gets&lt;br&gt;
its own: &lt;a href="https://youtu.be/KJ98a4ApZ4E" rel="noopener noreferrer"&gt;https://youtu.be/KJ98a4ApZ4E&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The part we're proudest of is also the strangest: almost&lt;br&gt;
everything in the repos is generated. The runtimes, the tests,&lt;br&gt;
the examples, and the docs come from recursive generators, so&lt;br&gt;
sixteen languages can't quietly drift apart. When a language&lt;br&gt;
misbehaves, we fix the generator, not sixteen codebases.&lt;/p&gt;

&lt;p&gt;Try it without installing anything — the stub generator runs in&lt;br&gt;
your browser: &lt;a href="https://browser-grpc.github.io/grpc-over-datachannels/app/" rel="noopener noreferrer"&gt;https://browser-grpc.github.io/grpc-over-datachannels/app/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Code, releases (npm / PyPI / NuGet / GHCR / GitHub-hosted Maven):&lt;br&gt;
&lt;a href="https://github.com/browser-grpc/grpc-over-datachannels" rel="noopener noreferrer"&gt;https://github.com/browser-grpc/grpc-over-datachannels&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Longer write-ups, with the design trade-offs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://c100k.blogspot.com/2026/10/introducing-grpc-over-datachannels-grpc.html" rel="noopener noreferrer"&gt;https://c100k.blogspot.com/2026/10/introducing-grpc-over-datachannels-grpc.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://c100k.blogspot.com/2026/10/kafka-over-grpc-rust-kafka-proxy-with.html" rel="noopener noreferrer"&gt;https://c100k.blogspot.com/2026/10/kafka-over-grpc-rust-kafka-proxy-with.html&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Questions and hostile edge cases welcome — the NAT and framing ones especially.&lt;/p&gt;

</description>
      <category>grpc</category>
      <category>webrtc</category>
      <category>rust</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
