comment server implemented in python to host comments on lbry
Find a file
2019-06-11 11:22:32 -04:00
config removes anonymous channel from being used as the default channel for anonymous comments 2019-05-31 15:55:48 -04:00
schema Includes signing_ts into params for insert_comment 2019-06-10 20:24:06 -04:00
src Merge remote-tracking branch 'origin/master' 2019-06-11 10:54:36 -04:00
tests Merge remote-tracking branch 'origin/master' 2019-06-11 10:54:36 -04:00
compile.py Moves async code around 2019-05-26 00:42:39 -04:00
LICENSE.md Create LICENSE.md 2019-05-21 08:17:10 -04:00
main.py Modifies tests and entrypoint 2019-05-29 18:01:48 -04:00
README.md removes irrelevant content 2019-06-11 11:22:32 -04:00
requirements.txt Makes compile-friendly 2019-05-25 22:44:56 -04:00
schema.png Updates schema diagram 2019-06-06 03:27:31 -05:00

LBRY Comment Server

Installation

Installing the server:


$ git clone https://github.com/osilkin98/comment-server
$ cd comment-server

# create a virtual environment
$ virtualenv --python=python3 venv

# Enter the virtual environment
$ source venv/bin/activate

# install the library dependencies
(venv) $ pip install -r requirements.txt

Usage

To start the server, simply run:

# to enter server's venv
$ source venv/bin/activate

# to actually run server
(venv) $ python -m main &  

Schema

schema

About

A lot of the design is more or less the same with the original, except this version focuses less on performance and more on scalability.

Rewritten with python because it's easier to adjust and maintain. Instead of doing any multithreading, this implementation just delegates a single database connection for write operations.

The server was originally implemented with aiohttp and uses aiojobs for scheduling write operations. As pointed out by several people, Python is a dinosaur in comparison to SQLite's execution speed, so there is no sensibility in multi-threading from the perspective of the server code itself.