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

Obsidian Version 8.0 #77

Merged
merged 58 commits into from
Apr 12, 2023
Merged

Obsidian Version 8.0 #77

merged 58 commits into from
Apr 12, 2023

Conversation

DavidMNorman
Copy link
Contributor

@DavidMNorman DavidMNorman commented Apr 12, 2023

Checklist

  • Bugfix
  • New feature
  • Refactor

Related Issue

  • LFU/LRU caching is not as performant as other client caching options
  • Algorithms other than LFU would crash apps using the Obsidian Wrapper
  • Large queries are expensive to send to the server on client cache misses
  • ROOT_QUERY could not provide hashes to individual item queries after broad queries and would miss the cache even though the item was present in it
  • Client was not set up to communicate with rebuilt devtool
  • Server side caching was nonfunctional

Solution

  • Implemented W-TinyLFU to provide better hit-ratios with minimal memory overhead
  • Refactored ObsidianWrapper.jsx to initialize state once based on the selected algorithm rather than updating state with a new cache twice.
  • Implemented persistent queries to allow only the sending of a query hash between client and server
  • Implemented searchTerms option to allow developers to specify what search categories their app uses, which saves extra entries to ROOT_QUERY that can later be found by individual queries, reducing the need for endpoint queries when the item is in the cache.
  • Added messaging from the Obsidian Wrapper to send necessary information to our developer tool.
  • Completely overhauled server-side caching using a denormalized approach that restores basic read and write functionality.

Additional Info

  • Included Rhum tests for WTinyLFU algorithm
  • Cleared out vestigial files no longer being used by any active part of the codebase, including documentation folder, which contained old, deprecated versions of the codebase with comments. Did leave old test files intact, however.
  • Updated the Obsidian Logo

DavidMNorman and others added 30 commits March 22, 2023 10:08
Co-authored-by: David Norman <120237773+DavidMNorman@users.noreply.github.com>
Co-authored-by: David Kim <david.toyou.kim@gmail.com>
Co-authored-by: Eileen Cho <109772371+exlxxn@users.noreply.github.com>
Co-authored-by: Joan Manto <120276510+JoanManto@users.noreply.github.com>
Create WLRU and SLRU structures / methods
Create Frequency Sketch frame.

Co-authored-by: David Norman <120237773+DavidMNorman@users.noreply.github.com>
Co-authored-by: David Kim <david.toyou.kim@gmail.com>
Co-authored-by: Eileen Cho <109772371+exlxxn@users.noreply.github.com>
Co-authored-by: Joan Manto <120276510+JoanManto@users.noreply.github.com>
Fix SLRU/LRU methods for protected eviction retention,
Create WTLFU frame

Co-authored-by: David Kim <david.toyou.kim@gmail.com>
Co-authored-by: Eileen Cho <109772371+exlxxn@users.noreply.github.com>
Co-authored-by: Joan Manto <120276510+JoanManto@users.noreply.github.com>
Update read/write for w-tinyLFU
update file structure for the w-tinyLFU cache
Finish first build of Frequency Sketch

Co-authored-by: David Norman <120237773+DavidMNorman@users.noreply.github.com>
Co-authored-by: David Kim <david.toyou.kim@gmail.com>
Co-authored-by: Eileen Cho <109772371+exlxxn@users.noreply.github.com>
Co-authored-by: Joan Manto <120276510+JoanManto@users.noreply.github.com>
refactor Frequency Sketch,
begin TS refactor for WTLFU

Co-authored-by: David Norman <120237773+DavidMNorman@users.noreply.github.com>
Co-authored-by: David Kim <david.toyou.kim@gmail.com>
Co-authored-by: Eileen Cho <109772371+exlxxn@users.noreply.github.com>
Co-authored-by: Joan Manto <120276510+JoanManto@users.noreply.github.com>
Co-authored-by: David Norman <120237773+DavidMNorman@users.noreply.github.com>
Co-authored-by: David Kim <david.toyou.kim@gmail.com>
Co-authored-by: Eileen Cho <109772371+exlxxn@users.noreply.github.com>
Co-authored-by: Joan Manto <120276510+JoanManto@users.noreply.github.com>
added and fixed code in Obsidian Wrapper
Co-authored-by: David Norman <120237773+DavidMNorman@users.noreply.github.com>
Co-authored-by: David Kim <david.toyou.kim@gmail.com>
Co-authored-by: Eileen Cho <109772371+exlxxn@users.noreply.github.com>
Co-authored-by: Joan Manto <120276510+JoanManto@users.noreply.github.com>
Co-authored-by: David Norman <120237773+DavidMNorman@users.noreply.github.com>
Co-authored-by: David Kim <david.toyou.kim@gmail.com>
Co-authored-by: Eileen Cho <109772371+exlxxn@users.noreply.github.com>
Co-authored-by: Joan Manto <120276510+JoanManto@users.noreply.github.com>
Debug cache evictions,
Debug cache put methods
debug frequency sketch incrementation, initilization, freq checking.

