Giter VIP home page Giter VIP logo

quoyserver's Introduction

Small and modular TCP Server

QUOY Server is a simple, small and modular TCP server written in Python. It uses classic fork-based command handling architecture. It is a heart of one of subsystems in my own cloud - it plays a role of console server.

A documentation with a specific standard of default communication protcol - Q.U.O.Y Protocol - will be added soon. P.S. QUOY relates to an animal - a quoy. As an acronym it stands for Quick-and-Useful Only Yours Protocol.

quoyserver's People

Contributors

0fca avatar quoyenjoyer avatar mariias3 avatar

Stargazers

Filip avatar  avatar sectasy avatar Ziemowit Wójcicki. avatar

Watchers

 avatar

Forkers

quoyenjoyer

quoyserver's Issues

Add console-like management

To start the server you need to run: python ./server.py
And that's fine.
However, after either hitting Cltr-C or making process run in the background somehow there is no actual way to control the behaviour of the server - you cannot safely stop it, what causes the network socket to get broken thus we end up with broken pipe and blocked port on the NIC which we were listening on.
Thus, as a users, we want to submit simple command to the server
when the server is running
to properly control server's behaviour.

Use "modules" mechanism to load commands

As for now, the commands' set is defined using const variable on top of server.py file.
It is kind of fine until you actually need to add support for a command to a server. Such solution creates a coupling between the server.py and commands as they are inside directory of commands.
We don't want the core server file to rely on implementation of any protocol.
So, the issue is to redesign commands mechanism to use "modules" mechanism to load commands as a module.
So, the default protocol for the server is Q.U.O.Y Protocol which defines just 4 or 5 basic commands of my own, custom purpose.
However, if we would like to implement some other custom protocol or even a HTTP protocol we would need to refactor some parts of server.py file.
Start defining that commands set is a module now - a file in commands directories.
Thus, we load it as a module, but the server needs to know that it should be used as a mapping for commands whereas all the commands cannot be inside one file. Those commands shall be placed in the subdirectory of commands with protocol name.

Add console command for removing active session of a user

There is no option for an administrator of server to remove arbitrary user session or in other words: to halt the session.
In other words, we need to add a command which will allow to stop user's session just by using simple, CLI command using UNIX socket.

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.