Skip to content

tolstoyevsky/shirow

Repository files navigation

build pypi npm

Shirow

Shirow

Shirow is an RPC server framework based on top of Tornado. It relies on the WebSocket protocol for transport and uses JSON-messages as payload.

The primary goal of Shirow is to simplify creating microservices using Tornado, allowing clients to leverage some of the Django facilities such as the Django authentication system. Thus, Shirow might help with the task of creating (micro)services which require the clients to be authenticated via the Django authentication system.

The project was named after Masamune Shirow, a mangaka who is best known for such mangas as Black Magic, Appleseed and Ghost in the Shell.

Features

  • Each (micro)service built using Shirow is an RPC server that relies on the WebSocket protocol for transport and uses JSON-messages as payload.
  • Shirow expands the Tornado implementation of the WebSocket protocol with an JWT-based authentication layer. So, a client has to pass a valid JWT token to the RPC server, which was received after a successful authentication procedure, to prove Shirow that it's an authenticated.
  • Shirow is fully compatible with the JWT tokens provided by Simple JWT, a JSON Web Token authentication plugin for the Django REST Framework. The main requirement to JWT tokens is they must contain the following fields:
    • user_id: the id of the user the the request was sent on behalf of;
    • exp: the expiration time stored as an absolute Unix timestamp.
  • The clients can be written in JavaScript using the Shirow NPM package.

Authors

See AUTHORS.

Licensing

Shirow is available under the Apache License, Version 2.0.