-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Begin implementing ActivityPub library #28
Comments
Looks good. I'd originally just put in placeholders for the models. Breaking out a library for this could be good. This does bring up a question. If we use these internally, do we use project references internally and separately pack a nuget library for other projects to use if they want? |
@benrick I think the way I've seen it done with monorepos is for us to reference the library as a project reference and then publish a version that is synchronized across the project. So if we publish multiple NuGet packages, they all get published as version 1.0.0. |
Yep, that's exactly what I was thinking we'd do is the monorepo like that, rather than breaking into separate ones, which would just overcomplicate changes to the references packages. |
I took a stab at implementing this, I'll make a draft PR when I can. There are a lot of decisions to make with regards to how we're going to serialize/deserialize the objects. The schema is kinda complex and is backed by JSON-LD. I know there is a library for that, but it's Newtonsoft JSON and doesn't directly serialize into .NET types, it appears to just operate on JObjects. The good news is that there appears to be type discriminators in many places, so we can determine which type of object to deserialize with the new |
I have looked more into the specification, and I found that the vast majority of the ActivityPub functionality is derived from the ActivityStreams spec. In fact, it appears that ActivityPub is a superset of ActivityStreams and both are supersets of JSON-LD documents. I think implementing a However, this does lead to a few decisions that need to be made with regards to how we're going to serialize/deserialize ActivityStreams and later ActivityPub JSON objects. It appears that there are two core types The other question is how we should deal with When serializing back to JSON, we can maybe use custom We also need to decide which .NET types we should be mapping some of the JSON values to. It appears that there are a lot if |
Is your feature request related to a problem? Please describe.
We should use this issue as a place to start planning the implementation of the ActivityPub library. I just finished reading the spec, it appears that we'll need some interesting data models and maybe some special JSON parsing setup to handle the multiple types of requests/responses specified by ActivityPub. We will also need extension methods to support configuring this with minimal APIs and the WebApplicationBuilder.
Describe the solution you'd like
I think the first step to implementing this will be to move everything into a project named
ActivityPub
with a structure similar to the following:Describe alternatives you've considered
Another option would be to create separate projects for the ActivityPub models and the AspNetCore configuration. Right now, we just need the models, so maybe start out with that project and decide how to evolve in the future.
The text was updated successfully, but these errors were encountered: