Skip to content

Add experimental/reference language SDK #25

@mathetake

Description

@mathetake

Background

A dynamic module is, by definition, a shared library that implements the Envoy C ABI defined in a single pure C header file. Technically speaking, any programming language that can produce a shared library can be used as a language for Envoy dynamic modules. In fact, in my initial proof of concept work, not only the Rust SDK but I also implemented the Go SDK. The initial motivation was in order to avoid accidentally introducing a language specific ABI, and the obvious choices were Go and Rust, the two most popular programming languages in a modern software.

On the other hand, there's a Golang specific similar extension mechanism in the contrib, so if we have a Go SDK in dynamic module core, it might be confusing to users due to different two Go SDKs present in the repository. That was the reason why we decided not to have Go but instead only Rust in the envoyproxy/envoy repository.

During the KubeCon EU this week, I had a lot of conversation around the other language support, notably Go SDK. There were at least four companies asking for the Go SDK support, and it was obvious that there's a huge community interest around it.

Proposal

Since the ABI is/was designed in a language agnostic way, so there's nothing to prevent someone from writing their own SDKs, just that it requires a bit of expertise etc. That means anyone can publish their own version of SDK in their style on their personal org/account. That is not a good thing in terms of the envoy ecosystem fragmentation, so I propose that we have "experimental SDK" or "reference SDK implementation" here in the examples repository so that multiple companies / community members can work on it and do collaboration to avoid duplicate efforts as well as the ecosystem fragmentation. It can be any language, not limited to Go like Zig, C, C++, maybe even Python or JavaScript with some host implementation here.

Speaking of Go SDK specifically, the ultimate goal would be to migrate the SDK created here to envoyproxy/envoy as a core AFTER we have all the feature parity with golang extension, and we have a migration path. That's going to take a lot of work and time since we need to keep the ABI language agnostic, and especially the design around the asynchronous callbacks requires a serious consideration.

If this sounds good to community members and users, I will kick off the scaffolding of Go reference implementation here, and start migrating the PoC Go SDK implementation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions