Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Index Anywhere #23

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Index Anywhere #23

wants to merge 4 commits into from

Conversation

Gozala
Copy link
Contributor

@Gozala Gozala commented Apr 18, 2024

📽️ Preview

This is a very early sketch of the idea I had been revealing in bits and pieces for a long time now. I hope to use this as space to iterate and evolve this into something concrete

@Gozala Gozala changed the title Index Anywhere: Finally write down picture I had for indexing and mutations in writing Index Anywhere Apr 18, 2024

Prolly Trees provide a great foundation for efficient, potentially partial sync and were [demonstrated to be implementable on top of key value stores][prolly-tree kv]. We could implement Dynamo backend for [Okra] which would create means for replication and we could leverage some of the existing backends to replicate index in other nodes.

> ❗️ There is an assumption that Prolly Tree on top of Dynamo would be efficient enough to make added overhead non issue.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even if that were the case, I do not want to depend on Dynamo.

Copy link
Contributor Author

@Gozala Gozala Apr 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is interesting, I was assuming that having prolly tree on top of dynamo would give best of the both worlds. Comparable performance in our current system and flexibility to choose backends optimized for constraints of their runtime.

I'd be very hesitant to switch to yet another DB in our system given our prior history those, or at least I would not tie two endeavors together

rfc/index-anywhere.md Outdated Show resolved Hide resolved
rfc/index-anywhere.md Outdated Show resolved Hide resolved

> ℹ️ In fact records get grouped such that related records end up in the same group which could be leveraged by domain specific applications.

Put it more simply we could put datomic inspired datalog engine on top of Prolly Trees to regain desired flexibility and efficiency of queries and derive all other requirements from the Prolly Tree itself. As an added benefit Prolly Tree could be materialized an IPLD DAG making it ecosystem native.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where would the Prolly Tree and its underlying data be stored? With the blob index?

If a user's data is replicated to multiple locations, is the prolly tree also replicated?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would imagine it would be stored in every user agent (that user has) probably as a local IPLD dag (although in some cases maybe indexdb or leveldb wolud be a better choice). On the server I imagine we would (at least initially) store it using key value store and dynamo would be what I'd try first.

For the reference canvas.xyz demonstrated an effective way to represent prolly tree using key value stores

rfc/index-anywhere.md Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants