CSC/ECE 517 Spring 2015 M1502 WSRA: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
Line 23: Line 23:
==Data Design==
==Data Design==
==Design Patterns==
==Design Patterns==
<b>[http://en.wikipedia.org/wiki/Factory_%28object-oriented_programming%29 Factory Pattern]</b><br>
For every application requiring a websocket for communicating with the server, a new thread needs to be spawned that creates a client. Spawning this thread can be considered to be similar to instantiating an object for which Factory Pattern can be employed.
==Proposed Test Cases==
==Proposed Test Cases==
==Further Readings==
==Further Readings==
==References==
==References==
<references/>
<references/>

Revision as of 15:49, 1 April 2015

Implement Rust Websocket

This project concentrates on implementing Rust WebSocket API for Mozilla's web browser engine, Servo

Introduction

Servo<ref> https://github.com/servo/servo </ref> is a Web Browser engine written in Rust. It is an experimental project build that targets new generation of hardware: mobile devices, multi-core processors and high-performance GPUs to obtain power efficiency and maximum parallelism. Implementing WebSocket API for the Servo engine would allow a persistent single TCP socket connection to be established between the client and server that will provide bi-directional, full duplex, messages to be instantly exchanged with little overhead resulting in a very low latency connection and supporting interactive, dynamic applications.

Rust

Rust <ref> https://github.com/rust-lang/rust </ref> is a Systems programming language built in Rust itself that is fast, memory safe and multithreaded, but does not employ a garbage collector or otherwise impose significant runtime overhead. Rust is able to provide both control over hardware and safety which is not the case with other programming languages like C, C++, Python that provide only either control or safety but not both.

WebSocket

WebSockets is a protocol that provides full-duplex channel for a TCP connection and makes it possible to open an interactive communication session between the user's browser and a server. With WebSockets, you can send messages to a server and receive event-driven responses without having to request the server for a reply. The WebSocket specification defines an API to establish a "socket" connection between a web browser and a server. This establishment involves a handshake following which there is a persistent connection between the client and the server and both parties can start sending data asynchronously.

Cargo and Crate

Cargo <ref>http://doc.crates.io/guide.html</ref> is a application level package manager that allows Rust projects to declare their various dependencies. Cargo resembles the Bundler in Rails that is used to run Rails app, install required Gems mentioned in the Gemfile. Gemfile correspond to Cargo.toml file and Gem correspond to Crates

Cargo introduces two metadata files with various bits of project information, fetches and builds project's dependencies, invokes rustc or another build tool with the correct parameters to build the project.

Project Description

Requirement Analysis

Implementation

Architecture

Component Design

Data Design

Design Patterns

Factory Pattern
For every application requiring a websocket for communicating with the server, a new thread needs to be spawned that creates a client. Spawning this thread can be considered to be similar to instantiating an object for which Factory Pattern can be employed.

Proposed Test Cases

Further Readings

References

<references/>