Co-authored-by: David Norman <120237773+DavidMNorman@users.noreply.github.com>
Co-authored-by: David Kim <david.toyou.kim@gmail.com>
Co-authored-by: Eileen Cho <109772371+exlxxn@users.noreply.github.com>
Co-authored-by: Joan Manto <120276510+JoanManto@users.noreply.github.com>
added logic to respond to request for algo/capacity from content.js
Co-authored-by: David Norman <120237773+DavidMNorman@users.noreply.github.com>
Co-authored-by: David Kim <david.toyou.kim@gmail.com>
Co-authored-by: Eileen Cho <109772371+exlxxn@users.noreply.github.com>
Co-authored-by: Joan Manto <120276510+JoanManto@users.noreply.github.com>
Co-authored-by: David Norman <120237773+DavidMNorman@users.noreply.github.com>
Co-authored-by: David Kim <david.toyou.kim@gmail.com>
Co-authored-by: Eileen Cho <109772371+exlxxn@users.noreply.github.com>
Co-authored-by: Joan Manto <120276510+JoanManto@users.noreply.github.com>
Co-authored-by: David Norman <120237773+DavidMNorman@users.noreply.github.com>
Co-authored-by: David Kim <david.toyou.kim@gmail.com>
Co-authored-by: Eileen Cho <109772371+exlxxn@users.noreply.github.com>
Co-authored-by: Joan Manto <120276510+JoanManto@users.noreply.github.com>
Co-authored-by: David Norman <120237773+DavidMNorman@users.noreply.github.com>
Co-authored-by: David Kim <david.toyou.kim@gmail.com>
Co-authored-by: Eileen Cho <109772371+exlxxn@users.noreply.github.com>
Co-authored-by: Joan Manto <120276510+JoanManto@users.noreply.github.com>
Add searchTerms options to w-tinyLFU
Co-authored-by: David Norman <120237773+DavidMNorman@users.noreply.github.com>
Co-authored-by: David Kim <david.toyou.kim@gmail.com>
Co-authored-by: Eileen Cho <109772371+exlxxn@users.noreply.github.com>
Co-authored-by: Joan Manto <120276510+JoanManto@users.noreply.github.com>
Co-authored-by: David Norman <120237773+DavidMNorman@users.noreply.github.com>
Co-authored-by: David Kim <david.toyou.kim@gmail.com>
Co-authored-by: Eileen Cho <109772371+exlxxn@users.noreply.github.com>
Co-authored-by: Joan Manto <120276510+JoanManto@users.noreply.github.com>
added functionality for persistent queries, refactored ObsidianRouter
Co-authored-by: David Norman <120237773+DavidMNorman@users.noreply.github.com>
Co-authored-by: David Kim <david.toyou.kim@gmail.com>
Co-authored-by: Eileen Cho <109772371+exlxxn@users.noreply.github.com>
Co-authored-by: Joan Manto <120276510+JoanManto@users.noreply.github.com>
Co-authored-by: David Norman <120237773+DavidMNorman@users.noreply.github.com>
Co-authored-by: David Kim <david.toyou.kim@gmail.com>
Co-authored-by: Eileen Cho <109772371+exlxxn@users.noreply.github.com>
Co-authored-by: Joan Manto <120276510+JoanManto@users.noreply.github.com>
Co-authored-by: David Norman <120237773+DavidMNorman@users.noreply.github.com>
Co-authored-by: David Kim <david.toyou.kim@gmail.com>
Co-authored-by: Eileen Cho <109772371+exlxxn@users.noreply.github.com>
Co-authored-by: Joan Manto <120276510+JoanManto@users.noreply.github.com>
… router to access queryStr where necessary

