Released vibe.d 0.10.1 (WebRPC)

Sönke Ludwig sludwig at outerproduct.org
Fri Sep 13 09:40:27 UTC 2024


vibe.d 0.10.1 has been released a few days ago. The major new feature is 
a new RPC mechanism that is basically a bi-directional extension of the 
REST interface generator. The idea is to use HTTP connections for the 
transport in order to minimize transport issues and allow simple proxy 
setups to be used. This approach allows to pass through typical NATs or 
firewall configurations in one direction, while still enabling 
bi-directional peer-to-peer communication.

The way this works in code is very similar to the existing REST 
interface system, requiring an interface definition that will be used to 
transparently serialize regular D calls to send them over the wire. Most 
of the additional features, such as `Collection!T` and the 
authorization/authentication system are supported, too.

Currently, this is implemented using WebSockets under the hood, but the 
idea is to leverage HTTP/2+ server push functionality later on. Once 
QUIC and HTTP/3 support is available, this could also be extended to 
punch through NATs in both directions and allow fully unrestricted P2P 
communication.

Speaking of HTTP/2, some time ago, I also finally got around to merge 
the work on a HTTP/2 server implementation by Francesco Galla and 
Francesco Mecca done as part of a SAoC into vibe-http master. 
Unfortunately, the state of the code is still very experimental and 
ideally needs to be continued by integrating a standard test suite.

For anyone wanting to try this out, just check out the repository's 
master branch* and set the `HTTPServerOption.enableHTTP2` option in 
`HTTPServerSettings.options`, or start with one of the http2 examples in 
the examples/ folder.

* https://github.com/vibe-d/vibe-http/


More information about the Digitalmars-d-announce mailing list