CSC/ECE 517 Fall 2014/final design doc M1450 navr

From Expertiza_Wiki
Jump to navigation Jump to search

Introduction

Rust

Rust is a modern systems programming language focusing on safety and speed to build reliable and efficient systems <ref> http://doc.rust-lang.org/nightly/intro.html </ref>. It accomplishes the goals of memory safe without using garbage collection and it supports concurrency and parallelism in building platforms.

Rust’s lightweight task mechanism also promises to allow fine-grained isolation between browser components, such as tabs and extensions, without the need for expensive runtime protection schemes, like operating system process isolation. <ref> https://www.mozilla.org/en-US/research/projects/ </ref>

Servo

Mozilla Research team is currently working on an experimental project to develop a new Web browser engine "Servo", that is capable of supporting a variety of current and next generation of hardware like mobile devices, multi-core processors and high-performance GPUs. Servo builds on top of Rust to provide a secure and reliable foundation. It is currently developed on 64 bit devices.<ref> https://www.mozilla.org/en-US/research/projects/ </ref>

The main objectives of this experimentation project is improving the layout to graphics rendering - to optimize for power efficiency and maximize parallelism. <ref> https://www.mozilla.org/en-US/research/projects/ </ref>

Purpose

The purpose of this project is to introduce the support related to sessionstorage and localstorage in Servo Broswer, for this we have to create Storage structure and allow web pages to store data in the Servo memory space.

Background

Persistent storage on the web is used by many services such as the popular Disqus commenting interface. Implementing this important specification in Servo will allow stateful web applications to run, and will help expose any architectural problems that Servo's radical design may cause.

Architecture


The Architecture comprises of a Storage Task which will be responsible to hold all the data that the web page requests to save. This happens via Channels in Rust, which implements a Sender Receiver protocol, the task is runnning in the background and waits to receive the data sent from the web page.

Architecture Explained

Each box represents a Rust task. Blue boxes represent the primary tasks in the browser pipeline. Gray boxes represent tasks auxiliary to the browser pipeline. White boxes represent worker tasks. Each such box represents several tasks, the precise number of which will vary with the workload. Dashed lines indicate supervisor relationships. Solid lines indicate communication channels.

Requirement analysis <ref>https://github.com/servo/servo/wiki/Storage-student-project</ref>

Data Design

Data Description

The following are the data structures that will be used.

Storage | TreeMap<String,String> UrlMap | TreeMap<String,TreeMap<String,String>>

Component Design

Design patterns

UML diagrams (Eg use case diagram, class diagrams)

Proposed Test Cases

References

<references/>