mycognosist / solar

A minimal Secure Scuttlebutt replication node.
Other
20 stars 2 forks source link

Add basic message content indexes #78

Closed mycognosist closed 9 months ago

mycognosist commented 9 months ago

This PR is the result of an exploration into database indexes for common SSB message content types and data. While I initially felt that it might be best to keep index creation separate from solar, I realise that such an approach will likely decrease the chance of others using the software to develop their own client. If this turns out to be a bad idea, at least the index module is sufficiently encapsulated and can easily be split-off.

Each message is indexed immediately after having been appended to the database.

A next step would be to expose the index getter methods via JSON-RPC. It may also be worthwhile to consider approaches for validating, wiping / resetting and reindexing.

Methods

get_blocks(ssb_id)
get_blockers(ssb_id)
get_channel_subscribers(channel)
get_channel_subscriptions(ssb_id)
get_descriptions(ssb_id)
get_self_assigned_descriptions(ssb_id)
get_latest_description(ssb_id)
get_latest_self_assigned_description(ssb_id)
get_follows(ssb_id)
get_followers(ssb_id)
is_following(peer_a, peer_b)
get_friends(ssb_id)
get_images(ssb_id)
get_self_assigned_images(ssb_id)
get_latest_image(ssb_id)
get_latest_self_assigned_image(ssb_id)
get_names(ssb_id)
get_self_assigned_names(ssb_id)
get_latest_name(ssb_id)
get_latest_self_assigned_name(ssb_id)