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

Keep an event and link type index #112

Open
RuthgerD opened this issue Oct 9, 2022 · 0 comments
Open

Keep an event and link type index #112

RuthgerD opened this issue Oct 9, 2022 · 0 comments
Labels
Backend Performance Performance related matters

Comments

@RuthgerD
Copy link
Collaborator

RuthgerD commented Oct 9, 2022

Currently we do not send the link type to the frontend by default, this may limit some use cases.

The reason it is not being send is due to performance requirements, as the types are all strings they would clog the internet tubes needlessly.

To optimize this and to unlock the ability to send over more information in the lean event variant we need an index to map the string types to integer.

2 ways to do this:

  1. global RwLock<IndexSet> that is populated when events are inserted into the graph, index is requested through GET
    • pro: complete query-able index
    • con: adds more locking and overhead in hot loop
  2. per user IndexSet, populated when events are send over, index is send via socket
    • pro: multi threaded, only indexes events that are requested
    • con: incomplete index, duplicate work with multiple users

once this index is available we can replace the lean event's String usage with u64's.

useful for:
ItJustWorksBetterTM#4

@RuthgerD RuthgerD added Performance Performance related matters Backend labels Oct 9, 2022
@RuthgerD RuthgerD changed the title Keep a event and link type index Keep an event and link type index Oct 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backend Performance Performance related matters
Projects
None yet
Development

No branches or pull requests

1 participant