Co-authored-by: David Norman <120237773+DavidMNorman@users.noreply.github.com>
Co-authored-by: David Kim <david.toyou.kim@gmail.com>
Co-authored-by: Eileen Cho <109772371+exlxxn@users.noreply.github.com>
Co-authored-by: Joan Manto <120276510+JoanManto@users.noreply.github.com>
exlxxn and others added 28 commits April 6, 2023 18:53
…rite, createqueryKey, constructor), refactored Obsidian.ts, refactore normalize.ts

Co-authored-by: David Norman <120237773+DavidMNorman@users.noreply.github.com>
Co-authored-by: David Kim <david.toyou.kim@gmail.com>
Co-authored-by: Eileen Cho <109772371+exlxxn@users.noreply.github.com>
Co-authored-by: Joan Manto <120276510+JoanManto@users.noreply.github.com>
refactored cache initialization, refactored cache class (e.g. read, w…
Co-authored-by: David Norman <120237773+DavidMNorman@users.noreply.github.com>
Co-authored-by: David Kim <david.toyou.kim@gmail.com>
Co-authored-by: Eileen Cho <109772371+exlxxn@users.noreply.github.com>
Co-authored-by: Joan Manto <120276510+JoanManto@users.noreply.github.com>
…normalize.ts, ObsidianWrapper.jsx

Co-authored-by: David Norman <120237773+DavidMNorman@users.noreply.github.com>
Co-authored-by: David Kim <david.toyou.kim@gmail.com>
Co-authored-by: Eileen Cho <109772371+exlxxn@users.noreply.github.com>
Co-authored-by: Joan Manto <120276510+JoanManto@users.noreply.github.com>
clean up console.logs from Obsidian.ts, queryHash.js, quickCache.js, …
Co-authored-by: David Norman <120237773+DavidMNorman@users.noreply.github.com>
Co-authored-by: David Kim <david.toyou.kim@gmail.com>
Co-authored-by: Eileen Cho <109772371+exlxxn@users.noreply.github.com>
Co-authored-by: Joan Manto <120276510+JoanManto@users.noreply.github.com>
Clean code, remove console logs, add comments, remove vestigial files
Co-authored-by: David Norman <120237773+DavidMNorman@users.noreply.github.com>
Co-authored-by: David Kim <david.toyou.kim@gmail.com>
Co-authored-by: Eileen Cho <109772371+exlxxn@users.noreply.github.com>
Co-authored-by: Joan Manto <120276510+JoanManto@users.noreply.github.com>
…ated the readme for links to demo and devtool

Co-authored-by: David Norman <120237773+DavidMNorman@users.noreply.github.com>
Co-authored-by: David Kim <david.toyou.kim@gmail.com>
Co-authored-by: Eileen Cho <109772371+exlxxn@users.noreply.github.com>
Co-authored-by: Joan Manto <120276510+JoanManto@users.noreply.github.com>
added all versions of new logo and banner to repo for future use, upd…
Co-authored-by: David Norman <120237773+DavidMNorman@users.noreply.github.com>
Co-authored-by: David Kim <david.toyou.kim@gmail.com>
Co-authored-by: Eileen Cho <109772371+exlxxn@users.noreply.github.com>
Co-authored-by: Joan Manto <120276510+JoanManto@users.noreply.github.com>
Co-authored-by: David Norman <120237773+DavidMNorman@users.noreply.github.com>
Co-authored-by: David Kim <david.toyou.kim@gmail.com>
Co-authored-by: Eileen Cho <109772371+exlxxn@users.noreply.github.com>
Co-authored-by: Joan Manto <120276510+JoanManto@users.noreply.github.com>
Co-authored-by: David Norman <120237773+DavidMNorman@users.noreply.github.com>
Co-authored-by: David Kim <david.toyou.kim@gmail.com>
Co-authored-by: Eileen Cho <109772371+exlxxn@users.noreply.github.com>
Co-authored-by: Joan Manto <120276510+JoanManto@users.noreply.github.com>
Co-authored-by: David Norman <120237773+DavidMNorman@users.noreply.github.com>
Co-authored-by: David Kim <david.toyou.kim@gmail.com>
Co-authored-by: Eileen Cho <109772371+exlxxn@users.noreply.github.com>
Co-authored-by: Joan Manto <120276510+JoanManto@users.noreply.github.com>
Fix readme for setting up router
Copy link
Contributor

@JoanManto JoanManto left a comment

Choose a reason for hiding this comment

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

Lgtm, great job!

@DavidMNorman DavidMNorman merged commit d5d0d4d into open-source-labs:master Apr 12, 2023
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.

3 participants