Skip to content

This whole project serves the purpose of learning and experimenting with advanced system design. It does not solve a concrete problem nor the problem is well define, which reduce to a platform - when you cannot well define your problem and solution, you build a platform rather than build a specific solution.

Notifications You must be signed in to change notification settings

sahargavriely/the-unbearable-ease-of-programming

Repository files navigation

github-workflow codecov readthedocs

Credits and thanks go to Dan Gittik, this project is part of his amazing course, Advanced-System-design.

the-unbearable-ease-of-programming

This whole project serves the purpose of learning and experimenting with advanced system design. The learning you can find at the code-of-conduct file, in a succinct way; in many ways this is the golden gem of the project, it is about how to design rather than just having a good design; it is the abstraction while anything else is the implementation. The experimenting part is the brain-computer-interface python package and anything around it. It is a good (very good) example of a good design, it does not solve a concrete problem nor the problem is well define, which reduce to a platform - when you cannot well define your problem and solution, you build a platform (first rule of advanced system design, the second is that we do not talk about fc) rather than build a specific solution. The platform design is meant to be modular, decoupled and robust; hence making the system rather flexible, simple to modify, remove and add components. The platform composes of micro processes, each process has a well define role and does one task and one task only (doing this one task well, I allow myself to add). Note, the the project was being written in steps, at the beginning I did not know how everything is suppose to work and so I developed accordingly, later on I had more concrete knowledge but it was never complete; resulting in the platform you can see here. Let's go over the background.

brain-computer-interface

A brain-computer-interface (BCI) is a direct communication pathway between the brain's electrical activity and an external device, most commonly a computer or robotic limb. The project is assuming BCI hardware and is a software layer that commune with it, handle the data the hardware provides, parses it, saves it, publishes it and exposes it (Elon, if you want to collaborate let me know). It is build in such way that allows easy modification, deletion and addition - addition of more of the same and addition of new components completely.

flow

For further information take a look at full documentation.

Installation

  1. Clone the repository and enter it:

    $ git clone git@github.com:sahargavriely/the-unbearable-ease-of-programming.git
    ...
    $ cd the-unbearable-ease-of-programming/
  2. Run the installation script and activate the virtual environment (if you don't care about testing it and you're going to use docker consider jumping clause 4):

    $ ./scripts/install.sh
    ...
    $ source venv/bin/activate
    [brain-computer-interface] $  # you're good to go!
  3. To check that everything is working as expected, run the tests: (optional but recommended)

    $ pytest tests/
    ...
  4. Run the packages

    1. All of them at once with docker compose:

      $ ./scripts/run_pipeline.sh
      ...
    2. Selectively, run the packages one by one, choose which package to run. To do so you should go over each package's documentation and view how to run it. you can also run it in a docker environment with the build_and_run_dockerfile.sh in the scripts directory (based on Docker.base file), and in the docker environment run the same command you would have used without the docker (again, you can find the specific command in the specific documentation).

Packages

The package expose several sub-packages which can be run separately on a different machines. The sub-packages are:

  • client - uploads mind to the server.
  • server - receives minds from clients and forwarding them to the distributer.
  • distributer - distribute information to the different system component (driver-based).
  • parser - listen to raw minds, parse them and forwards them back to the distributer.
  • saver - listens to parses minds and saves them to the database.
  • database - holds the system data (driver-based).
  • rest - provides restful api - http request and cli to get the data from the database.

About

This whole project serves the purpose of learning and experimenting with advanced system design. It does not solve a concrete problem nor the problem is well define, which reduce to a platform - when you cannot well define your problem and solution, you build a platform rather than build a specific solution.

Resources

Code of conduct

Stars

Watchers

Forks

Packages

No packages published