TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

I Wrote an Activitypub Server in OCaml: Lessons Learnt, Weekends Lost

154 pointsby gopiandcodeabout 2 years ago

7 comments

mariusorabout 2 years ago
The author makes the basic mistake of most of the people implementing ActivityPub services: they want to map the logic of an existing type of web application and contort existing domain objects into encoding&#x2F;decoding to an &quot;impractically large number&quot; of options. That happens because they want two things in one: a server and a client.<p>The ActivityPub specification needs to be read with a goal similar to an email server in mind. It should do one thing: receive JSON-LD objects in inbox, process them according to the specification, and(maybe) store them on disk.<p>The idea of &quot;users&quot;, &quot;friends&quot;, &quot;posts&quot;, &quot;feeds&quot; etc, are concepts that belong to the clients on top of this server, not in the server itself.<p>This separation between clients and server will also allow better interop&#x2F;graceful degradation of object types that the client&#x2F;server don&#x27;t specifically understand.
评论 #35692608 未加载
评论 #35692886 未加载
评论 #35690803 未加载
评论 #35691815 未加载
评论 #35691364 未加载
dahwolfabout 2 years ago
Saw some comments on the protocol being fluffy and typical implementations resource hungry. This is an interesting guy to follow:<p><a href="https:&#x2F;&#x2F;universeodon.com&#x2F;@supernovae" rel="nofollow">https:&#x2F;&#x2F;universeodon.com&#x2F;@supernovae</a><p>He&#x27;s the admin of universeodon, a mastodon instance with 13K MAU. He recently shared that in a month&#x27;s time, 3TB of text was transferred just in ActivityPub events. Images a multiple of it. I don&#x27;t know what the bill is, but I was pretty shocked by the stats...for &quot;just&quot; 13K users.<p>And the cruel thing is that it still doesn&#x27;t work properly. Likes&#x2F;boosts and replies do not properly synchronize.
评论 #35696841 未加载
评论 #35696039 未加载
评论 #35695184 未加载
评论 #35695893 未加载
评论 #35694487 未加载
erwinhabout 2 years ago
A bit off-topic but the post title will probably attract relevant people.<p>What are the thoughts on OCaml on HN?
评论 #35692523 未加载
评论 #35694461 未加载
评论 #35696376 未加载
评论 #35693505 未加载
评论 #35693307 未加载
SideburnsOfDoomabout 2 years ago
My question is this: if I was to try to hack up an ActivityPub server in my platform of choice, how would I know how compliant it is? Is there any compliance test suite to verify this?<p>&quot;Try and load it up in a client app&quot; seems suboptimal.<p>&quot;load it up and see&quot; attitude is part of what made parsing and renderings HTML so hairy, and compliance test suites helped.
评论 #35693468 未加载
nologic01about 2 years ago
I found the post well written and informative. Though I am clueless about OCaml it feels as this would be useful for anybody working on a new server implementation in any language ecosystem as it highlights what needs to be done and potential bottlenecks.<p>As for the activitypub spec and the currently popular implementations it doesnt take long exposure to the fediverse to realise there are some rough edges and historical accidents (e.g mastodon being actually the defacto interpretation of the standard). Imho now that there is substantial more mindshare devoted to decentralized social it would be opportune to revisit these things and if needed revise before they get backed in.
mikeceabout 2 years ago
Im looking forward to a solid ActivityPub server written in Go or Rust that can run on modest hardware&#x2F;small resource Docker hosts.
评论 #35691807 未加载
评论 #35690730 未加载
评论 #35691547 未加载
评论 #35675291 未加载
评论 #35690992 未加载
评论 #35691817 未加载
评论 #35693205 未加载
throwaway290about 2 years ago
There&#x27;s also LitePub, though development seems stalled (?)
评论 #35693230 未加载
评论 #35692528 未加载