[ANN] gRPCServer.jl - A Native gRPC Server Implementation for Julia

Hi everyone! :waving_hand:

I’m excited to share a new native Julia gRPC server library I’m working on: gRPCServer.jl.

:link: Repository: https://github.com/s-celles/gRPCServer.jl
(Currently unregistered — and still in development — feedback welcome!)

:brain: What is gRPCServer.jl?

gRPCServer.jl is a server‑side gRPC framework written in pure Julia. It makes it easy to serve gRPC APIs from Julia applications using Protocol Buffers for message serialization (via ProtoBuf.jl). This fills an important gap — while client‑side gRPC support exists in packages like gRPCClient.jl, the server story has been relatively underdeveloped. (Julia Packages)

Key features include:

  • :check_mark: All RPC Patterns — Unary, server streaming, client streaming, bidirectional streaming
  • :check_mark: Type‑safe dispatch leveraging Julia’s type system
  • :check_mark: High performance – type‑stable handlers with minimal allocations
  • :check_mark: TLS/mTLS support for secure communication (to be implemented)
  • :check_mark: Reflection & health checks
  • :check_mark: Interceptors for logging, auth, metrics, etc.
  • :check_mark: Julia‑idiomatic interfaces and extensive docstrings

:wrench: Quick Example

Here’s how to define and run a simple gRPC server:

using ProtoBuf, gRPCServer

include("generated/helloworld.jl")
using .helloworld

function say_hello(ctx::ServerContext, req::HelloRequest)::HelloReply
    HelloReply(message="Hello, $(req.name)!")
end

struct GreeterService end

function gRPCServer.service_descriptor(::GreeterService)
    ServiceDescriptor(
        "helloworld.Greeter",
        Dict(
            "SayHello" => MethodDescriptor("SayHello", MethodType.UNARY,
                                           "helloworld.HelloRequest",
                                           "helloworld.HelloReply",
                                           say_hello)
        ),
        nothing
    )
end

server = GRPCServer("127.0.0.1", 50051)
register!(server, GreeterService())
run(server)

You can then test it locally:

grpcurl -plaintext -d '{"name":"Julia"}' localhost:50051 helloworld.Greeter/SayHello

:package: Why This Package?

Many Julia tools and ecosystems lack a complete gRPC server solution. While there are client libraries (e.g., gRPCClient.jl for making requests), the server side has been largely missing or experimental until now. This package aims to provide:

  • A gRPC server for Julia
  • Secure and extensible infrastructure for RPC
  • A foundation for building distributed and service‑oriented Julia applications

:light_bulb: Requirements

  • Julia 1.10+
  • ProtoBuf.jl for protocol buffers support (Julia Packages)

:megaphone: Feedback, Collaboration & Registration

This package is currently unregistered, and I’d love to get early user feedback, feature requests, and collaborators! If you find this useful or want to help polish it for registration on the General registry — please comment below.

:link: Repository: https://github.com/s-celles/gRPCServer.jl

Thanks, and happy coding! :raising_hands:


18 Likes

This is awesome. Thank you for sharing!

It looks like gRPC support in the Julia ecosystem is shaping up big time in 2026! I had originally planned to write this sometime this year, but I’m honestly relieved someone else is driving the effort. Thank you!

I’m going to open an issue at ProtoBuf.jl to bump the version tonight. Once that is done we can also get gRPCClient.jl 1.0.0 released so you can depend on it for testing for your own package registration.

EDIT: made an issue and associated pull request here: Release 1.2.1 · Issue #290 · JuliaIO/ProtoBuf.jl · GitHub

2 Likes

Feel free to look at code, ROADMAP.md and DeepWiki to see if something is missing. Very pleased to have some testers and contributors.
Thanks for PR in ProtoBuf.jl
I will try to also look at gRPCClient.jl code and see if there is some room for improvements.

2 Likes

Fantastic! Thanks for developing this package.

The hello world example in the README does not work for me. I get Failed to dial target host "localhost:50051": context deadline exceeded from grpcurl. There are no warnings/errors on the Julia side.

gRPC server support would of course be hugely beneficial to have, but it is an enormous undertaking especially without a solid http/2 foundation to build on. Taking even a quick glance at one of the lowest level of the stack (the Huffman code for HPACK header compression), 13 out of the first 15 codes seem to be wrong:

i gRPCServer.HUFFMAN_CODES[i] RFC 7541 Appendix B
2 0x03ffffe2 0x0fffffe2
3 0x03ffffe3 0x0fffffe3
4 0x03ffffe4 0x0fffffe4
5 0x03ffffe5 0x0fffffe5
6 0x03ffffe6 0x0fffffe6
7 0x03ffffe7 0x0fffffe7
8 0x03ffffe8 0x0fffffe8
9 0x07ffffea 0x00ffffea
11 0x03ffffe9 0x0fffffe9
12 0x03ffffea 0x0fffffea
14 0x03ffffeb 0x0fffffeb
15 0x03ffffec 0x0fffffec

My understanding of these matters is limited, but it seems unlikely that this library can communicate with clients over http/2 if they use different encodings for header compression.

3 Likes

cross checking every table from RFC is a good idea. Thanks for checking this one. It should be fixed now. Sorry about that.

Maybe testing against GitHub - http2jp/hpack-test-case: HPACK Test Case
could help improving quality of this package.

Their work is mentioned in https://http2.github.io/

Unfortunately http2jp/hpack-test-case still have two 8 yo issues ;-(

Why not develop on top of the HTTP.jl branch that is supposed to be released as v2?

There is also the option of using nghttp2. Late last year I had started work on on a package that builds ontop of the JLL package to make it easier to use from Julia as part of my server efforts.

Thanks for the suggestions @simsurace and @csvance!

I’m taking a top-down, Spec-Driven Development approach (SDD) here, with AI assistance to help accelerate the implementation. The idea is to start from the gRPC specification and work downward, getting a functional server working first before diving deep into lower-level optimizations.

Focusing too much on the HTTP/2 foundation details right now would be premature optimization — I’d rather have a working gRPC server that can evolve, than spend months perfecting HTTP/2 internals before having anything usable.

That said, the HTTP/2 layer I’m building is designed with extraction in mind. In a future iteration, it should be entirely possible to spin out a standalone HTTP2.jl package from this work, which could benefit the broader Julia ecosystem (and potentially even feed back into HTTP.jl efforts).

Regarding quality assurance: HPACK is now being tested against http2jp/hpack-test-case, which provides a comprehensive test suite used by many HTTP/2 implementations. This should help catch encoding issues like the ones @simsurace spotted earlier (thanks again for that!).

I’m very open to collaborating on the HTTP/2 layer once the gRPC functionality is more mature — contributions and feedback are always welcome!

@csvance I’m eagerly waiting for the new gRPCClient.jl release — it will be very useful for testing gRPCServer.jl.

I’d be happy to try it out again once the hello world example works end-to-end.

2 Likes