spicedb icon indicating copy to clipboard operation
spicedb copied to clipboard

Support for an official .NET client library

Open corkrean opened this issue 1 year ago • 6 comments

Problem Statement

Presently, there are several .net community libraries that work well. However, it would give .NET users more confidence in SpiceDB if an officially supported .net client existed.

Solution Brainstorm

No response

corkrean avatar Apr 25 '24 18:04 corkrean

I'd love for folks to chime in on the language specifically. I'm assuming C#, but I'd love to be proven wrong, haha.

jzelinskie avatar Apr 29 '24 22:04 jzelinskie

@jzelinskie actually doesn't matter, since .NET allows for type interop between languages

josephschorr avatar Apr 29 '24 22:04 josephschorr

Is that UX good? I've never worked on a CLR language, so I have no idea.

jzelinskie avatar Apr 29 '24 22:04 jzelinskie

@jzelinskie With exception of being able to read the code in your preferred language, the UX is the same in VSCode

josephschorr avatar Apr 29 '24 23:04 josephschorr

@jzelinskie I would love for C# so that I can also help maintain it!

Currently I created a simple client that I use for my work, but it would be nice if there was an official one that was easily maintainable.

benny-yamagata avatar Apr 30 '24 01:04 benny-yamagata

@benny-yamagata i've got a start in the PR referenced above. One thing I'm trying to suss out is that it seems like you can either set up your own client manually or use a GrpcClientFactory to attach the client as a service to an existing http client pool. Is one approach more likely/useful than the other?

I guess a part of what I'm getting at is that on one end I could provide the client and proto as the library and let a consumer set it up themselves, and at the other end I could do some work to make it relatively easy to stand up a configured client, but I don't have a sense of how they'll be used. Can you provide some input?

tstirrat15 avatar Aug 24 '24 01:08 tstirrat15

There's now an official library available at https://github.com/authzed/authzed-dotnet. There's a couple of polish items that I still need to take care of, but the library is testable and usable in its current form. I'm going to close this in the meantime; any additional conversation can happen over in that repo.

tstirrat15 avatar Sep 11 '24 15:09 tstirrat15

@tstirrat15 sorry, work has me swamped with like 5 projects at once! Just getting back to this now!

I will admit, im not as familiar with GRPC as I probably should be. I really dont know without searching which path would have been better for you to have used. I Imagine though just with my knowledge of .NET that the GRPCClientFactory would have probably been the better choice that way you can integrate quickly and get moving.

As for the how should we configure it. I would say preconfigured things are nice, but you know peeps will eventually want the freedom to do it themselves.

Sorry this is so late and the feedback is probably no longer needed. Just didnt want you to think I had ghosted you!

I will peep the dotnet repo!

benny-yamagata avatar Sep 16 '24 12:09 benny-yamagata