Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

Implement Caching Layer #5

Open
1 of 13 tasks
JosiahBull opened this issue Nov 6, 2021 · 0 comments
Open
1 of 13 tasks

Implement Caching Layer #5

JosiahBull opened this issue Nov 6, 2021 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed
Milestone

Comments

@JosiahBull
Copy link
Owner

Description

Generating .wav files is extremely resource intensive. We need to cache commonly requested .wav files which should vastly improve performance.
The general requirements is that this stores files, limited by either number of files or total filesize. It must be able to be stopped/started easily, and be completely asynchronous.

Tasks

  • Initial design of cache file, and figure out the backing data structures.
  • Decide whether the cache is going to be a separate service, or be built into the app as a monolithic.
  • Integration with Rocket, ideally through a simple request guard.
  • Thread safe! Need to ensure we have implementation of send + sync.
  • Able to handle large volume of requests and items with minimal overhead.
    • Benchmarks
    • Design to handle ~30k items. Heap allocated elements with Box is going to be a good idea.
    • Test throughput with 25 sources sending reqs, 10 getting cached elements, 15 generating unique elements.
  • Generating new .wav files should be pushed to a separate thread (or a separate service entirely).
  • Completely asynchronous design.
    • Handle serving cached .wav files while generating new ones for other reuqests.
    • Generate multiple .wav files at once with a configurable thread pool.
    • Queue generation requests and send them out as workers come free.
@JosiahBull JosiahBull added enhancement New feature or request help wanted Extra attention is needed labels Nov 6, 2021
@JosiahBull JosiahBull added this to the 0.3-Beta milestone Nov 6, 2021
@JosiahBull JosiahBull modified the milestones: 0.3-Beta, 0.4-Beta Nov 7, 2021
@JosiahBull JosiahBull mentioned this issue Nov 10, 2021
5 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant