npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

corvoserver

v1.0.3

Published

An experimental, in-memory, key-value store with complex datatypes and optional persistence.

Downloads

6

Readme

Summary

CorvoStore is an in-memory, key-value store with optional persistence, written in a NodeJS context. It is an experimental project inspired by Redis. CorvoStore supports five data types in the value space: strings, lists, hashes, sets, and sorted sets.

CorvoStore uses the TCP protocol provided by Node’s Net module to facilitate communication between clients and a server.

Key-value stores are a subset of NoSQL databases. NoSQL databases in general are more performant than relational databases. Retrieving data from relational databases can be an expensive operation since the schema, or structure, of the data needs to be maintained. Key-value stores are useful for cases where data does not have a predefined structure.

Features

Overview

Here is a brief overview of CorvoStore’s data flow:

  • server receives a RESP-formatted command from client,
  • server passes the command to the parser for validation,
  • parser validates command and returns array of tokens,
  • server invokes a method in the store corresponding to the command, passing tokens as arguments,
  • server encodes return value from store method into RESP format and writes this back to the client,
  • client decodes value returned by server.

LRU Eviction

CorvoStore allows you to specify the maximum allowable memory for the key-value store, and evicts the least recently used key if the max memory is exceeded.

Multiple data types

You can store complex data types in the key-value store.

Persistence

CorvoStore optionally supports AOF (append-only file) persistence. Write operations that modify data are logged to a file, and the file is used to reconstruct the dataset when the server is started.

Installation

Installing the NPM Module with the Command Line

Install the module with the following command:

$ npm install corvoserver

Then, navigate to the following directory:

cd ~/node_modues/corvoserver

And then make sure to execute the following command:

$ npm install

After installation is complete, execute the following command:

$ npm start

Now, the server is listening on localhost:6793!

CorvoStore Command Line Arguments

CorvoStore accepts three command-line arguments:

maxMemory

Use this argument to set a max memory setting. If you don't provide this argument, a default value of 104857600 (100MB) is used.

--maxMemory <bytes>

aofPersistence

Use this argument to specify if AOF persistence has be to turned on. The argument has a default of false, so AOF persistence is off by default.

--aofPersistence <true/false>

aofWritePath

Use this argument to specify the file to be used for AOF persistence. If this argument is not supplied, the default file used is corvoAOF.aof in the current directory (current working directory when the command to start the server is issued).

--aofWritePath path/to/file/filename