TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

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

154 点作者 gopiandcode大约 2 年前

7 条评论

mariusor大约 2 年前
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 未加载
dahwolf大约 2 年前
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 未加载
erwinh大约 2 年前
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 未加载
SideburnsOfDoom大约 2 年前
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 未加载
nologic01大约 2 年前
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.
mikece大约 2 年前
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 未加载
throwaway290大约 2 年前
There&#x27;s also LitePub, though development seems stalled (?)
评论 #35693230 未加载
评论 #35692528 未加载