Skip to content

evanwmart/custom-nosql-cdn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

custom-nosql-cdn


  1. Logging Module

    • Enhance Logs Endpoint: Serve logs as plain text or JSON through the /logs route.
  2. HTTP Module

    • Error Handling: Return more informative HTTP status codes and messages for errors (e.g., 400 Bad Request, 500 Internal Server Error).
  3. General Enhancements

    • Code Optimization: Avoid redundant cloning of Arc<Database> by passing references where possible.
  4. Database Module

    • Improve Efficiency: Add a memory cache (e.g., HashMap) to speed up frequently accessed keys.

  1. Database Module

    • Batch Reads and Writes: Implement a write buffer and batch read functionality to reduce I/O overhead.
  2. HTTP Module

    • Async Database Operations: Offload database operations to a thread pool using tokio::task::spawn_blocking.
  3. Logging Module

    • Asynchronous Logging: Use an async logging library (tracing or tokio::task::spawn) to offload file writes and reduce blocking.
  4. HTTP Module

    • Add Authentication: Protect sensitive routes (e.g., /insert) with API key or token-based authentication.

  1. HTTP Module

    • Efficient Data Formats: Use compact response formats for the get endpoint, serializing raw data for clients.
  2. Database Module

    • Checksum Optimization: Avoid computing the checksum for all records during a get operation unless absolutely necessary.
  3. General Enhancements

    • Testing and Benchmarking: Add unit and integration tests to ensure functionality and edge-case handling.

  1. Database Module

    • Indexing: Introduce an in-memory index (e.g., HashMap) for fast key lookups. Periodically persist the index to disk.
  2. Logging Module

    • Buffer Size Management: Dynamically adjust the buffer size during high traffic to reduce write frequency.
  3. Database Module

    • Concurrency Control: Use thread-safe structures like Arc<Mutex<T>> or append-only log file structures to safely handle concurrent writes.
  4. HTTP Module

    • Route Optimization: Refactor with Warp's BoxedFilter to minimize redundant cloning of db and logger filters.

  1. Database Module

    • File Segmentation: Split the database file into smaller segments based on size or timestamp for efficient queries and easier backups.
  2. Database Module

    • Compaction: Implement a background thread for merging fragmented data and removing outdated records.

  1. Logging Module

    • Structured Logging: Format logs as structured JSON for better parsing and monitoring.
  2. General Enhancements

    • Scale for Concurrent Access: Ensure proper synchronization mechanisms for safe concurrent database access.

  1. Database Module

    • Extend Data Structure: Support more complex values (e.g., nested structures or lists) and add support for queries like "list all keys."
  2. Logging Module

    • Log Rotation and Archival: Automatically rotate and compress old logs to save disk space.

  1. Database Module

    • Compression: Integrate compression algorithms (e.g., Snappy or zlib) for data storage.
  2. General Enhancements

    • Resiliency: Introduce checkpoints or snapshots for crash recovery.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published