Skip to content

Commotion Client Architecture

critzo edited this page May 15, 2014 · 6 revisions

The Commotion Client is a PyQt desktop application written in Python3.3.

Core Components

The core application is responsible for managing clean creation and destruction of the other components, changing the applications state (daemon mode / full gui).

Location: commotion_client/commotion_client.py Status: Working

The platform agnostic GUI components of the commotion-client written in pyQT. This component will create a simple overarching interface. It will ONLY provide graphical functionality. All actual networking and other functionality will be carried out by extensions. This GUI acts as a container for graphical control/configuration extensions. This will allow us to easily customize and modify our interfaces after UI/UX reviews, or for new features, by simply updating individual extensions. This will also allow for quick integration of extensions built by outside groups.

Location: commotion_client/GUI/ Status: Working

The inter-process communications (IPC) hub for all Commotion daemon interaction. The IPC controller uses PyQt Signals and Slots to provide an interface for Commotiond and the Commotion Service Manager. This tool will allow communication between the Client's extensions and the daemons as well as between the daemons.

Location: commotion_client/utils/ipc.py Status: Planned

This component manages user log-in and settings management. The settings manager provides an interface for user log-in and log-out that auto-loads user settings. It also provides an interface for extensions to save and load data from the secure user settings. This component will rely heavily on the GnuPG interface for encrypting and decrypting settings files.

Location: commotion_client/utils/settings.py Status: Planned

This manager is an interface for taking properly formatted extensions and loading them into the plugin directory structure. It also provides functionality for using the GnuPG interface for checking the authenticity of extensions.

Extensions provide the core user-facing functionality of the Commotion Client. Examples of extensions would be network-visualizers, profile editors, network configuration, etc.

Location: commotion_client/util/extension_manager.py Status: In Progress

A system tray item that provides a menu for users to interact with the core functionality of the Commotion Client without opening the full GUI.

Location: commotion_client/commotion_client.py Status: In Progress

An basic commotion network configuration tool that will live in the control panel. This will use the os specific chroming to achieve the greatest level of consistency to the platforms styling. If possible this will be integrated into the existing networking control panel. If not, tts design will be based upon the existing networking control panel to provide a consistant experience (as horrible as that sounds considering networking control panels on most platforms.)

Location: commotion_client/commotion_client.py Status: Planned

The Commotion Client is bundled into a stand alone application using the cx_freeze cross platform build tool for PyQt applications. The build system consists of a core Makefile which prepares the code-base for bundling using build helper scripts, and runs the setup script which bundles the executable.

Key Locations:

Required External Components

The Commotion Client relies on the following external code-bases.

(BEFORE BUNDLING EXTENSION FOR INSTALLATION)

commotion-client/
├── build
│   ├── build.py
│   └── compileUiFiles.py
├── commotion_client
│   ├── assets
│   │   ├── commotion_assets.qrc
│   │   ├── commotion_assets_rc.py
│   │   ├── images
│   │   │   ├── alert32.png
│   │   │   ├── alert48.png
│   │   │   ├── alert62.png
│   │   │   ├── loading62.gif
│   │   │   ├── logo1024.png
│   │   │   ├── logo16.png
│   │   │   ├── logo256.png
│   │   │   ├── logo32.png
│   │   │   ├── logo48.png
│   │   │   ├── logo512.png
│   │   │   ├── logo62.png
│   │   │   ├── question_mark_filled20.png
│   │   │   └── question_mark_filled41.png
│   │   ├── __init__.py
│   │   ├── README
│   │   └── stylesheets
│   │       └── forms.ss
│   ├── commotion_assets_rc.py
│   ├── commotion_client.py
│   ├── commotion_client.pyw
│   ├── data
│   ├── extensions
│   │   ├── config_editor
│   │   │   ├── config_editor.conf
│   │   │   ├── main.py
│   │   │   └── ui
│   │   │       └── config_manager.ui
│   │   └── __init__.py
│   ├── GUI
│   │   ├── crash_report.py
│   │   ├── main_window.py
│   │   ├── menu_bar.py
│   │   ├── system_tray.py
│   │   ├── ui
│   │   │   ├── crash_report_window.ui
│   │   │   ├── Ui_crash_report_window.py
│   │   │   ├── Ui_welcome_page.py
│   │   │   └── welcome_page.ui
│   │   └── welcome_page.py
│   ├── __init__.py
│   ├── temp
│   │   └── logfile.temp
│   ├── tests
│   │   ├── configs
│   │   │   └── extension
│   │   │       └── test_ext001.conf
│   │   ├── extensions
│   │   │   ├── __init__.py
│   │   │   └── test_ext001
│   │   │       ├── mainWin.ui
│   │   │       ├── myMain.py
│   │   │       ├── Ui_mainWin.py
│   │   │       ├── Ui_warning001.py
│   │   │       └── warning001.ui
│   │   ├── __init__.py
│   │   └── test_util_config.py
│   └── utils
│       ├── config.py
│       ├── extension_manager.py
│       ├── fs_utils.py
│       ├── __init__.py
│       ├── logger.py
│       ├── single_application.py
│       ├── thread.py
│       └── validate.py
├── commotionc.py
├── debian
│   ├── changelog
│   ├── commotion-linux-py.postinst
│   ├── compat
│   ├── control
│   ├── install
│   ├── links
│   ├── rules
│   └── source
│       └── format
├── docs
│   ├── extensions
│   │   ├── extension_template
│   │   │   ├── config.json
│   │   │   ├── main.py
│   │   │   ├── settings.py
│   │   │   ├── task_bar.py
│   │   │   └── test_suite.py
│   │   ├── tutorial
│   │   │   └── images
│   │   │       └── design
│   │   │           └── ssid_sketch.png
│   │   └── writing_extensions.md
│   └── style_standards
│       ├── google_docstring_example.py
│       └── README.md
├── fallback.py
├── LICENSE.txt
├── Makefile
├── README.md
├── setup.py
└── tests
    └── utils
        └── extension_manager_tests.py