The Radio extension by Query.Farm enables DuckDB to interact seamlessly with real-time event systems such as WebSocket servers, message queues, and event buses. It allows DuckDB to both receive and send events: incoming messages are buffered and queryable with standard SQL, while outgoing events are also buffered and support delivery tracking.
The extension is named Radio because it effectively equips DuckDB with a two-way radio—allowing it to listen for and broadcast messages across event-driven systems.
See the extension documentation.
DuckDB extensions uses VCPKG for dependency management. Enabling VCPKG is very simple: follow the installation instructions or just run the following:
cd <your-working-dir-not-the-plugin-repo>
git clone https://github.com/Microsoft/vcpkg.git
sh ./vcpkg/scripts/bootstrap.sh -disableMetrics
export VCPKG_TOOLCHAIN_PATH=`pwd`/vcpkg/scripts/buildsystems/vcpkg.cmake
Note: VCPKG is only required for extensions that want to rely on it for dependency management. If you want to develop an extension without dependencies, or want to do your own dependency management, just skip this step. Note that the example extension uses VCPKG to build with a dependency for instructive purposes, so when skipping this step the build may not work without removing the dependency.
Now to build the extension, run:
make
The main binaries that will be built are:
./build/release/duckdb
./build/release/test/unittest
./build/release/extension/<extension_name>/<extension_name>.duckdb_extension
duckdb
is the binary for the duckdb shell with the extension code automatically loaded.unittest
is the test runner of duckdb. Again, the extension is already linked into the binary.<extension_name>.duckdb_extension
is the loadable binary as it would be distributed.
DuckDB extensions currently rely on DuckDB's build system to provide easy testing and distributing. This does however come at the downside of requiring the template to build DuckDB and its unittest binary every time you build your extension. To mitigate this, we highly recommend installing ccache and ninja. This will ensure you only need to build core DuckDB once and allows for rapid rebuilds.
To build using ninja and ccache ensure both are installed and run:
GEN=ninja make
To run the extension code, simply start the shell with ./build/release/duckdb
. This shell will have the extension pre-loaded.
## Running the tests
Different tests can be created for DuckDB extensions. The primary way of testing DuckDB extensions should be the SQL tests in `./test/sql`. These SQL tests can be run using:
```sh
make test