Skip to content

Instantly share code, notes, and snippets.

View clemensv's full-sized avatar
🏠
Working from home

Clemens Vasters clemensv

🏠
Working from home
View GitHub Profile

For a bit of CNCF xRegistry magic:

curl -o docker-compose-gh.yml https://raw.githubusercontent.com/xregistry/xrproxy/main/docker-compose-gh.yml
docker compose -f docker-compose-gh.yml up 

After a little while (give it a couple minutes to settle after the images have been pulled), you'll get a metadata viewer at http://localhost:8080/viewer and an xRegistry API endpoint at http://localhost:8080/registry

What are you looking at? The viewer shows our test registry at xregistry.soaphub.org with endpoints and messages and schemas, but it also shows other metadata that illustrates why we call the registry "extensible":

@clemensv
clemensv / contoso-autowerks-uns.md
Last active April 30, 2025 07:41
Unified Namespace and xRegistry at Contoso Autowerks

Unified Namespace and xRegistry at Contoso Autowerks

This article describes how Contoso Autowerks uses a Unified Namespace (UNS), captured formally in an CNCF xRegistry, to integrate its manufacturing systems.

Mind that this is a fictional example to illustrate the concepts of a Unified Namespace and how CNCF xRegistry can be used to capture the metadata of the namespace.

Contoso Autowerks Factory Layout & Work Cells

@clemensv
clemensv / README.md
Created January 14, 2025 10:56
dump1090 signal stats dashboard

dump1090 Real-Time Signal Statistics

This project provides a web application for real-time monitoring of ADS-B messages using dump1090. The application consists of a FastAPI backend and a frontend that displays various statistics in real-time using Chart.js.

I don't have time to package this up at the moment.

Features

  • Message Rate Statistics: Computes and displays message rates over different intervals (5s, 15s, 30s, 60s, 300s).
  • Signal Strength Statistics: Computes and displays minimum, maximum, and average signal strength over 30 seconds.
@clemensv
clemensv / macro.vb
Created January 6, 2025 16:25
Outlook Macro to revert safelink URLs while composing a reply.
Sub RevertSafeLinks()
Dim objMail As MailItem
Dim objInspector As Inspector
Dim objInlineResponse As Object
' Check for inline response first
Set objInlineResponse = Application.ActiveExplorer.ActiveInlineResponse
If Not objInlineResponse Is Nothing Then
Set objMail = objInlineResponse
ProcessMailItem objMail
@clemensv
clemensv / Test.cs
Last active June 24, 2025 23:01
Illustration for how to use the Service Bus emulator in a C# test fixture
// This code was auto-generated by xRegistry CLI
#nullable enable
using System;
using System.IO;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
@clemensv
clemensv / avroschema.md
Last active May 22, 2024 07:49
Formal specification for Avro Schema

Apache Avro Schema - Formal Specification

Abstract

This document provides a comprehensive specification of the schema definition system used by Apache Avro. It details the structure and syntax of Avro

@clemensv
clemensv / plainjson.md
Last active April 30, 2025 10:53
"Plain JSON" encoding for Apache Avro
@clemensv
clemensv / CloudEvents with ASA
Created September 13, 2023 10:18
Using CNCF CloudEvents with ASA
I wrote the code, ChatGPT the text. I'll eventually write an actual article, but this will do:
### Consuming and Creating (Structured, JSON) CloudEvents in Azure Stream Analytics
Hey devs, today we're going to talk about working with structured JSON CloudEvents in Azure Stream Analytics. We'll be using some straightforward SQL-like queries to get this done, and I promise to keep the jargon to a minimum. Let's get started.
#### Setting Up Your Event Stream
We assume that the input is an Event Hub that multiplexes CloudEvents in structured JSON format.
@clemensv
clemensv / jsonschemaconstraints.md
Created July 31, 2023 08:38
Resolving Competing, Paradoxical Validation/Code-Gen Constraints in JSON Schema

Resolving Paradoxical Constraints in JSON Schema

Introduction

JSON Schema is a versatile tool for defining the structure of JSON data and ensuring its validation. However, as powerful as it is, complex scenarios can sometimes lead to paradoxical constraints, especially when used in combination with code generation tools. In this article, we'll take an in-depth look at one such paradox that emerged while defining message structures for various protocols and discuss a practical solution.

The Problem Statement

Imagine a system where messages are passed using different protocols, such as AMQP, HTTP, MQTT, Kafka, and CloudEvents. Each protocol has a distinct message structure but shares certain common attributes. These shared attributes are consolidated in a base message definition, called definition in our JSON Schema.