Add New Page: You are not allowed to add pages Select section/namespace. New page title.
 

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

commotion_architecture:core_components:commotion_client_architecture [2014/05/01 19:26] (current)
Line 1: Line 1:
 +~~REDIRECT>​https://​github.com/​opentechinstitute/​commotion-client/​wiki~~
 +{{indexmenu_n>​4}}
 +====== Commotion Client Architecture ======
 +
 +====== Architecture Staging Area ======
 +
 +===== Functional Componenets =====
 +
 +==== Core Componenets ====
 +
 +  * commotion_controller (Middleware (controller))
 +The middleware is the core logical component of the commotion-client software stack. This unit receives requests from the plugins related to networking tasks and network data. The Midddleware will also do input checking for the commotiond and commotion service manager. The middleware will be critical as development moves forward because it will contain code to shunt platform specific networking functionality to the network agent interceptor for that platform until commotiond contains full multi-platform support. The middleware will have a PyQt (slot/​Signal) message interface that will allow it to receive messages from any commotion GUI component and then announce back to all components about changes. This will be a very high level control structure consisting of a very limited set of commands( create(profile),​ delete(profile),​ start(interface,​ profile), stop(interface,​ profile), modify(profile,​ attribute, value)). After receiving any of these calls the commotion controller will then activate any required network-agent interceptor functions and then pass the request on to commotiond who will do the heavy lifting.
 +
 +  * Network Agent Interceptor
 +The Network Agent interceptor is an OS specific network setup and management program. This set of functions will contain the supporting functionality that is needed to deal with platform specific bits and bobs in the networking stack that have yet to be incorporated into commotiond. As such, each major function that the middleware exposes will have a network agent interceptor hook that will rnu if there are required setup/​destruction functions that are needed. Over time this set of functions should be made near non-existant and only used as a platform for quick bug-fixes that arise on specific platforms while long-term bug fixes within commotiond are put in place.
 +
 +  * GUI (view)
 +The platform agnostic GUI components of the commotion-client written in pyQT. This component will create a simple overarching interface which will allow  extensions to request placement in the interface so that it can be easily customized after UI/UX reviews without having to update specific individual extension functionality. It should be noted that while the interface will provide menu functionality that each plugin can call, the internal GUI components of plugins must be contained within the plugin itself. ​
 +
 +  * extension manager
 +This manager will be an interface for taking properly formatted extensions and loading them into the plugin directory structure.
 +
 +  * extensions
 +Extensions provide the core user-facing functionality of the Commotion Client. A extension will contain a initializer to add it to the GUI menu and content area, a qt graphical interface if the extension will have a visual component, and a set of functions to interact with the middleware. Examples of extensions would be network-visualizers,​ profile editors, network configuration,​ etc.
 +
 +==== Stored Data ====
 +
 +  * Platform Profile
 +Each platform will have platform specific profile that will be used to store language settings, user profiles, profile-interface pairings, and other non-commotion profile related settings.
 +
 +==== Required External Components ====
 +
 +  * Commotiond
 +  * Commotion Service Manager
 +
 +===== Repository Structure (BEFORE BUNDLING EXTENSION FOR INSTALLATION) =====
 +
 +commotion-client/​
 +
 +<​code>​
 +├── 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
 +</​code>​
 +===== GUI Components =====
 +
 +The Graphical user interface for the commotion_client will be a cross platform gui where most of the "​in-client"​ components will be identical across platforms. The tool-bar icon and  control panel extension will use the os specific chroming to achieve ​ the greatest level of consistency to the platforms styling.
 +
 +==== Main Window ====
 +
 +The main window will consist of three parts. ​ 1) The [[commotion_client_architecture#​Menu-Bar|Menu-Bar]],​ 2) the [[commotion_client_architecture#​Tool-Bar|Tool-Bar]],​ and the 3) [[commotion_client_architecture#​Main-Viewport| Main-Viewport]].
 +{{ ::​main_window_areas_osx.png?​nolink&​400 |}}
 +
 +The above example shows a OSX version of the commotion_client. These *ROUGH* mock-ups show that the client will remain as consistent inside the main window as possible while using the browser consistent chroming whenever possible. NOTE: the items shown in the menu-bar in these mock-ups will NOT reflect the final menu-bar items.
 +
 +{{::​expanded_menu_bar_linux.png?​nolink&​400 |}} {{:​expanded_menu_bar_win.png?​nolink&​300 |}} {{:​expanded_menu_bar_osx.png?​nolink&​400 |}}
 +
 +
 +==== Menu-Bar ====
 +
 +The Commotion-client menu-bar is the main client navigation tool for networking and network status functionality. This menu-bar is populated by querying the various extensions. This will allow for a consistent navigation experience for users, and easy integration for developers. By making the menu automatically reach out to all enabled plugins developers only need a small config file to integrate their extension into commotion. This along with gui tools such as the pyqt developer platform to build their GUI elements allows networking developers to focus on what they know best, instead of learning the PyQT API.
 +
 +The Menu-Bar element of the commotion_client GUI will have the following functions:
 +
 +  * Get a list of all extensions and display the appropriate buttons and sub-menu'​s as defined by each extension.
 +  * Refresh its menus on the addition or removal of a extension.
 +  * Be collapsible and re-openable through the use of a handle as well as when the toolbar "​full-screen"​ action is activated.
 +  * Display sub-menu'​s of the current top-level section a user is within.
 +  * Upon clicking a menu-item (top-level or sub-menu) load the corresponding extension in the main viewing area.
 +
 +The handle and divider to collapse and reopen the menu will use the standard OS chrome and drag handle widgets. Here is a mock-up of the collapsed state. It is the handle on the left hand side of the screen. Not very impressive. But, it needs to be documented.
 +
 +{{::​collapsed_menu_bar_osx.png?​nolink&​300 |}}
 +
 +==== Tool-Bar ====
 +
 +The tool bar is an object that lives within the main viewport. Unlike the menu-bar this object offers a user interface for the actions related to the commotion-client GUI interface and otherwise unrelated to the functionality of the commotion-client. This tool-bar will have pre-built objects for common functions that will allow a developer building a extension to focus more on the functionality they need and not on learning the PyQt API.
 +
 +//A note on icons and the use of a tool-bar over a file menu: The actions contained in our tool bar are menu's that would live in a traditional "file menu" if the commotion-client was a program that was file based. Because commotion is a networking agent we decided to abstract our settings using one of the many ubiquitous iconographic design patterns. This both allows cross platform uniformity and solves the naming abstraction problem of the file menu. The current icons seen in this menu are temporary until we standardize the icons and incorporate them into our human interface guidelines. For the purposes of the development stage we will use the cog for settings and sideways commotion for users. In choosing between the "​big-two"​ of "three lines" and the "​cog"​ we decided to go with the cog for the development cycle because it fits our existing visual style. We decided to use the sideways commotion for the user because our logo kind of looks like a person when sideways. And, if it is up to this developer, we will not stray far from this for the final icon because it is absolutely delightful! //
 +
 +The tool bar will have the following functional requirements:​
 +
 +  * When a extension is activated the toolbar should display itself in the main view area with at LEAST the following default menu'​s. ​
 +    * Settings (Gear Image) (opens dropdown menu of the following)
 +      * exit (close the gui, not the commotion_client)
 +      * about (open the about page in main view)
 +      * settings (opens commotion_client_GUI settings page)
 +      * update (check commotion website for updates)
 +      * extensions (opens extension management interface)
 +    * User (sideways Commotion logo person) (opens dropdown menu of the following)
 +      * Login/​Logout (opens login/​logout page for users)
 +      * Preferences (opens user preferences page)
 +    * Full-Screen (that box with lines around its corners) (minimized the menu-bar and puts the main window into full screen mode)
 +  * Any extension may add actions to the toolbar using one of the pre-build icons or one of their own creation. Prebuilt icons are as follows.
 +    * save
 +    * load
 +    * print
 +  * extension may add items to existing tool-bar dropdown boxes (settings, user) if it is a section name that does not already exist.
 +  * The tool-bar must refresh upon any main view screen change or refresh
 +
 +==== Main-Viewport ====
 +
 +The main viewport is a container within which extensions and the tool-bar are displayed. On the code level this means that when a extension is called from the side menu it is created as a child of the main viewport and therefore contained within it. The only real notable properties of this space is that it contains the interesting bits of the client.
 +
 +==== Crash Reporter ====
 +
 +The crash reporter handles GUI crashes by providing a user window with crash info and reporting options as well as handling the compilation of the crash report. ​ The crash reported exposes two signals for managing crash report collection. It will emit a signal through crash_override to let the system know that it has encountered a crash. Once it has emitted a crash_override signal it will then connect a collector function to its crash_info signal.
 +
 +
 +Within the main window objects can be connected to the crash reporter as such. The following uses a module with a crash data collection signal named "​data_report"​ to send crash_reports and "​start_report_collection"​ to start collection.
 +
 +<​code>​
 +#just creating the object
 +self.module = MyModule() ​
 +
 +#crash reporting starts here
 +#connect crash reporter alerts to the modules report creator
 +self.crash_report.crash_override.connect(self.module.start_report_collection) ​
 +#connect the modules report emitter to the crash report report collector
 +self.module.data_report.connect(self.crash_report.crash_info)
 +
 +</​code>​
 +
 +
 +A crash report sent to the crash reporter consists of two arguments. A string with the name of the modules and a dictionary containing a key, value pairs of the information that component will need.
 +
 +"​module_name",​ {"​value name 01" = "​value",​ "value name 02" = "​value",​ "value name 03" = "​value"​}
 +
 +The signal emiter will look somthing like this. 
 +<​code>​
 +self.mySignal.emit("​myModule",​ {"​value name 01" = "​value",​ "value name 02" = "​value",​ "value name 03" = "​value"​})
 +</​code>​
 +
 +
 +The final report will take the values from all crash reports the reporter received in the request period and compile them into a dictionary.
 +
 +{"​section name 1" = {"​value name 01" = "​value",​ "value name 02" = "​value",​ "value name 03" = "​value"​},​
 +
 + "​section name 2" = {"​value name 01" = "​value",​ "value name 02" = "​value",​ "value name 03" = "​value"​},​
 +
 + "​section name 3" = {"​value name 01" = "​value",​ "value name 02" = "​value",​ "value name 03" = "​value"​},​
 +
 + "​section name 4" = {"​value name 01" = "​value",​ "value name 02" = "​value",​ "value name 03" = "​value"​}}
 +
 +That dictionary gets created into a user-readable crash report that looks like this.
 +
 +<​code>​
 +
 +========== ​ Error ===========
 +
 +This is the error that the user encountered that started this whole mess.
 +
 +Traceback (most recent call last):
 +  File "<​doctest...>",​ line 10, in <​module>​
 +    lumberjack()
 +  File "<​doctest...>",​ line 4, in lumberjack
 +    bright_side_of_death()
 +    ​
 +========== ​ system info ==========
 +
 +version = 1.0
 +endian = little endian
 +arch_size =  64bit
 +
 +========== ​ section name 1  ==========
 +
 +value name 01 = value
 +value name 02 = value
 +value name 03 = value
 +
 +========== ​ section name 2  ==========
 +
 +value name 01 = value
 +value name 02 = value
 +value name 03 = value
 +
 +========== ​ section name 3  ==========
 +
 +value name 01 = value
 +value name 02 = value
 +value name 03 = value
 +
 +========== ​ section name 4  ==========
 +
 +value name 01 = value
 +value name 02 = value
 +value name 03 = value
 +
 +
 +attached: log_report
 +
 +</​code>​
 +
 +
 +=====  Extensions =====
 +
 +The commotion_client'​s main user-facing functionality will take place within extensions. This series of swappable components will provide the configuration,​ visualization,​ and other networking functionality of the client. These components will be intentionally loosely coupled from the core GUI so that as developers want to add functionality it is easy to implement new extensions without digging into the commotion_client code-base. As more protocols are adopted this will also allow for communities to easily remove extensions that are not compatible with their unique network configurations. After installation users will be able to install, uninstall, enable, disable, update, and configure extension from a extension menu. 
 +
 +
 +=== Core vs. Contrib Extensions ===
 +
 +The core functionality of Commotion will be provided upon install by a set of "​core"​ extensions. The **only** difference between the two is that "​core"​ extensions, unlike user-installed extensions, will not be uninstall-able. Commotion currently only supports the OLSR routing protocol. As such, Version 2.0 will have a set of "​core"​ extensions that are OLSR based. As Commotion extends support for various protocols the "​core"​ extension set will also adapt or grow to accommodate the full core functionality of the underlying commotion networking software. ​
 +
 +**Examples of "​core"​ extensions:​**
 +  * Commotion Application Manager
 +  * Network Visualizer
 +  * Commotion Profile Manager
 +
 +**Examples of "​contrib"​ extensions:​** (NOTE: I just made these up... they are not on the development roadmap for the commotion-client)
 +  * Network favorites (save signature and address'​ of applications on the network you like)
 +  * Node management tool-kit (for remote management and monitoring of commotion-router'​s)
 +
 +==== Extension Development ====
 +
 +=== Interface Development ===
 +
 +Unlike the core commotion_client code base which will be hand-written PyQt code extensions should be, whenever possible, developed using a PyQt graphical development environment that calls a python library written by the development team. By decoupling the graphical components from the underlying code that interacts with commotion we will ensure that the back end's of extensions are easy to update and test for developers unfamiliar with the PyQt API. This will also mean that those developers can rapidly build a functional GUI with a PyQt graphical environment that can later be polished and made compliant with the human interface guidelines.
 +
 +=== Extension Packaging ===
 +
 +Extensions are delivered to a user as a single "​zip"​ file. Each extension must be bundled using the zip archiving format. ​
 +
 +To package up an extension for the Commotion Client follow these steps.
 +  * Download the [[https://​github.com/​opentechinstitute/​commotion-client|Commotion_Client repository]]. ​
 +  * Create a folder in the commotion_client/​extensions/​ directory with the name of your extension
 +  * Run <code bash>​make extensions</​code>​ from the root directory of the Commotion_Client
 +  * There should be a single zip file in the build/​resources/​ folder with the same name as your extension. ​
 +  * That file is your extension
 +
 +=== Extension Verification ===
 +
 +**Much needed research on signature verification and UI/UX means this will not be implemented until Version 2.0.**
 +
 +In the future upon loading, and extension may, optionally, be checked against a "​verification"​ text file containing a pgp signature of the compressed extension that the user has obtained separately from the application. ​
 +
 +=== Adding Extensions to Builds ===
 +
 +Extensions are built-in to the Commotion client by adding them to the extension folder and then adding that folder name to the core_extensions list in the setup.py.
 +
 +<code python>
 +core_extensions = ["​config_editor",​ "​main_window",​ "​your_extension_name"​]
 +</​code>​
 +
 +
 +==== Default Extension Installation Directories ====
 +
 +=== OSX: ===
 +
 +  * user: $HOME/​Library/​Commotion/​extension_data/​
 +  * global: /​Library/​Application Support /​Commotion/​extension_data/​
 +
 +=== Windows: ===
 +
 +  * user: %APPDATA%\Local\Commotion\extension_data\ ​
 +  * global: %COMMON_APPDATA%\Local\Commotion\extension_data\
 +    * The %APPDATA% path is usually C:​\Documents and Settings\User Name\Application Data; the %COMMON_APPDATA% path is usually C:​\Documents and Settings\All Users\Application Data.
 +
 +=== Linux: ===
 +
 +  * user: $HOME/​.Commotion/​extension_data/​
 +  * global: /​usr/​share/​Commotion/​extension_data/​
 +
 +==== Extension Config ====
 +
 +An extension config file is used my the Commotion Client for the installation and execution of extensions. This JSON formatted file contains the following values.
 +
 +**naming convention:​**
 +Commotion config files must end in ```.conf``` and cannot contain any invalid characters for the platform that they are installed on. Because the Commotion Client will be extended to be at least OSX, Win, and Linux compatible the following characters should be avoided in all names. ```|\?​*<":>​+[]/​```
 +
 +**example config:**
 +A complete config file will look like this.
 +<code json>
 +{
 +
 +"​name":"​test_ext001",​
 +
 +"​menu_item":"​Test Extension 001",
 +
 +"​menu_level":​10,​
 +
 +"​parent":"​Test Suite",​
 +
 +"​settings":"​mySettings",​
 +
 +"​toolbar":"​myToolBar",​
 +
 +"​main":"​myMain"​
 +
 +}
 +</​code>​
 +
 +==== Extension Config Properties ====
 +
 +=== name ===
 + 
 +**overview:​**
 +The name of the extension. This will be the name that the commotion client will use to import the extension after installation,​ and MUST be unique across the extensions that the user has installed.
 +
 +**default ​ value:**
 +  * None: Required Value
 +
 +**example usage:**
 +<code python>
 +import os.path
 +
 +if os.path.isfile("​commotion_client/​extensions/"​+name):​
 +    from extension import name
 +</​code>​
 +
 +**relevant files:**
 +  * commotion_client/​utils/​extension_manager.py ​
 +
 +=== menu_item: ===
 +
 +**overview:​**
 +The name displayed in the sub-menu that will load this extension. This is a string that is between 2 and 40 chars.
 +
 +**default ​ value:**
 +  * str(config.name)
 +
 +**relevant files:**
 +  * commotion_client/​GUI/​menu_bar.py
 +  * commotion_client/​utils/​extension_manager.py ​
 +
 +=== menu_level: ===
 +
 +**overview:​**
 +The level at which this sub-menu item will be displayed in relation to other sub-menu items. This number must be between 0 and 100. The lower the number the higher up in the sub-menu.
 +
 +**default ​ value:**
 +  * int(10)
 +
 +**relevant files:**
 +  * commotion_client/​GUI/​menu_bar.py
 +  * commotion_client/​utils/​extension_manager.py ​
 +
 +=== parent: ===
 +
 +**overview:​**
 +The top-level menu-item that this extension falls under. If this top-level menu does not exist it will be created. The top-level menu-item is simply a container that when clicked reveals the items below it. This is a string that is between 2 and 40 chars.
 +
 +**default ​ value:**
 +  * str("​Extensions"​)
 +
 +**relevant files:**
 +  * commotion_client/​GUI/​menu_bar.py
 +  * commotion_client/​utils/​extension_manager.py ​
 +
 +=== main: (optional) ===
 +
 +The file name to use to populate the extensions initial view-port. This can be the same file as the settings and toolbar as long as that file contains seperate functions for each object type.
 +
 +**default ​ value:**
 +  * str("​main"​)
 +
 +**example usage:**
 +<code python>
 +from extension import name.main
 +
 +self.extension_viewport = main.Viewport()
 +
 +</​code>​
 +
 +
 +**relevant files:**
 +  * commotion_client/​GUI/​main_window.py
 +  * commotion_client/​utils/​extension_manager.py ​
 +
 +=== settings: (optional) ===
 +
 +The file that contains the settings page for the extension. If this is not included in the config file and a "​SettingsMenu"​ class is not found in the file listed under the "​main"​ option the extension will not list a settings button in the extension settings page.
 +
 +**default ​ value:**
 +  * str(config.main)
 +
 +**example usage:**
 +<code python>
 +from extension.name import settings
 +
 +self.settings_menu = settings.SettingsMenu()
 +
 +</​code>​
 +
 +**relevant files:**
 +  * commotion_client/​GUI/​extension_settings.py
 +  * commotion_client/​utils/​extension_manager.py ​
 +
 +=== toolbar: (optional) ===
 +
 +The file that contains the function that will return the custom tool-bar when run. The implementation of this is still in development. If not set and a "​ToolBar"​ class is not found in the file listed under the "​main"​ option the default toolbar will be implemented.
 +
 +**default ​ value:**
 +  * str(config.main)
 +
 +**example usage:**
 +<code python>
 +from extension.name import toolbar as extension_toolbar
 +from GUI import toolbar as default_toolbar
 +
 +try:
 +    self.toolbar = extension_toolbar.ToolBar()
 +except AttributeError as _excpt:
 +    self.toolbar = default_toolbar.ToolBar()
 +</​code>​
 +
 +**relevant files:**
 +  * commotion_client/​utils/​extension_manager.py ​
 +
 +=== tests: (optional, but bad form if missing) === 
 +
 +The file that contains the unitTests for this extension. This will be run when the main test_suite is called. If missing you will make the Commotion development team cry.
 +
 +**default ​ value:**
 +  * str("​tests"​)
 +
 +**example usage:**
 +<code python>
 +from extension.name import tests
 +
 +suite = unittest.TestLoader().loadTestsFromModule(tests)
 +unittest.TextTestRunner(verbosity=2).run(suite)
 +
 +</​code>​
 +
 +**relevant files:**
 +  * commotion_client/​utils/​extension_manager.py ​
 +  * tests/​run_tests.py
 +  * commotion_client/​tests/​run_unittests.py
 +
 +===== Settings Menus =====
 +
 +Settings menu-pages are core extensions that are used for configuration of the commotion-client environment. Because these menu's are used to configure settings that are specific to the device, and not to the network'​s the user is attempting to connect with they are logically separated from networking configurations. This is done by placing the entry-points for these menu's in the tool-bar instead of the menu-bar.
 +
 +==== Settings Menu ====
 +
 +The settings menu will allow a user to track commotion_client wide settings. These settings include sections for controlling alerts, network interface defaults, application settings, sounds, translation & usability, privacy, security, updates, and an advanced menu for controlling logging, and crash reporting.
 +
 +Settings
 +  - General
 +    - Default Device Order (for commotion networking Enable with checkboxes and order with drag and drop) Defaults to wireless
 +    - Auto-connect to saved networks when in range? (checkbox: off by default)
 +  - Appearance
 +    - Language
 +    - Text size
 +    - Font
 +    - Zoom (?? This may be infeasible... I will look into PyQt 508 compliance)
 +  - Users
 +    - Add User
 +    - Delete User
 +  - privacy
 +  - security
 +  - advanced
 +    - reset to default settings
 +    - continue running background apps when commotion-client is closed? (yes by default)
 +  - sounds & Alerts
 +    - mute all sounds
 +    - Disable all alerts
 +    - overall volume
 +    - custom sound volumes (by type)
 +    - turn on/off alerts
 +      - connected to mesh network (when an interface actually starts to receive traffic from a mesh it is attempting to connect to - like TC messages)
 +      - Saved Ad-Hoc Network found (would have to go by mesh ssid, so not totally accurate, but a good indicator)
 +  - Applications
 +    - Sign applications with user keys or a default key
 +
 +==== User Preferences ====
 +
 +The user menu allows multiple users/​identities for a single commotion_client. This menu will contain all user-specific settings and histories as well as all serval-keyring management for a specific identity. We are currently in the process of reviewing our serval/​commotion road-map to identify how serval keys across multiple users will be managed. We will update this section once we have a clear idea of this road-map. ​
 +
 +  - Privacy
 +    - Sign applications with user key?
 +    - Sign messages with user key?
 +  - Security
 +    - save passwords
 +    - enable password auto-fill
 +
 +==== Extension Menu ====
 +
 +This menu allows a user to install, uninstall, enable, disable, update, and configure [[commotion_client_architecture#​Extensions/​plug-in'​s/​add-on'​s/​extensions|Extensions]]. ​
 +
 +  - add extension
 +    - Install from file
 +    - browse extensions ​
 +      - Local
 +      - On-internet
 +      - [[http://​blog.aereo.com/​wp-content/​uploads/​2013/​09/​Seal-of-approval.jpg|Commotion-Certified]]
 +  - Manage extensions
 +    - Extension 001
 +      - enable/​disable extension
 +      - remove extension
 +      - settings
 +
 +==== Settings Menu Development Note ====
 +
 +Because these menu's are not called from the menu-bar these modules will not have a menu specified in their module configuration file. Instead they will have to be added to the tool-bar dynamically by the modules that require them. Core modules are hard-coded to the tool-bar as shown in the [[commotion_client_architecture#​Tool-bar|Tool-Bar section]] to ensure that they are provided with every module.
 +
 +==== Privilege Separation ====
 +
 +The commotion client will need superuser permissions for some of the networking configuration it must do. As such, we will employ privilege separation in the application to isolate the code that actually runs as "​root"​ to as few lines as possible. When the Commotion client is run it will fork out the privileged code and then drop privileges everywhere else. We will be using Moxie Marlinspikes privlage seperation in [[https://​github.com/​moxie0/​knockknock/​blob/​master/​knockknock-daemon.py|KnockKnock]] as a guide for implementing this feature.
 +
 +
 +Windows will require that we have fall-backs for the use of the os.getuid function. An example take from [[https://​stackoverflow.com/​questions/​1026431/​cross-platform-way-to-check-admin-rights-in-a-python-script-under-windows|stackoverflow]] that will check for admin is shown below as an example.
 +
 +<code python>
 +import ctypes, os
 +try:
 + ​is_admin = os.getuid() == 0
 +except AttributeError:​
 + ​is_admin = ctypes.windll.shell32.IsUserAnAdmin() != 0
 +
 +print is_admin
 +</​code>​
 +
 +A narrative description of the standard step by step process in unix is in the [[https://​github.com/​zedshaw/​python-lust#​how-daemonizechrootdrop-priv-works|python-lust readme]]. ​ The code for this can be found [[https://​github.com/​zedshaw/​python-lust/​blob/​master/​lust/​unix.py|here.]]
 +
 +
 +===== Testing & Analytics ​ =====
 +
 +==== Testing ====
 +Unit tests should be implemented for all components of the commotion client. This includes extensions, which have a system for loading unit-tests. The test suite for each module and extension should also contain "User Diagnostic"​ data that will include tests that output diagnostic data to the commotion bug-reporter.
 +
 +==== Analytics ====
 +We aspires to make the Commotion client a platform that can be thoroughly tested for usability and training purposes. To this end we are debating ​ the implementation of and optional analytics build option to create a Commotion Platform that will be used to monitor a user behavior on the tool. This will keep basic analytics about length of time on a page and number of visits, track a users mouse movements within the bounds of the application,​ usability task instructions,​ and basic controls for allowing a user to mark the page with a comment and track individual usability tasks.
 +
 +
 +=== Privacy Concerns ===
 +Adding an easily built-on "​analytics mode" will require a great deal of thought to the security of the platform. As such, before an analytics mode is put into place certain precations will be taken.
 +  * Field'​s that can be used to identify or build a extendable profile of a user will be forbidden from tracking values. ​  ( password, user_name, e-mail, etc.)
 +  * Special alerts, flags, and warnings will be inserted that look for the use of analytics packages that are installed. (New menu_bar icon, warning on start-up, warning in settings, prompt for password for saving analytics data on start up, prompt to save analytics on application close.)
 +  *  ​
 +
  
commotion_architecture/core_components/commotion_client_architecture.txt · Last modified: 2014/05/01 19:26 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 3.0 Unported