Follow

Mastodon 和 Pleroma 的数据库里,本机的用户信息和推文,和订阅的其它实例的用户推文,都挤在同一个数据表里,很不美型。Mastodon 好歹还存了推文纯文本,Pleroma 则是把推文的 json 对象硬存进数据库,连个外键都没有。想想相关的后台逻辑就头晕。难怪到现在都不提供导入历史推文的功能……

@fivestone 关于这一点 pleroma 的一个主要开发者在博客里也提到了 [1]:

> Because of this, Pleroma has internally been ActivtyPub since the beginning.

似乎是因为 ActivityPub 本身就是一大堆 json,然后就直接用 jsonb 了…… :blobsweats:

[1] https://blog.soykaf.com/post/activity-pub-in-pleroma/#notes-on-the-implementation

@ShyKana 好吧……所以 postgresql 是可以索引和搜索 jsonb 类型字段内部的节点的,等于是包裹了一层数据结构在字段里。

但这对后台数据管理实在太不友好了……,而且数据存储用 json 和 ActivtyPub 接口用 json,完全是两回事啊,因为这个就吹 pleroma 原生更好也太扯了……

Sign in to participate in the conversation
Fivediverse

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!