alextercete / text-ranker

Show statistics of text sent through TCP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Text ranker

Prerequisites

Make sure you have Node.js installed.

Running

$ bin/text-ranker

Optionally, specify the TCP (defaults to 5555) and HTTP (defaults to 8080) ports to use:

$ bin/text-ranker --tcp-port 4444 --http-port 9090

Contributing

  1. Install the dependencies:
$ npm install
  1. Run the tests:
$ npm test

TODO

Use persistent storage

Use Redis in order to allow scaling up the application to run as multiple processes/servers. This means replacing inMemoryStorage with an implementation that wraps the following commands:

Wrapper method Redis command
redisStorage.count ZCOUNT
redisStorage.getHighestScoringMembers ZREVRANGE
redisStorage.incrementMemberScore ZINCRBY

For the integration tests, set up a local Redis server using Vagrant.

Improve command-line interface

Provide a --help option.

About

Show statistics of text sent through TCP


Languages

Language:JavaScript 100.0%