#social 2019-05-31
2019-05-31 UTC
Chocobozzz, xmpp-social, vitalyster, timbl and Clipsey joined the channel
#
Clipsey What's the best approach for making an activitypub server? Making the functionality first, then adding federation, or nah?
#
Clipsey (I'm pretty new to activitypub, coding wise)
#
cjslep[m] Don't know there's a "best". In the "add federation second" camp, design choices can make that unpleasant. I am a fan of holistically releasing a thing.
#
cjslep[m] But dansup with PixelFed went the "add federation second" and could elaborate on that more.
#
Clipsey my server is more experimental, especially since the language im using is strongly typed (making implementing some features of JSON-LD quite challanging)
#
cjslep[m] What language?
#
Clipsey D
#
Clipsey using vibe.d
#
Clipsey https://github.com/Member1221/dfed (there's more code on my local machine i haven't pushed yet)
rZr joined the channel
#
cjslep[m] Gotcha. That's the first of D I've heard, I know even with Go, Rust, and Java people have been doing a mix of approaches. I'm on one extreme: build a library, now building a framework, finally will then build my app as a thin wrapper around the JSON-LD graph.
#
Clipsey I'm just using a JSON library and skipping JSON-LD (since there's no implementation of JSON-LD for D)
#
Clipsey I was making a JSON-LD system at one point using a lot of metaprogramming, but it became quite the mess
#
cjslep[m] Sounds about right, I don't think anyone (except maybe Mastodon?) tries to do JSON-LD processing at runtime.
#
Clipsey So, i'm p much making a lot of assumptions on the structure of the incomming data
#
Clipsey If the structure is wrong, the server will ignore it
#
Clipsey (in other words, not federate)
#
Clipsey (JSON type is limited by type, so you can't have 2 types of things inside an array, for example.
#
cjslep[m] Gotcha. Yeah that's a tough problem to solve in the static lang world. I used code generation in go-fed so it'll accept any incoming JSON-LD structure. But it's not required (so far). "Liberal in aceept, conservative in sending out" principle and all
#
Clipsey So i just hope people don't do weird stuff with @context
#
cjslep[m] You'll find strings and objects in arrays, such as @context
#
cjslep[m] In pure JSON terms
timbl_ joined the channel
#
Clipsey Yeah.
#
Clipsey Though, now that i'm thinking about it
#
Clipsey It might only be a limitation of ASDF
#
Clipsey I can try with vibe json serialization
#
Clipsey since it's more forgiving
#
Clipsey granted, that means the serialization will be maginutes slower
#
Clipsey An other question; is using a key-value database a bad idea?
#
Clipsey SQL gives me nightmares, and it's the only other type of DB I know how to use (besides KV store)
#
cjslep[m] That's like asking if a hammer is a good tool. It depends on how you use it. If you use it to hammer in screws then no.
#
Clipsey I meant, good for a social media server. I have no real reference to how much data is needed to be stored and such
#
Clipsey Haven't hosted any federated servers (yet)
#
cjslep[m] Depends on your app and the user's data access patterns (ex threads). But honestly kv should be fine, optimize later, tinker now
#
Clipsey okay, thanks. (and sorry for the stupid questions)
#
Clipsey also, found out. vibe.d's json serializer supports it, so i'll be using that for activitypub requests
#
rigelk[m]1 cjslep: kv stores or document stores have been used at first by disapora, and then they switched to mysql. They even wrote about it, if you want more info about hammers :)
#
rigelk[m]1 I meant Clipsey (IRC) *
#
Clipsey lol
#
fr33domlover dansup, ping
timbl and Loqi joined the channel
#
fr33domlover Anyone has opinions on granting/delegating access using ActivityPub? I'm thinking a Delegate activity
#
fr33domlover I'm adding this to the spec draft, will announce/link soonish for feedback ^_^
#
rialtate[m] Internally we're using something like `
{ type:Grant, object: { type:Capability } }
`#
rialtate[m] Haven't gotten to federating it yet though
#
rialtate[m] The obj can also be an array but perhaps a collection would be better
rZr joined the channel
#
fr33domlover rialtate[m], I suppose we're doing similar things then! Would you like to match/interop once I document what I do?
#
fr33domlover And I guess I want feedback from everyone :p
#
rialtate[m] fr33domlover: if possible! I still haven't the slightest clue how we will try to federate with servers that don't use the extension
timbl__, timbl____, timbl_, timbl and vitalyster joined the channel; vitalyster left the channel