Coder Social home page Coder Social logo

knossos-server's Introduction

Knossos server tools

Various scripts / tools which are related to Knossos but belong on a server, not on the client.

Dependencies

To run these scripts you'll need the following:

The following commands should install everything you need:

  • Ubuntu: apt-get install python3 python3-six p7zip-full p7zip-rar
  • Arch Linux: pacman -S python python-six p7zip

Installation

  1. Install the dependencies listed in requirements.txt (pip install -r requirements.txt).
  2. Copy conf/settings.py.dist to conf/settings.py and change it to fit your environment.

Usage

If you're developing or want to get the server running quickly, you can run the launch.sh script.

The server consists of three components:

  • server.py: This is a normal WSGI application which can run on a WSGI server (mod_wsgi, uwsgi, gunicorn, etc.) it servers all regular HTTP requests and is implemented using Flask. You can also run the script directly to launch it without a WSGI server.

  • websocket_server.py: This part is implemented using Tornado and handles all WebSocket requests. IMPORTANT: At any point in time there should only be one process running this script.

  • worker.py: This part does most of the actual work. You can run as many instances of this as you want. It doesn't listen as a server but connects to Redis.

All three components communicate over Redis. server.py and websocket_server.py should be reachable over the same domain and port. One possible setup is to run uwsgi with the provided config in conf/app.ini which will properly distribute the requests.

You should run the cron.py script about once per day, it removes old / unused data from the Redis store.

License

Licensed under the Apache License, Version 2.0. The third party code contained in third_party and static is licensed under the MIT License. The relevant files are marked accordingly.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.