<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Vankam</id>
	<title>Expertiza_Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Vankam"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Vankam"/>
	<updated>2026-05-13T01:38:29Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=92142</id>
		<title>CSC/ECE 517 Fall 2014/final design doc M1450 navr</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=92142"/>
		<updated>2014-11-18T03:21:44Z</updated>

		<summary type="html">&lt;p&gt;Vankam: /* UML Diagrams */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Implement Window.sessionStorage ==&lt;br /&gt;
&lt;br /&gt;
This is the design document for the task &amp;lt;code&amp;gt;[http://github.com/servo/servo/wiki/Storage-student-project Implement Window.sessionStorage]&amp;lt;/code&amp;gt; for the [http://www.mozilla.org/ Mozilla] research project [http://github.com/servo/servo/wiki/Design Servo].&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== [http://www.rust-lang.org/ Rust]===&lt;br /&gt;
&lt;br /&gt;
Rust is a modern systems programming language focusing on safety and speed to build reliable and efficient systems &amp;lt;ref&amp;gt; http://doc.rust-lang.org/nightly/intro.html &amp;lt;/ref&amp;gt;. It accomplishes the goals of memory safe without using garbage collection and it supports concurrency and parallelism in building platforms. &lt;br /&gt;
&lt;br /&gt;
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. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [http://github.com/servo/servo/wiki/Design Servo] ===&lt;br /&gt;
&lt;br /&gt;
Mozilla Research team is currently working on an experimental project to develop a new Web browser engine &amp;quot;Servo&amp;quot;, 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.&amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The main objectives of this experimentation project is improving the layout to graphics rendering - to optimize for power efficiency and maximize parallelism. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
&lt;br /&gt;
=== [http://html.spec.whatwg.org/multipage/webstorage.html#webstorage Web Storage] ===&lt;br /&gt;
The web storage specification defines the means by which a web application can store string key/value pairs in a browser and later retrieve them for use.&amp;lt;ref&amp;gt;https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Storage&amp;lt;/ref&amp;gt; It supports persistent data storage, similar to [http://en.wikipedia.org/wiki/HTTP_cookie cookies] but with a greatly enhanced capacity and no information stored in the [http://en.wikipedia.org/wiki/List_of_HTTP_headers HTTP request header].&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Web_storage&amp;lt;/ref&amp;gt; There are two types of web storage: [http://html.spec.whatwg.org/multipage/webstorage.html#dom-localstorage local storage] and [http://html.spec.whatwg.org/multipage/webstorage.html#dom-sessionstorage session storage].&lt;br /&gt;
&lt;br /&gt;
Browsers that support web storage have the global variables 'sessionStorage' and 'localStorage' declared at the [http://developer.mozilla.org/en-US/docs/Web/API/Window?redirectlocale=en-US&amp;amp;redirectslug=DOM%2Fwindow window] level. The following JavaScript code gives an example of how to use web storage:&lt;br /&gt;
&lt;br /&gt;
'''sessionStorage'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Store value on browser for duration of the session&lt;br /&gt;
sessionStorage.setItem('key', 'value');&lt;br /&gt;
 &lt;br /&gt;
// Retrieve value (gets deleted when browser is closed and re-opened)&lt;br /&gt;
alert(sessionStorage.getItem('key'));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''localStorage'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Store value on the browser beyond the duration of the session&lt;br /&gt;
localStorage.setItem('key', 'value');&lt;br /&gt;
 &lt;br /&gt;
// Retrieve value (persists even after closing and re-opening the browser)&lt;br /&gt;
alert(localStorage.getItem('key'));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
&lt;br /&gt;
As part of our [http://github.com/servo/servo/wiki/Storage-student-project project], we have to implement the web storage specification in the Servo browser. 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. &amp;lt;ref&amp;gt; https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Requirement Analysis &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
In order to introduce the support for session storage and local storage in the Servo Broswer, we have to create the Storage structure and allow web pages to store data in the Servo memory space.&lt;br /&gt;
&lt;br /&gt;
Below is a high level overview of the various steps that have been planned for this project:&lt;br /&gt;
&lt;br /&gt;
* Create the Storage interface and its stub implementation.&lt;br /&gt;
* Create the WindowSessionStorage interface making it return a Storage instance.&lt;br /&gt;
* Create a Storage Task which will be used to contain all stored data.&lt;br /&gt;
* Define a message-passing interface for reading and writing stored data for a particular browser tab.&lt;br /&gt;
* Use the Storage task in the implementation of Storage.&lt;br /&gt;
* When the value of a stored data is changed, notify its respective browser tab.&lt;br /&gt;
* Pass as many [http://github.com/servo/web-platform-tests/tree/servo/webstorage tests] as possible.&lt;br /&gt;
* Implement the WindowLocalStorage interface which behaves slightly different from the WindowSessionStorage interface.&lt;br /&gt;
&lt;br /&gt;
== Architecture &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Design&amp;lt;/ref&amp;gt;==&lt;br /&gt;
&lt;br /&gt;
[[File:task.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Architecture Explained ===&lt;br /&gt;
*Each box represents a Rust task.&lt;br /&gt;
*Blue boxes represent the primary tasks in the browser pipeline.&lt;br /&gt;
*Gray boxes represent tasks auxiliary to the browser pipeline.&lt;br /&gt;
*White boxes represent worker tasks. Each such box represents several tasks, the precise number of which will vary with the workload.&lt;br /&gt;
*Dashed lines indicate supervisor relationships.&lt;br /&gt;
*Solid lines indicate communication channels.&lt;br /&gt;
&lt;br /&gt;
== Component Design ==&lt;br /&gt;
[[File:servo.jpg]]&lt;br /&gt;
&lt;br /&gt;
There will be 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.&lt;br /&gt;
&lt;br /&gt;
=== Task &amp;lt;ref&amp;gt;http://doc.rust-lang.org/guide-tasks.html&amp;lt;/ref&amp;gt;===&lt;br /&gt;
Rust provides safe concurrent abstractions through a number of core library primitives. This guide will describe the concurrency model in Rust, how it relates to the Rust type system, and introduce the fundamental library abstractions for constructing concurrent programs.&lt;br /&gt;
&lt;br /&gt;
Tasks provide failure isolation and recovery. When a fatal error occurs in Rust code as a result of an explicit call to panic!(), an assertion failure, or another invalid operation, the runtime system destroys the entire task. Unlike in languages such as Java and C++, there is no way to catch an exception. Instead, tasks may monitor each other to see if they panic.&lt;br /&gt;
&lt;br /&gt;
Tasks use Rust's type system to provide strong memory safety guarantees. In particular, the type system guarantees that tasks cannot induce a data race from shared mutable state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Generate some state locally&lt;br /&gt;
let child_task_number = generate_task_number();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    // Capture it in the remote task&lt;br /&gt;
    println!(&amp;quot;I am child number {}&amp;quot;, child_task_number);&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Channel &amp;lt;ref&amp;gt;http://doc.rust-lang.org/guide-tasks.html&amp;lt;/ref&amp;gt;===&lt;br /&gt;
Now that we have spawned a new task, it would be nice if we could communicate with it. For this, we use channels. A channel is simply a pair of endpoints: one for sending messages and another for receiving messages.&lt;br /&gt;
&lt;br /&gt;
The simplest way to create a channel is to use the channel function to create a (Sender, Receiver) pair. In Rust parlance, a sender is a sending endpoint of a channel, and a receiver is the receiving endpoint. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
let (tx, rx): (Sender&amp;lt;int&amp;gt;, Receiver&amp;lt;int&amp;gt;) = channel();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    let result = some_expensive_computation();&lt;br /&gt;
    tx.send(result);&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
some_other_expensive_computation();&lt;br /&gt;
let result = rx.recv();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Data Design ==&lt;br /&gt;
&lt;br /&gt;
===  Data Description ===&lt;br /&gt;
&lt;br /&gt;
''The following are the data structures that will be used.''&lt;br /&gt;
&lt;br /&gt;
'''Storage''' | TreeMap&amp;lt;String,String&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''UrlMap''' | TreeMap&amp;lt;String,TreeMap&amp;lt;String,String&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design Pattern ==&lt;br /&gt;
&lt;br /&gt;
We will be using &amp;quot;Delegation Pattern&amp;quot; in our project. The Storage interface is used by web applications to access the web storage provided by the browser. However, the actual data is stored somewhere else(Servo Memory Space). So, it makes sense to create another class which will maintain the actual stored data. The Storage class can then delegate the task of storing/retrieving data to this class. We will create a class &amp;quot;WebStorageTask&amp;quot; for this purpose.&lt;br /&gt;
&lt;br /&gt;
== UML Diagrams ==&lt;br /&gt;
             &lt;br /&gt;
[[File:Flow_Chart_Storage.png|left]] &lt;br /&gt;
[[File:Use_Case_-_Storage.png‎|right]]&lt;br /&gt;
&lt;br /&gt;
'''Steps:'''&lt;br /&gt;
&lt;br /&gt;
1. First, we need to build rust and servo. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. Generate the corresponding WebIDL bindings - Storage.webidl &amp;lt;br/&amp;gt;&lt;br /&gt;
3. Define Storage.rs which has the actual code for creating the storage object. &amp;lt;br/&amp;gt;&lt;br /&gt;
4. Call the receiver via a channel- this is actually used for creating an instance for each unique URL. &amp;lt;br/&amp;gt;&lt;br /&gt;
5. Build the servo again. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Use Case Functionality'''&lt;br /&gt;
&lt;br /&gt;
1. Here the user can open multiple domains( multiple URL's).&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Thereby the user will be creating multiple storage instances.&amp;lt;br/&amp;gt;&lt;br /&gt;
3. An user can traverse deep into the website but the storage instance is same for that URL.&amp;lt;br/&amp;gt;&lt;br /&gt;
4. The user can reopen the domain for a later period.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Proposed Test Cases ==&lt;br /&gt;
&lt;br /&gt;
Some of the test cases which will be used to validate our changes are as follows:&lt;br /&gt;
&lt;br /&gt;
* Allow a web page to clear its session storage&lt;br /&gt;
* Allow a web page to store an item in its session storage&lt;br /&gt;
* Allow a web page to retrieve stored items from its session storage&lt;br /&gt;
* Do not allow a web page to retrieve stored items from the session storage of a web page in another domain&lt;br /&gt;
* Check the number of items stored in session storage&lt;br /&gt;
* On removing an item from storage, it should be inaccessible&lt;br /&gt;
* Should return null as value for a key not present in the session storage&lt;br /&gt;
* Should give an error on exceeding the space limit of session storage&lt;br /&gt;
&lt;br /&gt;
The complete list of test cases can be found [http://github.com/servo/web-platform-tests/tree/servo/webstorage here].&lt;br /&gt;
&lt;br /&gt;
== Further Readings ==&lt;br /&gt;
&lt;br /&gt;
Learning Rust by Examples: http://rustbyexample.com/ &amp;lt;br/&amp;gt;&lt;br /&gt;
Javascript as Servo's Garbage Collector: http://blog.mozilla.org/research/2014/08/26/javascript-servos-only-garbage-collector/  &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vankam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=92141</id>
		<title>CSC/ECE 517 Fall 2014/final design doc M1450 navr</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=92141"/>
		<updated>2014-11-18T03:20:32Z</updated>

		<summary type="html">&lt;p&gt;Vankam: /* UML Diagrams */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Implement Window.sessionStorage ==&lt;br /&gt;
&lt;br /&gt;
This is the design document for the task &amp;lt;code&amp;gt;[http://github.com/servo/servo/wiki/Storage-student-project Implement Window.sessionStorage]&amp;lt;/code&amp;gt; for the [http://www.mozilla.org/ Mozilla] research project [http://github.com/servo/servo/wiki/Design Servo].&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== [http://www.rust-lang.org/ Rust]===&lt;br /&gt;
&lt;br /&gt;
Rust is a modern systems programming language focusing on safety and speed to build reliable and efficient systems &amp;lt;ref&amp;gt; http://doc.rust-lang.org/nightly/intro.html &amp;lt;/ref&amp;gt;. It accomplishes the goals of memory safe without using garbage collection and it supports concurrency and parallelism in building platforms. &lt;br /&gt;
&lt;br /&gt;
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. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [http://github.com/servo/servo/wiki/Design Servo] ===&lt;br /&gt;
&lt;br /&gt;
Mozilla Research team is currently working on an experimental project to develop a new Web browser engine &amp;quot;Servo&amp;quot;, 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.&amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The main objectives of this experimentation project is improving the layout to graphics rendering - to optimize for power efficiency and maximize parallelism. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
&lt;br /&gt;
=== [http://html.spec.whatwg.org/multipage/webstorage.html#webstorage Web Storage] ===&lt;br /&gt;
The web storage specification defines the means by which a web application can store string key/value pairs in a browser and later retrieve them for use.&amp;lt;ref&amp;gt;https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Storage&amp;lt;/ref&amp;gt; It supports persistent data storage, similar to [http://en.wikipedia.org/wiki/HTTP_cookie cookies] but with a greatly enhanced capacity and no information stored in the [http://en.wikipedia.org/wiki/List_of_HTTP_headers HTTP request header].&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Web_storage&amp;lt;/ref&amp;gt; There are two types of web storage: [http://html.spec.whatwg.org/multipage/webstorage.html#dom-localstorage local storage] and [http://html.spec.whatwg.org/multipage/webstorage.html#dom-sessionstorage session storage].&lt;br /&gt;
&lt;br /&gt;
Browsers that support web storage have the global variables 'sessionStorage' and 'localStorage' declared at the [http://developer.mozilla.org/en-US/docs/Web/API/Window?redirectlocale=en-US&amp;amp;redirectslug=DOM%2Fwindow window] level. The following JavaScript code gives an example of how to use web storage:&lt;br /&gt;
&lt;br /&gt;
'''sessionStorage'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Store value on browser for duration of the session&lt;br /&gt;
sessionStorage.setItem('key', 'value');&lt;br /&gt;
 &lt;br /&gt;
// Retrieve value (gets deleted when browser is closed and re-opened)&lt;br /&gt;
alert(sessionStorage.getItem('key'));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''localStorage'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Store value on the browser beyond the duration of the session&lt;br /&gt;
localStorage.setItem('key', 'value');&lt;br /&gt;
 &lt;br /&gt;
// Retrieve value (persists even after closing and re-opening the browser)&lt;br /&gt;
alert(localStorage.getItem('key'));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
&lt;br /&gt;
As part of our [http://github.com/servo/servo/wiki/Storage-student-project project], we have to implement the web storage specification in the Servo browser. 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. &amp;lt;ref&amp;gt; https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Requirement Analysis &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
In order to introduce the support for session storage and local storage in the Servo Broswer, we have to create the Storage structure and allow web pages to store data in the Servo memory space.&lt;br /&gt;
&lt;br /&gt;
Below is a high level overview of the various steps that have been planned for this project:&lt;br /&gt;
&lt;br /&gt;
* Create the Storage interface and its stub implementation.&lt;br /&gt;
* Create the WindowSessionStorage interface making it return a Storage instance.&lt;br /&gt;
* Create a Storage Task which will be used to contain all stored data.&lt;br /&gt;
* Define a message-passing interface for reading and writing stored data for a particular browser tab.&lt;br /&gt;
* Use the Storage task in the implementation of Storage.&lt;br /&gt;
* When the value of a stored data is changed, notify its respective browser tab.&lt;br /&gt;
* Pass as many [http://github.com/servo/web-platform-tests/tree/servo/webstorage tests] as possible.&lt;br /&gt;
* Implement the WindowLocalStorage interface which behaves slightly different from the WindowSessionStorage interface.&lt;br /&gt;
&lt;br /&gt;
== Architecture &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Design&amp;lt;/ref&amp;gt;==&lt;br /&gt;
&lt;br /&gt;
[[File:task.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Architecture Explained ===&lt;br /&gt;
*Each box represents a Rust task.&lt;br /&gt;
*Blue boxes represent the primary tasks in the browser pipeline.&lt;br /&gt;
*Gray boxes represent tasks auxiliary to the browser pipeline.&lt;br /&gt;
*White boxes represent worker tasks. Each such box represents several tasks, the precise number of which will vary with the workload.&lt;br /&gt;
*Dashed lines indicate supervisor relationships.&lt;br /&gt;
*Solid lines indicate communication channels.&lt;br /&gt;
&lt;br /&gt;
== Component Design ==&lt;br /&gt;
[[File:servo.jpg]]&lt;br /&gt;
&lt;br /&gt;
There will be 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.&lt;br /&gt;
&lt;br /&gt;
=== Task &amp;lt;ref&amp;gt;http://doc.rust-lang.org/guide-tasks.html&amp;lt;/ref&amp;gt;===&lt;br /&gt;
Rust provides safe concurrent abstractions through a number of core library primitives. This guide will describe the concurrency model in Rust, how it relates to the Rust type system, and introduce the fundamental library abstractions for constructing concurrent programs.&lt;br /&gt;
&lt;br /&gt;
Tasks provide failure isolation and recovery. When a fatal error occurs in Rust code as a result of an explicit call to panic!(), an assertion failure, or another invalid operation, the runtime system destroys the entire task. Unlike in languages such as Java and C++, there is no way to catch an exception. Instead, tasks may monitor each other to see if they panic.&lt;br /&gt;
&lt;br /&gt;
Tasks use Rust's type system to provide strong memory safety guarantees. In particular, the type system guarantees that tasks cannot induce a data race from shared mutable state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Generate some state locally&lt;br /&gt;
let child_task_number = generate_task_number();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    // Capture it in the remote task&lt;br /&gt;
    println!(&amp;quot;I am child number {}&amp;quot;, child_task_number);&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Channel &amp;lt;ref&amp;gt;http://doc.rust-lang.org/guide-tasks.html&amp;lt;/ref&amp;gt;===&lt;br /&gt;
Now that we have spawned a new task, it would be nice if we could communicate with it. For this, we use channels. A channel is simply a pair of endpoints: one for sending messages and another for receiving messages.&lt;br /&gt;
&lt;br /&gt;
The simplest way to create a channel is to use the channel function to create a (Sender, Receiver) pair. In Rust parlance, a sender is a sending endpoint of a channel, and a receiver is the receiving endpoint. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
let (tx, rx): (Sender&amp;lt;int&amp;gt;, Receiver&amp;lt;int&amp;gt;) = channel();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    let result = some_expensive_computation();&lt;br /&gt;
    tx.send(result);&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
some_other_expensive_computation();&lt;br /&gt;
let result = rx.recv();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Data Design ==&lt;br /&gt;
&lt;br /&gt;
===  Data Description ===&lt;br /&gt;
&lt;br /&gt;
''The following are the data structures that will be used.''&lt;br /&gt;
&lt;br /&gt;
'''Storage''' | TreeMap&amp;lt;String,String&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''UrlMap''' | TreeMap&amp;lt;String,TreeMap&amp;lt;String,String&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design Pattern ==&lt;br /&gt;
&lt;br /&gt;
We will be using &amp;quot;Delegation Pattern&amp;quot; in our project. The Storage interface is used by web applications to access the web storage provided by the browser. However, the actual data is stored somewhere else(Servo Memory Space). So, it makes sense to create another class which will maintain the actual stored data. The Storage class can then delegate the task of storing/retrieving data to this class. We will create a class &amp;quot;WebStorageTask&amp;quot; for this purpose.&lt;br /&gt;
&lt;br /&gt;
== UML Diagrams ==&lt;br /&gt;
             &lt;br /&gt;
[[File:Flow_Chart_Storage.png|upright|left]] &lt;br /&gt;
[[File:Use_Case_-_Storage.png‎|upright]]&lt;br /&gt;
&lt;br /&gt;
'''Steps:'''&lt;br /&gt;
&lt;br /&gt;
1. First, we need to build rust and servo. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. Generate the corresponding WebIDL bindings - Storage.webidl &amp;lt;br/&amp;gt;&lt;br /&gt;
3. Define Storage.rs which has the actual code for creating the storage object. &amp;lt;br/&amp;gt;&lt;br /&gt;
4. Call the receiver via a channel- this is actually used for creating an instance for each unique URL. &amp;lt;br/&amp;gt;&lt;br /&gt;
5. Build the servo again. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Use Case Functionality'''&lt;br /&gt;
&lt;br /&gt;
1. Here the user can open multiple domains( multiple URL's)where each domain will have a separate Storage object.&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Thereby the user will be creating multiple storage instances.&amp;lt;br/&amp;gt;&lt;br /&gt;
3. An user can traverse deep into the website but the storage instance for that URL must be the same.&amp;lt;br/&amp;gt;&lt;br /&gt;
4. The user can reopen the domain for a later period.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Proposed Test Cases ==&lt;br /&gt;
&lt;br /&gt;
Some of the test cases which will be used to validate our changes are as follows:&lt;br /&gt;
&lt;br /&gt;
* Allow a web page to clear its session storage&lt;br /&gt;
* Allow a web page to store an item in its session storage&lt;br /&gt;
* Allow a web page to retrieve stored items from its session storage&lt;br /&gt;
* Do not allow a web page to retrieve stored items from the session storage of a web page in another domain&lt;br /&gt;
* Check the number of items stored in session storage&lt;br /&gt;
* On removing an item from storage, it should be inaccessible&lt;br /&gt;
* Should return null as value for a key not present in the session storage&lt;br /&gt;
* Should give an error on exceeding the space limit of session storage&lt;br /&gt;
&lt;br /&gt;
The complete list of test cases can be found [http://github.com/servo/web-platform-tests/tree/servo/webstorage here].&lt;br /&gt;
&lt;br /&gt;
== Further Readings ==&lt;br /&gt;
&lt;br /&gt;
Learning Rust by Examples: http://rustbyexample.com/ &amp;lt;br/&amp;gt;&lt;br /&gt;
Javascript as Servo's Garbage Collector: http://blog.mozilla.org/research/2014/08/26/javascript-servos-only-garbage-collector/  &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vankam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=92140</id>
		<title>CSC/ECE 517 Fall 2014/final design doc M1450 navr</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=92140"/>
		<updated>2014-11-18T03:20:20Z</updated>

		<summary type="html">&lt;p&gt;Vankam: /* UML Diagrams */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Implement Window.sessionStorage ==&lt;br /&gt;
&lt;br /&gt;
This is the design document for the task &amp;lt;code&amp;gt;[http://github.com/servo/servo/wiki/Storage-student-project Implement Window.sessionStorage]&amp;lt;/code&amp;gt; for the [http://www.mozilla.org/ Mozilla] research project [http://github.com/servo/servo/wiki/Design Servo].&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== [http://www.rust-lang.org/ Rust]===&lt;br /&gt;
&lt;br /&gt;
Rust is a modern systems programming language focusing on safety and speed to build reliable and efficient systems &amp;lt;ref&amp;gt; http://doc.rust-lang.org/nightly/intro.html &amp;lt;/ref&amp;gt;. It accomplishes the goals of memory safe without using garbage collection and it supports concurrency and parallelism in building platforms. &lt;br /&gt;
&lt;br /&gt;
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. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [http://github.com/servo/servo/wiki/Design Servo] ===&lt;br /&gt;
&lt;br /&gt;
Mozilla Research team is currently working on an experimental project to develop a new Web browser engine &amp;quot;Servo&amp;quot;, 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.&amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The main objectives of this experimentation project is improving the layout to graphics rendering - to optimize for power efficiency and maximize parallelism. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
&lt;br /&gt;
=== [http://html.spec.whatwg.org/multipage/webstorage.html#webstorage Web Storage] ===&lt;br /&gt;
The web storage specification defines the means by which a web application can store string key/value pairs in a browser and later retrieve them for use.&amp;lt;ref&amp;gt;https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Storage&amp;lt;/ref&amp;gt; It supports persistent data storage, similar to [http://en.wikipedia.org/wiki/HTTP_cookie cookies] but with a greatly enhanced capacity and no information stored in the [http://en.wikipedia.org/wiki/List_of_HTTP_headers HTTP request header].&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Web_storage&amp;lt;/ref&amp;gt; There are two types of web storage: [http://html.spec.whatwg.org/multipage/webstorage.html#dom-localstorage local storage] and [http://html.spec.whatwg.org/multipage/webstorage.html#dom-sessionstorage session storage].&lt;br /&gt;
&lt;br /&gt;
Browsers that support web storage have the global variables 'sessionStorage' and 'localStorage' declared at the [http://developer.mozilla.org/en-US/docs/Web/API/Window?redirectlocale=en-US&amp;amp;redirectslug=DOM%2Fwindow window] level. The following JavaScript code gives an example of how to use web storage:&lt;br /&gt;
&lt;br /&gt;
'''sessionStorage'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Store value on browser for duration of the session&lt;br /&gt;
sessionStorage.setItem('key', 'value');&lt;br /&gt;
 &lt;br /&gt;
// Retrieve value (gets deleted when browser is closed and re-opened)&lt;br /&gt;
alert(sessionStorage.getItem('key'));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''localStorage'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Store value on the browser beyond the duration of the session&lt;br /&gt;
localStorage.setItem('key', 'value');&lt;br /&gt;
 &lt;br /&gt;
// Retrieve value (persists even after closing and re-opening the browser)&lt;br /&gt;
alert(localStorage.getItem('key'));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
&lt;br /&gt;
As part of our [http://github.com/servo/servo/wiki/Storage-student-project project], we have to implement the web storage specification in the Servo browser. 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. &amp;lt;ref&amp;gt; https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Requirement Analysis &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
In order to introduce the support for session storage and local storage in the Servo Broswer, we have to create the Storage structure and allow web pages to store data in the Servo memory space.&lt;br /&gt;
&lt;br /&gt;
Below is a high level overview of the various steps that have been planned for this project:&lt;br /&gt;
&lt;br /&gt;
* Create the Storage interface and its stub implementation.&lt;br /&gt;
* Create the WindowSessionStorage interface making it return a Storage instance.&lt;br /&gt;
* Create a Storage Task which will be used to contain all stored data.&lt;br /&gt;
* Define a message-passing interface for reading and writing stored data for a particular browser tab.&lt;br /&gt;
* Use the Storage task in the implementation of Storage.&lt;br /&gt;
* When the value of a stored data is changed, notify its respective browser tab.&lt;br /&gt;
* Pass as many [http://github.com/servo/web-platform-tests/tree/servo/webstorage tests] as possible.&lt;br /&gt;
* Implement the WindowLocalStorage interface which behaves slightly different from the WindowSessionStorage interface.&lt;br /&gt;
&lt;br /&gt;
== Architecture &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Design&amp;lt;/ref&amp;gt;==&lt;br /&gt;
&lt;br /&gt;
[[File:task.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Architecture Explained ===&lt;br /&gt;
*Each box represents a Rust task.&lt;br /&gt;
*Blue boxes represent the primary tasks in the browser pipeline.&lt;br /&gt;
*Gray boxes represent tasks auxiliary to the browser pipeline.&lt;br /&gt;
*White boxes represent worker tasks. Each such box represents several tasks, the precise number of which will vary with the workload.&lt;br /&gt;
*Dashed lines indicate supervisor relationships.&lt;br /&gt;
*Solid lines indicate communication channels.&lt;br /&gt;
&lt;br /&gt;
== Component Design ==&lt;br /&gt;
[[File:servo.jpg]]&lt;br /&gt;
&lt;br /&gt;
There will be 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.&lt;br /&gt;
&lt;br /&gt;
=== Task &amp;lt;ref&amp;gt;http://doc.rust-lang.org/guide-tasks.html&amp;lt;/ref&amp;gt;===&lt;br /&gt;
Rust provides safe concurrent abstractions through a number of core library primitives. This guide will describe the concurrency model in Rust, how it relates to the Rust type system, and introduce the fundamental library abstractions for constructing concurrent programs.&lt;br /&gt;
&lt;br /&gt;
Tasks provide failure isolation and recovery. When a fatal error occurs in Rust code as a result of an explicit call to panic!(), an assertion failure, or another invalid operation, the runtime system destroys the entire task. Unlike in languages such as Java and C++, there is no way to catch an exception. Instead, tasks may monitor each other to see if they panic.&lt;br /&gt;
&lt;br /&gt;
Tasks use Rust's type system to provide strong memory safety guarantees. In particular, the type system guarantees that tasks cannot induce a data race from shared mutable state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Generate some state locally&lt;br /&gt;
let child_task_number = generate_task_number();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    // Capture it in the remote task&lt;br /&gt;
    println!(&amp;quot;I am child number {}&amp;quot;, child_task_number);&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Channel &amp;lt;ref&amp;gt;http://doc.rust-lang.org/guide-tasks.html&amp;lt;/ref&amp;gt;===&lt;br /&gt;
Now that we have spawned a new task, it would be nice if we could communicate with it. For this, we use channels. A channel is simply a pair of endpoints: one for sending messages and another for receiving messages.&lt;br /&gt;
&lt;br /&gt;
The simplest way to create a channel is to use the channel function to create a (Sender, Receiver) pair. In Rust parlance, a sender is a sending endpoint of a channel, and a receiver is the receiving endpoint. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
let (tx, rx): (Sender&amp;lt;int&amp;gt;, Receiver&amp;lt;int&amp;gt;) = channel();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    let result = some_expensive_computation();&lt;br /&gt;
    tx.send(result);&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
some_other_expensive_computation();&lt;br /&gt;
let result = rx.recv();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Data Design ==&lt;br /&gt;
&lt;br /&gt;
===  Data Description ===&lt;br /&gt;
&lt;br /&gt;
''The following are the data structures that will be used.''&lt;br /&gt;
&lt;br /&gt;
'''Storage''' | TreeMap&amp;lt;String,String&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''UrlMap''' | TreeMap&amp;lt;String,TreeMap&amp;lt;String,String&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design Pattern ==&lt;br /&gt;
&lt;br /&gt;
We will be using &amp;quot;Delegation Pattern&amp;quot; in our project. The Storage interface is used by web applications to access the web storage provided by the browser. However, the actual data is stored somewhere else(Servo Memory Space). So, it makes sense to create another class which will maintain the actual stored data. The Storage class can then delegate the task of storing/retrieving data to this class. We will create a class &amp;quot;WebStorageTask&amp;quot; for this purpose.&lt;br /&gt;
&lt;br /&gt;
== UML Diagrams ==&lt;br /&gt;
             &lt;br /&gt;
[[File:Flow_Chart_Storage.png|upright|left]] &lt;br /&gt;
[[File:Use_Case_-_Storage.png‎|thumb]]&lt;br /&gt;
&lt;br /&gt;
'''Steps:'''&lt;br /&gt;
&lt;br /&gt;
1. First, we need to build rust and servo. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. Generate the corresponding WebIDL bindings - Storage.webidl &amp;lt;br/&amp;gt;&lt;br /&gt;
3. Define Storage.rs which has the actual code for creating the storage object. &amp;lt;br/&amp;gt;&lt;br /&gt;
4. Call the receiver via a channel- this is actually used for creating an instance for each unique URL. &amp;lt;br/&amp;gt;&lt;br /&gt;
5. Build the servo again. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Use Case Functionality'''&lt;br /&gt;
&lt;br /&gt;
1. Here the user can open multiple domains( multiple URL's)where each domain will have a separate Storage object.&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Thereby the user will be creating multiple storage instances.&amp;lt;br/&amp;gt;&lt;br /&gt;
3. An user can traverse deep into the website but the storage instance for that URL must be the same.&amp;lt;br/&amp;gt;&lt;br /&gt;
4. The user can reopen the domain for a later period.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Proposed Test Cases ==&lt;br /&gt;
&lt;br /&gt;
Some of the test cases which will be used to validate our changes are as follows:&lt;br /&gt;
&lt;br /&gt;
* Allow a web page to clear its session storage&lt;br /&gt;
* Allow a web page to store an item in its session storage&lt;br /&gt;
* Allow a web page to retrieve stored items from its session storage&lt;br /&gt;
* Do not allow a web page to retrieve stored items from the session storage of a web page in another domain&lt;br /&gt;
* Check the number of items stored in session storage&lt;br /&gt;
* On removing an item from storage, it should be inaccessible&lt;br /&gt;
* Should return null as value for a key not present in the session storage&lt;br /&gt;
* Should give an error on exceeding the space limit of session storage&lt;br /&gt;
&lt;br /&gt;
The complete list of test cases can be found [http://github.com/servo/web-platform-tests/tree/servo/webstorage here].&lt;br /&gt;
&lt;br /&gt;
== Further Readings ==&lt;br /&gt;
&lt;br /&gt;
Learning Rust by Examples: http://rustbyexample.com/ &amp;lt;br/&amp;gt;&lt;br /&gt;
Javascript as Servo's Garbage Collector: http://blog.mozilla.org/research/2014/08/26/javascript-servos-only-garbage-collector/  &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vankam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Use_Case_-_Storage.png&amp;diff=92139</id>
		<title>File:Use Case - Storage.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Use_Case_-_Storage.png&amp;diff=92139"/>
		<updated>2014-11-18T03:18:44Z</updated>

		<summary type="html">&lt;p&gt;Vankam: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Vankam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=92138</id>
		<title>CSC/ECE 517 Fall 2014/final design doc M1450 navr</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=92138"/>
		<updated>2014-11-18T03:16:52Z</updated>

		<summary type="html">&lt;p&gt;Vankam: /* UML Diagrams */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Implement Window.sessionStorage ==&lt;br /&gt;
&lt;br /&gt;
This is the design document for the task &amp;lt;code&amp;gt;[http://github.com/servo/servo/wiki/Storage-student-project Implement Window.sessionStorage]&amp;lt;/code&amp;gt; for the [http://www.mozilla.org/ Mozilla] research project [http://github.com/servo/servo/wiki/Design Servo].&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== [http://www.rust-lang.org/ Rust]===&lt;br /&gt;
&lt;br /&gt;
Rust is a modern systems programming language focusing on safety and speed to build reliable and efficient systems &amp;lt;ref&amp;gt; http://doc.rust-lang.org/nightly/intro.html &amp;lt;/ref&amp;gt;. It accomplishes the goals of memory safe without using garbage collection and it supports concurrency and parallelism in building platforms. &lt;br /&gt;
&lt;br /&gt;
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. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [http://github.com/servo/servo/wiki/Design Servo] ===&lt;br /&gt;
&lt;br /&gt;
Mozilla Research team is currently working on an experimental project to develop a new Web browser engine &amp;quot;Servo&amp;quot;, 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.&amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The main objectives of this experimentation project is improving the layout to graphics rendering - to optimize for power efficiency and maximize parallelism. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
&lt;br /&gt;
=== [http://html.spec.whatwg.org/multipage/webstorage.html#webstorage Web Storage] ===&lt;br /&gt;
The web storage specification defines the means by which a web application can store string key/value pairs in a browser and later retrieve them for use.&amp;lt;ref&amp;gt;https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Storage&amp;lt;/ref&amp;gt; It supports persistent data storage, similar to [http://en.wikipedia.org/wiki/HTTP_cookie cookies] but with a greatly enhanced capacity and no information stored in the [http://en.wikipedia.org/wiki/List_of_HTTP_headers HTTP request header].&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Web_storage&amp;lt;/ref&amp;gt; There are two types of web storage: [http://html.spec.whatwg.org/multipage/webstorage.html#dom-localstorage local storage] and [http://html.spec.whatwg.org/multipage/webstorage.html#dom-sessionstorage session storage].&lt;br /&gt;
&lt;br /&gt;
Browsers that support web storage have the global variables 'sessionStorage' and 'localStorage' declared at the [http://developer.mozilla.org/en-US/docs/Web/API/Window?redirectlocale=en-US&amp;amp;redirectslug=DOM%2Fwindow window] level. The following JavaScript code gives an example of how to use web storage:&lt;br /&gt;
&lt;br /&gt;
'''sessionStorage'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Store value on browser for duration of the session&lt;br /&gt;
sessionStorage.setItem('key', 'value');&lt;br /&gt;
 &lt;br /&gt;
// Retrieve value (gets deleted when browser is closed and re-opened)&lt;br /&gt;
alert(sessionStorage.getItem('key'));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''localStorage'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Store value on the browser beyond the duration of the session&lt;br /&gt;
localStorage.setItem('key', 'value');&lt;br /&gt;
 &lt;br /&gt;
// Retrieve value (persists even after closing and re-opening the browser)&lt;br /&gt;
alert(localStorage.getItem('key'));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
&lt;br /&gt;
As part of our [http://github.com/servo/servo/wiki/Storage-student-project project], we have to implement the web storage specification in the Servo browser. 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. &amp;lt;ref&amp;gt; https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Requirement Analysis &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
In order to introduce the support for session storage and local storage in the Servo Broswer, we have to create the Storage structure and allow web pages to store data in the Servo memory space.&lt;br /&gt;
&lt;br /&gt;
Below is a high level overview of the various steps that have been planned for this project:&lt;br /&gt;
&lt;br /&gt;
* Create the Storage interface and its stub implementation.&lt;br /&gt;
* Create the WindowSessionStorage interface making it return a Storage instance.&lt;br /&gt;
* Create a Storage Task which will be used to contain all stored data.&lt;br /&gt;
* Define a message-passing interface for reading and writing stored data for a particular browser tab.&lt;br /&gt;
* Use the Storage task in the implementation of Storage.&lt;br /&gt;
* When the value of a stored data is changed, notify its respective browser tab.&lt;br /&gt;
* Pass as many [http://github.com/servo/web-platform-tests/tree/servo/webstorage tests] as possible.&lt;br /&gt;
* Implement the WindowLocalStorage interface which behaves slightly different from the WindowSessionStorage interface.&lt;br /&gt;
&lt;br /&gt;
== Architecture &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Design&amp;lt;/ref&amp;gt;==&lt;br /&gt;
&lt;br /&gt;
[[File:task.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Architecture Explained ===&lt;br /&gt;
*Each box represents a Rust task.&lt;br /&gt;
*Blue boxes represent the primary tasks in the browser pipeline.&lt;br /&gt;
*Gray boxes represent tasks auxiliary to the browser pipeline.&lt;br /&gt;
*White boxes represent worker tasks. Each such box represents several tasks, the precise number of which will vary with the workload.&lt;br /&gt;
*Dashed lines indicate supervisor relationships.&lt;br /&gt;
*Solid lines indicate communication channels.&lt;br /&gt;
&lt;br /&gt;
== Component Design ==&lt;br /&gt;
[[File:servo.jpg]]&lt;br /&gt;
&lt;br /&gt;
There will be 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.&lt;br /&gt;
&lt;br /&gt;
=== Task &amp;lt;ref&amp;gt;http://doc.rust-lang.org/guide-tasks.html&amp;lt;/ref&amp;gt;===&lt;br /&gt;
Rust provides safe concurrent abstractions through a number of core library primitives. This guide will describe the concurrency model in Rust, how it relates to the Rust type system, and introduce the fundamental library abstractions for constructing concurrent programs.&lt;br /&gt;
&lt;br /&gt;
Tasks provide failure isolation and recovery. When a fatal error occurs in Rust code as a result of an explicit call to panic!(), an assertion failure, or another invalid operation, the runtime system destroys the entire task. Unlike in languages such as Java and C++, there is no way to catch an exception. Instead, tasks may monitor each other to see if they panic.&lt;br /&gt;
&lt;br /&gt;
Tasks use Rust's type system to provide strong memory safety guarantees. In particular, the type system guarantees that tasks cannot induce a data race from shared mutable state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Generate some state locally&lt;br /&gt;
let child_task_number = generate_task_number();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    // Capture it in the remote task&lt;br /&gt;
    println!(&amp;quot;I am child number {}&amp;quot;, child_task_number);&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Channel &amp;lt;ref&amp;gt;http://doc.rust-lang.org/guide-tasks.html&amp;lt;/ref&amp;gt;===&lt;br /&gt;
Now that we have spawned a new task, it would be nice if we could communicate with it. For this, we use channels. A channel is simply a pair of endpoints: one for sending messages and another for receiving messages.&lt;br /&gt;
&lt;br /&gt;
The simplest way to create a channel is to use the channel function to create a (Sender, Receiver) pair. In Rust parlance, a sender is a sending endpoint of a channel, and a receiver is the receiving endpoint. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
let (tx, rx): (Sender&amp;lt;int&amp;gt;, Receiver&amp;lt;int&amp;gt;) = channel();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    let result = some_expensive_computation();&lt;br /&gt;
    tx.send(result);&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
some_other_expensive_computation();&lt;br /&gt;
let result = rx.recv();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Data Design ==&lt;br /&gt;
&lt;br /&gt;
===  Data Description ===&lt;br /&gt;
&lt;br /&gt;
''The following are the data structures that will be used.''&lt;br /&gt;
&lt;br /&gt;
'''Storage''' | TreeMap&amp;lt;String,String&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''UrlMap''' | TreeMap&amp;lt;String,TreeMap&amp;lt;String,String&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design Pattern ==&lt;br /&gt;
&lt;br /&gt;
We will be using &amp;quot;Delegation Pattern&amp;quot; in our project. The Storage interface is used by web applications to access the web storage provided by the browser. However, the actual data is stored somewhere else(Servo Memory Space). So, it makes sense to create another class which will maintain the actual stored data. The Storage class can then delegate the task of storing/retrieving data to this class. We will create a class &amp;quot;WebStorageTask&amp;quot; for this purpose.&lt;br /&gt;
&lt;br /&gt;
== UML Diagrams ==&lt;br /&gt;
             &lt;br /&gt;
[[File:Flow_Chart_Storage.png|upright|left]] &lt;br /&gt;
[[File:Use_Case_Storage.jpg|thumb]]&lt;br /&gt;
&lt;br /&gt;
'''Steps:'''&lt;br /&gt;
&lt;br /&gt;
1. First, we need to build rust and servo. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. Generate the corresponding WebIDL bindings - Storage.webidl &amp;lt;br/&amp;gt;&lt;br /&gt;
3. Define Storage.rs which has the actual code for creating the storage object. &amp;lt;br/&amp;gt;&lt;br /&gt;
4. Call the receiver via a channel- this is actually used for creating an instance for each unique URL. &amp;lt;br/&amp;gt;&lt;br /&gt;
5. Build the servo again. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Use Case Functionality'''&lt;br /&gt;
&lt;br /&gt;
1. Here the user can open multiple domains( multiple URL's)where each domain will have a separate Storage object.&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Thereby the user will be creating multiple storage instances.&amp;lt;br/&amp;gt;&lt;br /&gt;
3. An user can traverse deep into the website but the storage instance for that URL must be the same.&amp;lt;br/&amp;gt;&lt;br /&gt;
4. The user can reopen the domain for a later period.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Proposed Test Cases ==&lt;br /&gt;
&lt;br /&gt;
Some of the test cases which will be used to validate our changes are as follows:&lt;br /&gt;
&lt;br /&gt;
* Allow a web page to clear its session storage&lt;br /&gt;
* Allow a web page to store an item in its session storage&lt;br /&gt;
* Allow a web page to retrieve stored items from its session storage&lt;br /&gt;
* Do not allow a web page to retrieve stored items from the session storage of a web page in another domain&lt;br /&gt;
* Check the number of items stored in session storage&lt;br /&gt;
* On removing an item from storage, it should be inaccessible&lt;br /&gt;
* Should return null as value for a key not present in the session storage&lt;br /&gt;
* Should give an error on exceeding the space limit of session storage&lt;br /&gt;
&lt;br /&gt;
The complete list of test cases can be found [http://github.com/servo/web-platform-tests/tree/servo/webstorage here].&lt;br /&gt;
&lt;br /&gt;
== Further Readings ==&lt;br /&gt;
&lt;br /&gt;
Learning Rust by Examples: http://rustbyexample.com/ &amp;lt;br/&amp;gt;&lt;br /&gt;
Javascript as Servo's Garbage Collector: http://blog.mozilla.org/research/2014/08/26/javascript-servos-only-garbage-collector/  &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vankam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=92137</id>
		<title>CSC/ECE 517 Fall 2014/final design doc M1450 navr</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=92137"/>
		<updated>2014-11-18T03:15:44Z</updated>

		<summary type="html">&lt;p&gt;Vankam: /* UML Diagrams */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Implement Window.sessionStorage ==&lt;br /&gt;
&lt;br /&gt;
This is the design document for the task &amp;lt;code&amp;gt;[http://github.com/servo/servo/wiki/Storage-student-project Implement Window.sessionStorage]&amp;lt;/code&amp;gt; for the [http://www.mozilla.org/ Mozilla] research project [http://github.com/servo/servo/wiki/Design Servo].&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== [http://www.rust-lang.org/ Rust]===&lt;br /&gt;
&lt;br /&gt;
Rust is a modern systems programming language focusing on safety and speed to build reliable and efficient systems &amp;lt;ref&amp;gt; http://doc.rust-lang.org/nightly/intro.html &amp;lt;/ref&amp;gt;. It accomplishes the goals of memory safe without using garbage collection and it supports concurrency and parallelism in building platforms. &lt;br /&gt;
&lt;br /&gt;
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. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [http://github.com/servo/servo/wiki/Design Servo] ===&lt;br /&gt;
&lt;br /&gt;
Mozilla Research team is currently working on an experimental project to develop a new Web browser engine &amp;quot;Servo&amp;quot;, 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.&amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The main objectives of this experimentation project is improving the layout to graphics rendering - to optimize for power efficiency and maximize parallelism. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
&lt;br /&gt;
=== [http://html.spec.whatwg.org/multipage/webstorage.html#webstorage Web Storage] ===&lt;br /&gt;
The web storage specification defines the means by which a web application can store string key/value pairs in a browser and later retrieve them for use.&amp;lt;ref&amp;gt;https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Storage&amp;lt;/ref&amp;gt; It supports persistent data storage, similar to [http://en.wikipedia.org/wiki/HTTP_cookie cookies] but with a greatly enhanced capacity and no information stored in the [http://en.wikipedia.org/wiki/List_of_HTTP_headers HTTP request header].&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Web_storage&amp;lt;/ref&amp;gt; There are two types of web storage: [http://html.spec.whatwg.org/multipage/webstorage.html#dom-localstorage local storage] and [http://html.spec.whatwg.org/multipage/webstorage.html#dom-sessionstorage session storage].&lt;br /&gt;
&lt;br /&gt;
Browsers that support web storage have the global variables 'sessionStorage' and 'localStorage' declared at the [http://developer.mozilla.org/en-US/docs/Web/API/Window?redirectlocale=en-US&amp;amp;redirectslug=DOM%2Fwindow window] level. The following JavaScript code gives an example of how to use web storage:&lt;br /&gt;
&lt;br /&gt;
'''sessionStorage'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Store value on browser for duration of the session&lt;br /&gt;
sessionStorage.setItem('key', 'value');&lt;br /&gt;
 &lt;br /&gt;
// Retrieve value (gets deleted when browser is closed and re-opened)&lt;br /&gt;
alert(sessionStorage.getItem('key'));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''localStorage'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Store value on the browser beyond the duration of the session&lt;br /&gt;
localStorage.setItem('key', 'value');&lt;br /&gt;
 &lt;br /&gt;
// Retrieve value (persists even after closing and re-opening the browser)&lt;br /&gt;
alert(localStorage.getItem('key'));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
&lt;br /&gt;
As part of our [http://github.com/servo/servo/wiki/Storage-student-project project], we have to implement the web storage specification in the Servo browser. 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. &amp;lt;ref&amp;gt; https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Requirement Analysis &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
In order to introduce the support for session storage and local storage in the Servo Broswer, we have to create the Storage structure and allow web pages to store data in the Servo memory space.&lt;br /&gt;
&lt;br /&gt;
Below is a high level overview of the various steps that have been planned for this project:&lt;br /&gt;
&lt;br /&gt;
* Create the Storage interface and its stub implementation.&lt;br /&gt;
* Create the WindowSessionStorage interface making it return a Storage instance.&lt;br /&gt;
* Create a Storage Task which will be used to contain all stored data.&lt;br /&gt;
* Define a message-passing interface for reading and writing stored data for a particular browser tab.&lt;br /&gt;
* Use the Storage task in the implementation of Storage.&lt;br /&gt;
* When the value of a stored data is changed, notify its respective browser tab.&lt;br /&gt;
* Pass as many [http://github.com/servo/web-platform-tests/tree/servo/webstorage tests] as possible.&lt;br /&gt;
* Implement the WindowLocalStorage interface which behaves slightly different from the WindowSessionStorage interface.&lt;br /&gt;
&lt;br /&gt;
== Architecture &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Design&amp;lt;/ref&amp;gt;==&lt;br /&gt;
&lt;br /&gt;
[[File:task.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Architecture Explained ===&lt;br /&gt;
*Each box represents a Rust task.&lt;br /&gt;
*Blue boxes represent the primary tasks in the browser pipeline.&lt;br /&gt;
*Gray boxes represent tasks auxiliary to the browser pipeline.&lt;br /&gt;
*White boxes represent worker tasks. Each such box represents several tasks, the precise number of which will vary with the workload.&lt;br /&gt;
*Dashed lines indicate supervisor relationships.&lt;br /&gt;
*Solid lines indicate communication channels.&lt;br /&gt;
&lt;br /&gt;
== Component Design ==&lt;br /&gt;
[[File:servo.jpg]]&lt;br /&gt;
&lt;br /&gt;
There will be 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.&lt;br /&gt;
&lt;br /&gt;
=== Task &amp;lt;ref&amp;gt;http://doc.rust-lang.org/guide-tasks.html&amp;lt;/ref&amp;gt;===&lt;br /&gt;
Rust provides safe concurrent abstractions through a number of core library primitives. This guide will describe the concurrency model in Rust, how it relates to the Rust type system, and introduce the fundamental library abstractions for constructing concurrent programs.&lt;br /&gt;
&lt;br /&gt;
Tasks provide failure isolation and recovery. When a fatal error occurs in Rust code as a result of an explicit call to panic!(), an assertion failure, or another invalid operation, the runtime system destroys the entire task. Unlike in languages such as Java and C++, there is no way to catch an exception. Instead, tasks may monitor each other to see if they panic.&lt;br /&gt;
&lt;br /&gt;
Tasks use Rust's type system to provide strong memory safety guarantees. In particular, the type system guarantees that tasks cannot induce a data race from shared mutable state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Generate some state locally&lt;br /&gt;
let child_task_number = generate_task_number();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    // Capture it in the remote task&lt;br /&gt;
    println!(&amp;quot;I am child number {}&amp;quot;, child_task_number);&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Channel &amp;lt;ref&amp;gt;http://doc.rust-lang.org/guide-tasks.html&amp;lt;/ref&amp;gt;===&lt;br /&gt;
Now that we have spawned a new task, it would be nice if we could communicate with it. For this, we use channels. A channel is simply a pair of endpoints: one for sending messages and another for receiving messages.&lt;br /&gt;
&lt;br /&gt;
The simplest way to create a channel is to use the channel function to create a (Sender, Receiver) pair. In Rust parlance, a sender is a sending endpoint of a channel, and a receiver is the receiving endpoint. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
let (tx, rx): (Sender&amp;lt;int&amp;gt;, Receiver&amp;lt;int&amp;gt;) = channel();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    let result = some_expensive_computation();&lt;br /&gt;
    tx.send(result);&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
some_other_expensive_computation();&lt;br /&gt;
let result = rx.recv();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Data Design ==&lt;br /&gt;
&lt;br /&gt;
===  Data Description ===&lt;br /&gt;
&lt;br /&gt;
''The following are the data structures that will be used.''&lt;br /&gt;
&lt;br /&gt;
'''Storage''' | TreeMap&amp;lt;String,String&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''UrlMap''' | TreeMap&amp;lt;String,TreeMap&amp;lt;String,String&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design Pattern ==&lt;br /&gt;
&lt;br /&gt;
We will be using &amp;quot;Delegation Pattern&amp;quot; in our project. The Storage interface is used by web applications to access the web storage provided by the browser. However, the actual data is stored somewhere else(Servo Memory Space). So, it makes sense to create another class which will maintain the actual stored data. The Storage class can then delegate the task of storing/retrieving data to this class. We will create a class &amp;quot;WebStorageTask&amp;quot; for this purpose.&lt;br /&gt;
&lt;br /&gt;
== UML Diagrams ==&lt;br /&gt;
             &lt;br /&gt;
[[File:Flow_Chart_Storage.png|upright|left]] &lt;br /&gt;
[[File:Use_Case_Storage.jpg|upright|thumb]]&lt;br /&gt;
&lt;br /&gt;
'''Steps:'''&lt;br /&gt;
&lt;br /&gt;
1. First, we need to build rust and servo. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. Generate the corresponding WebIDL bindings - Storage.webidl &amp;lt;br/&amp;gt;&lt;br /&gt;
3. Define Storage.rs which has the actual code for creating the storage object. &amp;lt;br/&amp;gt;&lt;br /&gt;
4. Call the receiver via a channel- this is actually used for creating an instance for each unique URL. &amp;lt;br/&amp;gt;&lt;br /&gt;
5. Build the servo again. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Use Case Functionality'''&lt;br /&gt;
&lt;br /&gt;
1. Here the user can open multiple domains( multiple URL's)where each domain will have a separate Storage object.&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Thereby the user will be creating multiple storage instances.&amp;lt;br/&amp;gt;&lt;br /&gt;
3. An user can traverse deep into the website but the storage instance for that URL must be the same.&amp;lt;br/&amp;gt;&lt;br /&gt;
4. The user can reopen the domain for a later period.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Proposed Test Cases ==&lt;br /&gt;
&lt;br /&gt;
Some of the test cases which will be used to validate our changes are as follows:&lt;br /&gt;
&lt;br /&gt;
* Allow a web page to clear its session storage&lt;br /&gt;
* Allow a web page to store an item in its session storage&lt;br /&gt;
* Allow a web page to retrieve stored items from its session storage&lt;br /&gt;
* Do not allow a web page to retrieve stored items from the session storage of a web page in another domain&lt;br /&gt;
* Check the number of items stored in session storage&lt;br /&gt;
* On removing an item from storage, it should be inaccessible&lt;br /&gt;
* Should return null as value for a key not present in the session storage&lt;br /&gt;
* Should give an error on exceeding the space limit of session storage&lt;br /&gt;
&lt;br /&gt;
The complete list of test cases can be found [http://github.com/servo/web-platform-tests/tree/servo/webstorage here].&lt;br /&gt;
&lt;br /&gt;
== Further Readings ==&lt;br /&gt;
&lt;br /&gt;
Learning Rust by Examples: http://rustbyexample.com/ &amp;lt;br/&amp;gt;&lt;br /&gt;
Javascript as Servo's Garbage Collector: http://blog.mozilla.org/research/2014/08/26/javascript-servos-only-garbage-collector/  &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vankam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=92136</id>
		<title>CSC/ECE 517 Fall 2014/final design doc M1450 navr</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=92136"/>
		<updated>2014-11-18T03:15:28Z</updated>

		<summary type="html">&lt;p&gt;Vankam: /* UML Diagrams */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Implement Window.sessionStorage ==&lt;br /&gt;
&lt;br /&gt;
This is the design document for the task &amp;lt;code&amp;gt;[http://github.com/servo/servo/wiki/Storage-student-project Implement Window.sessionStorage]&amp;lt;/code&amp;gt; for the [http://www.mozilla.org/ Mozilla] research project [http://github.com/servo/servo/wiki/Design Servo].&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== [http://www.rust-lang.org/ Rust]===&lt;br /&gt;
&lt;br /&gt;
Rust is a modern systems programming language focusing on safety and speed to build reliable and efficient systems &amp;lt;ref&amp;gt; http://doc.rust-lang.org/nightly/intro.html &amp;lt;/ref&amp;gt;. It accomplishes the goals of memory safe without using garbage collection and it supports concurrency and parallelism in building platforms. &lt;br /&gt;
&lt;br /&gt;
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. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [http://github.com/servo/servo/wiki/Design Servo] ===&lt;br /&gt;
&lt;br /&gt;
Mozilla Research team is currently working on an experimental project to develop a new Web browser engine &amp;quot;Servo&amp;quot;, 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.&amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The main objectives of this experimentation project is improving the layout to graphics rendering - to optimize for power efficiency and maximize parallelism. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
&lt;br /&gt;
=== [http://html.spec.whatwg.org/multipage/webstorage.html#webstorage Web Storage] ===&lt;br /&gt;
The web storage specification defines the means by which a web application can store string key/value pairs in a browser and later retrieve them for use.&amp;lt;ref&amp;gt;https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Storage&amp;lt;/ref&amp;gt; It supports persistent data storage, similar to [http://en.wikipedia.org/wiki/HTTP_cookie cookies] but with a greatly enhanced capacity and no information stored in the [http://en.wikipedia.org/wiki/List_of_HTTP_headers HTTP request header].&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Web_storage&amp;lt;/ref&amp;gt; There are two types of web storage: [http://html.spec.whatwg.org/multipage/webstorage.html#dom-localstorage local storage] and [http://html.spec.whatwg.org/multipage/webstorage.html#dom-sessionstorage session storage].&lt;br /&gt;
&lt;br /&gt;
Browsers that support web storage have the global variables 'sessionStorage' and 'localStorage' declared at the [http://developer.mozilla.org/en-US/docs/Web/API/Window?redirectlocale=en-US&amp;amp;redirectslug=DOM%2Fwindow window] level. The following JavaScript code gives an example of how to use web storage:&lt;br /&gt;
&lt;br /&gt;
'''sessionStorage'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Store value on browser for duration of the session&lt;br /&gt;
sessionStorage.setItem('key', 'value');&lt;br /&gt;
 &lt;br /&gt;
// Retrieve value (gets deleted when browser is closed and re-opened)&lt;br /&gt;
alert(sessionStorage.getItem('key'));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''localStorage'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Store value on the browser beyond the duration of the session&lt;br /&gt;
localStorage.setItem('key', 'value');&lt;br /&gt;
 &lt;br /&gt;
// Retrieve value (persists even after closing and re-opening the browser)&lt;br /&gt;
alert(localStorage.getItem('key'));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
&lt;br /&gt;
As part of our [http://github.com/servo/servo/wiki/Storage-student-project project], we have to implement the web storage specification in the Servo browser. 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. &amp;lt;ref&amp;gt; https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Requirement Analysis &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
In order to introduce the support for session storage and local storage in the Servo Broswer, we have to create the Storage structure and allow web pages to store data in the Servo memory space.&lt;br /&gt;
&lt;br /&gt;
Below is a high level overview of the various steps that have been planned for this project:&lt;br /&gt;
&lt;br /&gt;
* Create the Storage interface and its stub implementation.&lt;br /&gt;
* Create the WindowSessionStorage interface making it return a Storage instance.&lt;br /&gt;
* Create a Storage Task which will be used to contain all stored data.&lt;br /&gt;
* Define a message-passing interface for reading and writing stored data for a particular browser tab.&lt;br /&gt;
* Use the Storage task in the implementation of Storage.&lt;br /&gt;
* When the value of a stored data is changed, notify its respective browser tab.&lt;br /&gt;
* Pass as many [http://github.com/servo/web-platform-tests/tree/servo/webstorage tests] as possible.&lt;br /&gt;
* Implement the WindowLocalStorage interface which behaves slightly different from the WindowSessionStorage interface.&lt;br /&gt;
&lt;br /&gt;
== Architecture &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Design&amp;lt;/ref&amp;gt;==&lt;br /&gt;
&lt;br /&gt;
[[File:task.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Architecture Explained ===&lt;br /&gt;
*Each box represents a Rust task.&lt;br /&gt;
*Blue boxes represent the primary tasks in the browser pipeline.&lt;br /&gt;
*Gray boxes represent tasks auxiliary to the browser pipeline.&lt;br /&gt;
*White boxes represent worker tasks. Each such box represents several tasks, the precise number of which will vary with the workload.&lt;br /&gt;
*Dashed lines indicate supervisor relationships.&lt;br /&gt;
*Solid lines indicate communication channels.&lt;br /&gt;
&lt;br /&gt;
== Component Design ==&lt;br /&gt;
[[File:servo.jpg]]&lt;br /&gt;
&lt;br /&gt;
There will be 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.&lt;br /&gt;
&lt;br /&gt;
=== Task &amp;lt;ref&amp;gt;http://doc.rust-lang.org/guide-tasks.html&amp;lt;/ref&amp;gt;===&lt;br /&gt;
Rust provides safe concurrent abstractions through a number of core library primitives. This guide will describe the concurrency model in Rust, how it relates to the Rust type system, and introduce the fundamental library abstractions for constructing concurrent programs.&lt;br /&gt;
&lt;br /&gt;
Tasks provide failure isolation and recovery. When a fatal error occurs in Rust code as a result of an explicit call to panic!(), an assertion failure, or another invalid operation, the runtime system destroys the entire task. Unlike in languages such as Java and C++, there is no way to catch an exception. Instead, tasks may monitor each other to see if they panic.&lt;br /&gt;
&lt;br /&gt;
Tasks use Rust's type system to provide strong memory safety guarantees. In particular, the type system guarantees that tasks cannot induce a data race from shared mutable state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Generate some state locally&lt;br /&gt;
let child_task_number = generate_task_number();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    // Capture it in the remote task&lt;br /&gt;
    println!(&amp;quot;I am child number {}&amp;quot;, child_task_number);&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Channel &amp;lt;ref&amp;gt;http://doc.rust-lang.org/guide-tasks.html&amp;lt;/ref&amp;gt;===&lt;br /&gt;
Now that we have spawned a new task, it would be nice if we could communicate with it. For this, we use channels. A channel is simply a pair of endpoints: one for sending messages and another for receiving messages.&lt;br /&gt;
&lt;br /&gt;
The simplest way to create a channel is to use the channel function to create a (Sender, Receiver) pair. In Rust parlance, a sender is a sending endpoint of a channel, and a receiver is the receiving endpoint. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
let (tx, rx): (Sender&amp;lt;int&amp;gt;, Receiver&amp;lt;int&amp;gt;) = channel();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    let result = some_expensive_computation();&lt;br /&gt;
    tx.send(result);&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
some_other_expensive_computation();&lt;br /&gt;
let result = rx.recv();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Data Design ==&lt;br /&gt;
&lt;br /&gt;
===  Data Description ===&lt;br /&gt;
&lt;br /&gt;
''The following are the data structures that will be used.''&lt;br /&gt;
&lt;br /&gt;
'''Storage''' | TreeMap&amp;lt;String,String&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''UrlMap''' | TreeMap&amp;lt;String,TreeMap&amp;lt;String,String&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design Pattern ==&lt;br /&gt;
&lt;br /&gt;
We will be using &amp;quot;Delegation Pattern&amp;quot; in our project. The Storage interface is used by web applications to access the web storage provided by the browser. However, the actual data is stored somewhere else(Servo Memory Space). So, it makes sense to create another class which will maintain the actual stored data. The Storage class can then delegate the task of storing/retrieving data to this class. We will create a class &amp;quot;WebStorageTask&amp;quot; for this purpose.&lt;br /&gt;
&lt;br /&gt;
== UML Diagrams ==&lt;br /&gt;
             &lt;br /&gt;
[[File:Flow_Chart_Storage.png|upright|left]] &lt;br /&gt;
[[File:Use_Case_Storage.jpg|thumb]]&lt;br /&gt;
&lt;br /&gt;
'''Steps:'''&lt;br /&gt;
&lt;br /&gt;
1. First, we need to build rust and servo. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. Generate the corresponding WebIDL bindings - Storage.webidl &amp;lt;br/&amp;gt;&lt;br /&gt;
3. Define Storage.rs which has the actual code for creating the storage object. &amp;lt;br/&amp;gt;&lt;br /&gt;
4. Call the receiver via a channel- this is actually used for creating an instance for each unique URL. &amp;lt;br/&amp;gt;&lt;br /&gt;
5. Build the servo again. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Use Case Functionality'''&lt;br /&gt;
&lt;br /&gt;
1. Here the user can open multiple domains( multiple URL's)where each domain will have a separate Storage object.&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Thereby the user will be creating multiple storage instances.&amp;lt;br/&amp;gt;&lt;br /&gt;
3. An user can traverse deep into the website but the storage instance for that URL must be the same.&amp;lt;br/&amp;gt;&lt;br /&gt;
4. The user can reopen the domain for a later period.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Proposed Test Cases ==&lt;br /&gt;
&lt;br /&gt;
Some of the test cases which will be used to validate our changes are as follows:&lt;br /&gt;
&lt;br /&gt;
* Allow a web page to clear its session storage&lt;br /&gt;
* Allow a web page to store an item in its session storage&lt;br /&gt;
* Allow a web page to retrieve stored items from its session storage&lt;br /&gt;
* Do not allow a web page to retrieve stored items from the session storage of a web page in another domain&lt;br /&gt;
* Check the number of items stored in session storage&lt;br /&gt;
* On removing an item from storage, it should be inaccessible&lt;br /&gt;
* Should return null as value for a key not present in the session storage&lt;br /&gt;
* Should give an error on exceeding the space limit of session storage&lt;br /&gt;
&lt;br /&gt;
The complete list of test cases can be found [http://github.com/servo/web-platform-tests/tree/servo/webstorage here].&lt;br /&gt;
&lt;br /&gt;
== Further Readings ==&lt;br /&gt;
&lt;br /&gt;
Learning Rust by Examples: http://rustbyexample.com/ &amp;lt;br/&amp;gt;&lt;br /&gt;
Javascript as Servo's Garbage Collector: http://blog.mozilla.org/research/2014/08/26/javascript-servos-only-garbage-collector/  &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vankam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=92135</id>
		<title>CSC/ECE 517 Fall 2014/final design doc M1450 navr</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=92135"/>
		<updated>2014-11-18T03:12:16Z</updated>

		<summary type="html">&lt;p&gt;Vankam: /* UML Diagrams */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Implement Window.sessionStorage ==&lt;br /&gt;
&lt;br /&gt;
This is the design document for the task &amp;lt;code&amp;gt;[http://github.com/servo/servo/wiki/Storage-student-project Implement Window.sessionStorage]&amp;lt;/code&amp;gt; for the [http://www.mozilla.org/ Mozilla] research project [http://github.com/servo/servo/wiki/Design Servo].&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== [http://www.rust-lang.org/ Rust]===&lt;br /&gt;
&lt;br /&gt;
Rust is a modern systems programming language focusing on safety and speed to build reliable and efficient systems &amp;lt;ref&amp;gt; http://doc.rust-lang.org/nightly/intro.html &amp;lt;/ref&amp;gt;. It accomplishes the goals of memory safe without using garbage collection and it supports concurrency and parallelism in building platforms. &lt;br /&gt;
&lt;br /&gt;
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. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [http://github.com/servo/servo/wiki/Design Servo] ===&lt;br /&gt;
&lt;br /&gt;
Mozilla Research team is currently working on an experimental project to develop a new Web browser engine &amp;quot;Servo&amp;quot;, 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.&amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The main objectives of this experimentation project is improving the layout to graphics rendering - to optimize for power efficiency and maximize parallelism. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
&lt;br /&gt;
=== [http://html.spec.whatwg.org/multipage/webstorage.html#webstorage Web Storage] ===&lt;br /&gt;
The web storage specification defines the means by which a web application can store string key/value pairs in a browser and later retrieve them for use.&amp;lt;ref&amp;gt;https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Storage&amp;lt;/ref&amp;gt; It supports persistent data storage, similar to [http://en.wikipedia.org/wiki/HTTP_cookie cookies] but with a greatly enhanced capacity and no information stored in the [http://en.wikipedia.org/wiki/List_of_HTTP_headers HTTP request header].&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Web_storage&amp;lt;/ref&amp;gt; There are two types of web storage: [http://html.spec.whatwg.org/multipage/webstorage.html#dom-localstorage local storage] and [http://html.spec.whatwg.org/multipage/webstorage.html#dom-sessionstorage session storage].&lt;br /&gt;
&lt;br /&gt;
Browsers that support web storage have the global variables 'sessionStorage' and 'localStorage' declared at the [http://developer.mozilla.org/en-US/docs/Web/API/Window?redirectlocale=en-US&amp;amp;redirectslug=DOM%2Fwindow window] level. The following JavaScript code gives an example of how to use web storage:&lt;br /&gt;
&lt;br /&gt;
'''sessionStorage'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Store value on browser for duration of the session&lt;br /&gt;
sessionStorage.setItem('key', 'value');&lt;br /&gt;
 &lt;br /&gt;
// Retrieve value (gets deleted when browser is closed and re-opened)&lt;br /&gt;
alert(sessionStorage.getItem('key'));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''localStorage'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Store value on the browser beyond the duration of the session&lt;br /&gt;
localStorage.setItem('key', 'value');&lt;br /&gt;
 &lt;br /&gt;
// Retrieve value (persists even after closing and re-opening the browser)&lt;br /&gt;
alert(localStorage.getItem('key'));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
&lt;br /&gt;
As part of our [http://github.com/servo/servo/wiki/Storage-student-project project], we have to implement the web storage specification in the Servo browser. 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. &amp;lt;ref&amp;gt; https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Requirement Analysis &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
In order to introduce the support for session storage and local storage in the Servo Broswer, we have to create the Storage structure and allow web pages to store data in the Servo memory space.&lt;br /&gt;
&lt;br /&gt;
Below is a high level overview of the various steps that have been planned for this project:&lt;br /&gt;
&lt;br /&gt;
* Create the Storage interface and its stub implementation.&lt;br /&gt;
* Create the WindowSessionStorage interface making it return a Storage instance.&lt;br /&gt;
* Create a Storage Task which will be used to contain all stored data.&lt;br /&gt;
* Define a message-passing interface for reading and writing stored data for a particular browser tab.&lt;br /&gt;
* Use the Storage task in the implementation of Storage.&lt;br /&gt;
* When the value of a stored data is changed, notify its respective browser tab.&lt;br /&gt;
* Pass as many [http://github.com/servo/web-platform-tests/tree/servo/webstorage tests] as possible.&lt;br /&gt;
* Implement the WindowLocalStorage interface which behaves slightly different from the WindowSessionStorage interface.&lt;br /&gt;
&lt;br /&gt;
== Architecture &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Design&amp;lt;/ref&amp;gt;==&lt;br /&gt;
&lt;br /&gt;
[[File:task.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Architecture Explained ===&lt;br /&gt;
*Each box represents a Rust task.&lt;br /&gt;
*Blue boxes represent the primary tasks in the browser pipeline.&lt;br /&gt;
*Gray boxes represent tasks auxiliary to the browser pipeline.&lt;br /&gt;
*White boxes represent worker tasks. Each such box represents several tasks, the precise number of which will vary with the workload.&lt;br /&gt;
*Dashed lines indicate supervisor relationships.&lt;br /&gt;
*Solid lines indicate communication channels.&lt;br /&gt;
&lt;br /&gt;
== Component Design ==&lt;br /&gt;
[[File:servo.jpg]]&lt;br /&gt;
&lt;br /&gt;
There will be 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.&lt;br /&gt;
&lt;br /&gt;
=== Task &amp;lt;ref&amp;gt;http://doc.rust-lang.org/guide-tasks.html&amp;lt;/ref&amp;gt;===&lt;br /&gt;
Rust provides safe concurrent abstractions through a number of core library primitives. This guide will describe the concurrency model in Rust, how it relates to the Rust type system, and introduce the fundamental library abstractions for constructing concurrent programs.&lt;br /&gt;
&lt;br /&gt;
Tasks provide failure isolation and recovery. When a fatal error occurs in Rust code as a result of an explicit call to panic!(), an assertion failure, or another invalid operation, the runtime system destroys the entire task. Unlike in languages such as Java and C++, there is no way to catch an exception. Instead, tasks may monitor each other to see if they panic.&lt;br /&gt;
&lt;br /&gt;
Tasks use Rust's type system to provide strong memory safety guarantees. In particular, the type system guarantees that tasks cannot induce a data race from shared mutable state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Generate some state locally&lt;br /&gt;
let child_task_number = generate_task_number();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    // Capture it in the remote task&lt;br /&gt;
    println!(&amp;quot;I am child number {}&amp;quot;, child_task_number);&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Channel &amp;lt;ref&amp;gt;http://doc.rust-lang.org/guide-tasks.html&amp;lt;/ref&amp;gt;===&lt;br /&gt;
Now that we have spawned a new task, it would be nice if we could communicate with it. For this, we use channels. A channel is simply a pair of endpoints: one for sending messages and another for receiving messages.&lt;br /&gt;
&lt;br /&gt;
The simplest way to create a channel is to use the channel function to create a (Sender, Receiver) pair. In Rust parlance, a sender is a sending endpoint of a channel, and a receiver is the receiving endpoint. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
let (tx, rx): (Sender&amp;lt;int&amp;gt;, Receiver&amp;lt;int&amp;gt;) = channel();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    let result = some_expensive_computation();&lt;br /&gt;
    tx.send(result);&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
some_other_expensive_computation();&lt;br /&gt;
let result = rx.recv();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Data Design ==&lt;br /&gt;
&lt;br /&gt;
===  Data Description ===&lt;br /&gt;
&lt;br /&gt;
''The following are the data structures that will be used.''&lt;br /&gt;
&lt;br /&gt;
'''Storage''' | TreeMap&amp;lt;String,String&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''UrlMap''' | TreeMap&amp;lt;String,TreeMap&amp;lt;String,String&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design Pattern ==&lt;br /&gt;
&lt;br /&gt;
We will be using &amp;quot;Delegation Pattern&amp;quot; in our project. The Storage interface is used by web applications to access the web storage provided by the browser. However, the actual data is stored somewhere else(Servo Memory Space). So, it makes sense to create another class which will maintain the actual stored data. The Storage class can then delegate the task of storing/retrieving data to this class. We will create a class &amp;quot;WebStorageTask&amp;quot; for this purpose.&lt;br /&gt;
&lt;br /&gt;
== UML Diagrams ==&lt;br /&gt;
             &lt;br /&gt;
[[File:Flow_Chart_Storage.png|thumb|left]] &lt;br /&gt;
[[File:Use_Case_Storage.jpg|thumb]]&lt;br /&gt;
&lt;br /&gt;
'''Steps:'''&lt;br /&gt;
&lt;br /&gt;
1. First, we need to build rust and servo. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. Generate the corresponding WebIDL bindings - Storage.webidl &amp;lt;br/&amp;gt;&lt;br /&gt;
3. Define Storage.rs which has the actual code for creating the storage object. &amp;lt;br/&amp;gt;&lt;br /&gt;
4. Call the receiver via a channel- this is actually used for creating an instance for each unique URL. &amp;lt;br/&amp;gt;&lt;br /&gt;
5. Build the servo again. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Use Case Functionality'''&lt;br /&gt;
&lt;br /&gt;
1. Here the user can open multiple domains( multiple URL's)where each domain will have a separate Storage object.&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Thereby the user will be creating multiple storage instances.&amp;lt;br/&amp;gt;&lt;br /&gt;
3. An user can traverse deep into the website but the storage instance for that URL must be the same.&amp;lt;br/&amp;gt;&lt;br /&gt;
4. The user can reopen the domain for a later period.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Proposed Test Cases ==&lt;br /&gt;
&lt;br /&gt;
Some of the test cases which will be used to validate our changes are as follows:&lt;br /&gt;
&lt;br /&gt;
* Allow a web page to clear its session storage&lt;br /&gt;
* Allow a web page to store an item in its session storage&lt;br /&gt;
* Allow a web page to retrieve stored items from its session storage&lt;br /&gt;
* Do not allow a web page to retrieve stored items from the session storage of a web page in another domain&lt;br /&gt;
* Check the number of items stored in session storage&lt;br /&gt;
* On removing an item from storage, it should be inaccessible&lt;br /&gt;
* Should return null as value for a key not present in the session storage&lt;br /&gt;
* Should give an error on exceeding the space limit of session storage&lt;br /&gt;
&lt;br /&gt;
The complete list of test cases can be found [http://github.com/servo/web-platform-tests/tree/servo/webstorage here].&lt;br /&gt;
&lt;br /&gt;
== Further Readings ==&lt;br /&gt;
&lt;br /&gt;
Learning Rust by Examples: http://rustbyexample.com/ &amp;lt;br/&amp;gt;&lt;br /&gt;
Javascript as Servo's Garbage Collector: http://blog.mozilla.org/research/2014/08/26/javascript-servos-only-garbage-collector/  &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vankam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=92134</id>
		<title>CSC/ECE 517 Fall 2014/final design doc M1450 navr</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=92134"/>
		<updated>2014-11-18T03:11:06Z</updated>

		<summary type="html">&lt;p&gt;Vankam: /* UML Diagrams */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Implement Window.sessionStorage ==&lt;br /&gt;
&lt;br /&gt;
This is the design document for the task &amp;lt;code&amp;gt;[http://github.com/servo/servo/wiki/Storage-student-project Implement Window.sessionStorage]&amp;lt;/code&amp;gt; for the [http://www.mozilla.org/ Mozilla] research project [http://github.com/servo/servo/wiki/Design Servo].&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== [http://www.rust-lang.org/ Rust]===&lt;br /&gt;
&lt;br /&gt;
Rust is a modern systems programming language focusing on safety and speed to build reliable and efficient systems &amp;lt;ref&amp;gt; http://doc.rust-lang.org/nightly/intro.html &amp;lt;/ref&amp;gt;. It accomplishes the goals of memory safe without using garbage collection and it supports concurrency and parallelism in building platforms. &lt;br /&gt;
&lt;br /&gt;
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. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [http://github.com/servo/servo/wiki/Design Servo] ===&lt;br /&gt;
&lt;br /&gt;
Mozilla Research team is currently working on an experimental project to develop a new Web browser engine &amp;quot;Servo&amp;quot;, 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.&amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The main objectives of this experimentation project is improving the layout to graphics rendering - to optimize for power efficiency and maximize parallelism. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
&lt;br /&gt;
=== [http://html.spec.whatwg.org/multipage/webstorage.html#webstorage Web Storage] ===&lt;br /&gt;
The web storage specification defines the means by which a web application can store string key/value pairs in a browser and later retrieve them for use.&amp;lt;ref&amp;gt;https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Storage&amp;lt;/ref&amp;gt; It supports persistent data storage, similar to [http://en.wikipedia.org/wiki/HTTP_cookie cookies] but with a greatly enhanced capacity and no information stored in the [http://en.wikipedia.org/wiki/List_of_HTTP_headers HTTP request header].&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Web_storage&amp;lt;/ref&amp;gt; There are two types of web storage: [http://html.spec.whatwg.org/multipage/webstorage.html#dom-localstorage local storage] and [http://html.spec.whatwg.org/multipage/webstorage.html#dom-sessionstorage session storage].&lt;br /&gt;
&lt;br /&gt;
Browsers that support web storage have the global variables 'sessionStorage' and 'localStorage' declared at the [http://developer.mozilla.org/en-US/docs/Web/API/Window?redirectlocale=en-US&amp;amp;redirectslug=DOM%2Fwindow window] level. The following JavaScript code gives an example of how to use web storage:&lt;br /&gt;
&lt;br /&gt;
'''sessionStorage'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Store value on browser for duration of the session&lt;br /&gt;
sessionStorage.setItem('key', 'value');&lt;br /&gt;
 &lt;br /&gt;
// Retrieve value (gets deleted when browser is closed and re-opened)&lt;br /&gt;
alert(sessionStorage.getItem('key'));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''localStorage'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Store value on the browser beyond the duration of the session&lt;br /&gt;
localStorage.setItem('key', 'value');&lt;br /&gt;
 &lt;br /&gt;
// Retrieve value (persists even after closing and re-opening the browser)&lt;br /&gt;
alert(localStorage.getItem('key'));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
&lt;br /&gt;
As part of our [http://github.com/servo/servo/wiki/Storage-student-project project], we have to implement the web storage specification in the Servo browser. 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. &amp;lt;ref&amp;gt; https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Requirement Analysis &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
In order to introduce the support for session storage and local storage in the Servo Broswer, we have to create the Storage structure and allow web pages to store data in the Servo memory space.&lt;br /&gt;
&lt;br /&gt;
Below is a high level overview of the various steps that have been planned for this project:&lt;br /&gt;
&lt;br /&gt;
* Create the Storage interface and its stub implementation.&lt;br /&gt;
* Create the WindowSessionStorage interface making it return a Storage instance.&lt;br /&gt;
* Create a Storage Task which will be used to contain all stored data.&lt;br /&gt;
* Define a message-passing interface for reading and writing stored data for a particular browser tab.&lt;br /&gt;
* Use the Storage task in the implementation of Storage.&lt;br /&gt;
* When the value of a stored data is changed, notify its respective browser tab.&lt;br /&gt;
* Pass as many [http://github.com/servo/web-platform-tests/tree/servo/webstorage tests] as possible.&lt;br /&gt;
* Implement the WindowLocalStorage interface which behaves slightly different from the WindowSessionStorage interface.&lt;br /&gt;
&lt;br /&gt;
== Architecture &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Design&amp;lt;/ref&amp;gt;==&lt;br /&gt;
&lt;br /&gt;
[[File:task.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Architecture Explained ===&lt;br /&gt;
*Each box represents a Rust task.&lt;br /&gt;
*Blue boxes represent the primary tasks in the browser pipeline.&lt;br /&gt;
*Gray boxes represent tasks auxiliary to the browser pipeline.&lt;br /&gt;
*White boxes represent worker tasks. Each such box represents several tasks, the precise number of which will vary with the workload.&lt;br /&gt;
*Dashed lines indicate supervisor relationships.&lt;br /&gt;
*Solid lines indicate communication channels.&lt;br /&gt;
&lt;br /&gt;
== Component Design ==&lt;br /&gt;
[[File:servo.jpg]]&lt;br /&gt;
&lt;br /&gt;
There will be 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.&lt;br /&gt;
&lt;br /&gt;
=== Task &amp;lt;ref&amp;gt;http://doc.rust-lang.org/guide-tasks.html&amp;lt;/ref&amp;gt;===&lt;br /&gt;
Rust provides safe concurrent abstractions through a number of core library primitives. This guide will describe the concurrency model in Rust, how it relates to the Rust type system, and introduce the fundamental library abstractions for constructing concurrent programs.&lt;br /&gt;
&lt;br /&gt;
Tasks provide failure isolation and recovery. When a fatal error occurs in Rust code as a result of an explicit call to panic!(), an assertion failure, or another invalid operation, the runtime system destroys the entire task. Unlike in languages such as Java and C++, there is no way to catch an exception. Instead, tasks may monitor each other to see if they panic.&lt;br /&gt;
&lt;br /&gt;
Tasks use Rust's type system to provide strong memory safety guarantees. In particular, the type system guarantees that tasks cannot induce a data race from shared mutable state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Generate some state locally&lt;br /&gt;
let child_task_number = generate_task_number();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    // Capture it in the remote task&lt;br /&gt;
    println!(&amp;quot;I am child number {}&amp;quot;, child_task_number);&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Channel &amp;lt;ref&amp;gt;http://doc.rust-lang.org/guide-tasks.html&amp;lt;/ref&amp;gt;===&lt;br /&gt;
Now that we have spawned a new task, it would be nice if we could communicate with it. For this, we use channels. A channel is simply a pair of endpoints: one for sending messages and another for receiving messages.&lt;br /&gt;
&lt;br /&gt;
The simplest way to create a channel is to use the channel function to create a (Sender, Receiver) pair. In Rust parlance, a sender is a sending endpoint of a channel, and a receiver is the receiving endpoint. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
let (tx, rx): (Sender&amp;lt;int&amp;gt;, Receiver&amp;lt;int&amp;gt;) = channel();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    let result = some_expensive_computation();&lt;br /&gt;
    tx.send(result);&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
some_other_expensive_computation();&lt;br /&gt;
let result = rx.recv();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Data Design ==&lt;br /&gt;
&lt;br /&gt;
===  Data Description ===&lt;br /&gt;
&lt;br /&gt;
''The following are the data structures that will be used.''&lt;br /&gt;
&lt;br /&gt;
'''Storage''' | TreeMap&amp;lt;String,String&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''UrlMap''' | TreeMap&amp;lt;String,TreeMap&amp;lt;String,String&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design Pattern ==&lt;br /&gt;
&lt;br /&gt;
We will be using &amp;quot;Delegation Pattern&amp;quot; in our project. The Storage interface is used by web applications to access the web storage provided by the browser. However, the actual data is stored somewhere else(Servo Memory Space). So, it makes sense to create another class which will maintain the actual stored data. The Storage class can then delegate the task of storing/retrieving data to this class. We will create a class &amp;quot;WebStorageTask&amp;quot; for this purpose.&lt;br /&gt;
&lt;br /&gt;
== UML Diagrams ==&lt;br /&gt;
             &lt;br /&gt;
[[File:Flow_Chart_Storage.png|thumb|left]] &lt;br /&gt;
[[File:Use_Case_Storage.jpg|thumb|right]]&lt;br /&gt;
&lt;br /&gt;
'''Steps:'''&lt;br /&gt;
&lt;br /&gt;
1. First, we need to build rust and servo. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. Generate the corresponding WebIDL bindings - Storage.webidl &amp;lt;br/&amp;gt;&lt;br /&gt;
3. Define Storage.rs which has the actual code for creating the storage object. &amp;lt;br/&amp;gt;&lt;br /&gt;
4. Call the receiver via a channel- this is actually used for creating an instance for each unique URL. &amp;lt;br/&amp;gt;&lt;br /&gt;
5. Build the servo again. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Use Case Functionality'''&lt;br /&gt;
&lt;br /&gt;
1. Here the user can open multiple domains( multiple URL's)where each domain will have a separate Storage object.&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Thereby the user will be creating multiple storage instances.&amp;lt;br/&amp;gt;&lt;br /&gt;
3. An user can traverse deep into the website but the storage instance for that URL must be the same.&amp;lt;br/&amp;gt;&lt;br /&gt;
4. The user can reopen the domain for a later period.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Proposed Test Cases ==&lt;br /&gt;
&lt;br /&gt;
Some of the test cases which will be used to validate our changes are as follows:&lt;br /&gt;
&lt;br /&gt;
* Allow a web page to clear its session storage&lt;br /&gt;
* Allow a web page to store an item in its session storage&lt;br /&gt;
* Allow a web page to retrieve stored items from its session storage&lt;br /&gt;
* Do not allow a web page to retrieve stored items from the session storage of a web page in another domain&lt;br /&gt;
* Check the number of items stored in session storage&lt;br /&gt;
* On removing an item from storage, it should be inaccessible&lt;br /&gt;
* Should return null as value for a key not present in the session storage&lt;br /&gt;
* Should give an error on exceeding the space limit of session storage&lt;br /&gt;
&lt;br /&gt;
The complete list of test cases can be found [http://github.com/servo/web-platform-tests/tree/servo/webstorage here].&lt;br /&gt;
&lt;br /&gt;
== Further Readings ==&lt;br /&gt;
&lt;br /&gt;
Learning Rust by Examples: http://rustbyexample.com/ &amp;lt;br/&amp;gt;&lt;br /&gt;
Javascript as Servo's Garbage Collector: http://blog.mozilla.org/research/2014/08/26/javascript-servos-only-garbage-collector/  &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vankam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=92133</id>
		<title>CSC/ECE 517 Fall 2014/final design doc M1450 navr</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=92133"/>
		<updated>2014-11-18T03:08:05Z</updated>

		<summary type="html">&lt;p&gt;Vankam: /* UML Diagrams */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Implement Window.sessionStorage ==&lt;br /&gt;
&lt;br /&gt;
This is the design document for the task &amp;lt;code&amp;gt;[http://github.com/servo/servo/wiki/Storage-student-project Implement Window.sessionStorage]&amp;lt;/code&amp;gt; for the [http://www.mozilla.org/ Mozilla] research project [http://github.com/servo/servo/wiki/Design Servo].&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== [http://www.rust-lang.org/ Rust]===&lt;br /&gt;
&lt;br /&gt;
Rust is a modern systems programming language focusing on safety and speed to build reliable and efficient systems &amp;lt;ref&amp;gt; http://doc.rust-lang.org/nightly/intro.html &amp;lt;/ref&amp;gt;. It accomplishes the goals of memory safe without using garbage collection and it supports concurrency and parallelism in building platforms. &lt;br /&gt;
&lt;br /&gt;
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. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [http://github.com/servo/servo/wiki/Design Servo] ===&lt;br /&gt;
&lt;br /&gt;
Mozilla Research team is currently working on an experimental project to develop a new Web browser engine &amp;quot;Servo&amp;quot;, 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.&amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The main objectives of this experimentation project is improving the layout to graphics rendering - to optimize for power efficiency and maximize parallelism. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
&lt;br /&gt;
=== [http://html.spec.whatwg.org/multipage/webstorage.html#webstorage Web Storage] ===&lt;br /&gt;
The web storage specification defines the means by which a web application can store string key/value pairs in a browser and later retrieve them for use.&amp;lt;ref&amp;gt;https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Storage&amp;lt;/ref&amp;gt; It supports persistent data storage, similar to [http://en.wikipedia.org/wiki/HTTP_cookie cookies] but with a greatly enhanced capacity and no information stored in the [http://en.wikipedia.org/wiki/List_of_HTTP_headers HTTP request header].&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Web_storage&amp;lt;/ref&amp;gt; There are two types of web storage: [http://html.spec.whatwg.org/multipage/webstorage.html#dom-localstorage local storage] and [http://html.spec.whatwg.org/multipage/webstorage.html#dom-sessionstorage session storage].&lt;br /&gt;
&lt;br /&gt;
Browsers that support web storage have the global variables 'sessionStorage' and 'localStorage' declared at the [http://developer.mozilla.org/en-US/docs/Web/API/Window?redirectlocale=en-US&amp;amp;redirectslug=DOM%2Fwindow window] level. The following JavaScript code gives an example of how to use web storage:&lt;br /&gt;
&lt;br /&gt;
'''sessionStorage'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Store value on browser for duration of the session&lt;br /&gt;
sessionStorage.setItem('key', 'value');&lt;br /&gt;
 &lt;br /&gt;
// Retrieve value (gets deleted when browser is closed and re-opened)&lt;br /&gt;
alert(sessionStorage.getItem('key'));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''localStorage'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Store value on the browser beyond the duration of the session&lt;br /&gt;
localStorage.setItem('key', 'value');&lt;br /&gt;
 &lt;br /&gt;
// Retrieve value (persists even after closing and re-opening the browser)&lt;br /&gt;
alert(localStorage.getItem('key'));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
&lt;br /&gt;
As part of our [http://github.com/servo/servo/wiki/Storage-student-project project], we have to implement the web storage specification in the Servo browser. 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. &amp;lt;ref&amp;gt; https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Requirement Analysis &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
In order to introduce the support for session storage and local storage in the Servo Broswer, we have to create the Storage structure and allow web pages to store data in the Servo memory space.&lt;br /&gt;
&lt;br /&gt;
Below is a high level overview of the various steps that have been planned for this project:&lt;br /&gt;
&lt;br /&gt;
* Create the Storage interface and its stub implementation.&lt;br /&gt;
* Create the WindowSessionStorage interface making it return a Storage instance.&lt;br /&gt;
* Create a Storage Task which will be used to contain all stored data.&lt;br /&gt;
* Define a message-passing interface for reading and writing stored data for a particular browser tab.&lt;br /&gt;
* Use the Storage task in the implementation of Storage.&lt;br /&gt;
* When the value of a stored data is changed, notify its respective browser tab.&lt;br /&gt;
* Pass as many [http://github.com/servo/web-platform-tests/tree/servo/webstorage tests] as possible.&lt;br /&gt;
* Implement the WindowLocalStorage interface which behaves slightly different from the WindowSessionStorage interface.&lt;br /&gt;
&lt;br /&gt;
== Architecture &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Design&amp;lt;/ref&amp;gt;==&lt;br /&gt;
&lt;br /&gt;
[[File:task.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Architecture Explained ===&lt;br /&gt;
*Each box represents a Rust task.&lt;br /&gt;
*Blue boxes represent the primary tasks in the browser pipeline.&lt;br /&gt;
*Gray boxes represent tasks auxiliary to the browser pipeline.&lt;br /&gt;
*White boxes represent worker tasks. Each such box represents several tasks, the precise number of which will vary with the workload.&lt;br /&gt;
*Dashed lines indicate supervisor relationships.&lt;br /&gt;
*Solid lines indicate communication channels.&lt;br /&gt;
&lt;br /&gt;
== Component Design ==&lt;br /&gt;
[[File:servo.jpg]]&lt;br /&gt;
&lt;br /&gt;
There will be 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.&lt;br /&gt;
&lt;br /&gt;
=== Task &amp;lt;ref&amp;gt;http://doc.rust-lang.org/guide-tasks.html&amp;lt;/ref&amp;gt;===&lt;br /&gt;
Rust provides safe concurrent abstractions through a number of core library primitives. This guide will describe the concurrency model in Rust, how it relates to the Rust type system, and introduce the fundamental library abstractions for constructing concurrent programs.&lt;br /&gt;
&lt;br /&gt;
Tasks provide failure isolation and recovery. When a fatal error occurs in Rust code as a result of an explicit call to panic!(), an assertion failure, or another invalid operation, the runtime system destroys the entire task. Unlike in languages such as Java and C++, there is no way to catch an exception. Instead, tasks may monitor each other to see if they panic.&lt;br /&gt;
&lt;br /&gt;
Tasks use Rust's type system to provide strong memory safety guarantees. In particular, the type system guarantees that tasks cannot induce a data race from shared mutable state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Generate some state locally&lt;br /&gt;
let child_task_number = generate_task_number();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    // Capture it in the remote task&lt;br /&gt;
    println!(&amp;quot;I am child number {}&amp;quot;, child_task_number);&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Channel &amp;lt;ref&amp;gt;http://doc.rust-lang.org/guide-tasks.html&amp;lt;/ref&amp;gt;===&lt;br /&gt;
Now that we have spawned a new task, it would be nice if we could communicate with it. For this, we use channels. A channel is simply a pair of endpoints: one for sending messages and another for receiving messages.&lt;br /&gt;
&lt;br /&gt;
The simplest way to create a channel is to use the channel function to create a (Sender, Receiver) pair. In Rust parlance, a sender is a sending endpoint of a channel, and a receiver is the receiving endpoint. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
let (tx, rx): (Sender&amp;lt;int&amp;gt;, Receiver&amp;lt;int&amp;gt;) = channel();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    let result = some_expensive_computation();&lt;br /&gt;
    tx.send(result);&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
some_other_expensive_computation();&lt;br /&gt;
let result = rx.recv();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Data Design ==&lt;br /&gt;
&lt;br /&gt;
===  Data Description ===&lt;br /&gt;
&lt;br /&gt;
''The following are the data structures that will be used.''&lt;br /&gt;
&lt;br /&gt;
'''Storage''' | TreeMap&amp;lt;String,String&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''UrlMap''' | TreeMap&amp;lt;String,TreeMap&amp;lt;String,String&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design Pattern ==&lt;br /&gt;
&lt;br /&gt;
We will be using &amp;quot;Delegation Pattern&amp;quot; in our project. The Storage interface is used by web applications to access the web storage provided by the browser. However, the actual data is stored somewhere else(Servo Memory Space). So, it makes sense to create another class which will maintain the actual stored data. The Storage class can then delegate the task of storing/retrieving data to this class. We will create a class &amp;quot;WebStorageTask&amp;quot; for this purpose.&lt;br /&gt;
&lt;br /&gt;
== UML Diagrams ==&lt;br /&gt;
             &lt;br /&gt;
[[File:Flow_Chart_Storage.png|200px|left]] &lt;br /&gt;
[[File:Use_Case_Storage.jpg|right]]&lt;br /&gt;
&lt;br /&gt;
'''Steps:'''&lt;br /&gt;
&lt;br /&gt;
1. First, we need to build rust and servo. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. Generate the corresponding WebIDL bindings - Storage.webidl &amp;lt;br/&amp;gt;&lt;br /&gt;
3. Define Storage.rs which has the actual code for creating the storage object. &amp;lt;br/&amp;gt;&lt;br /&gt;
4. Call the receiver via a channel- this is actually used for creating an instance for each unique URL. &amp;lt;br/&amp;gt;&lt;br /&gt;
5. Build the servo again. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Use Case Functionality'''&lt;br /&gt;
&lt;br /&gt;
1. Here the user can open multiple domains( multiple URL's)where each domain will have a separate Storage object.&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Thereby the user will be creating multiple storage instances.&amp;lt;br/&amp;gt;&lt;br /&gt;
3. An user can traverse deep into the website but the storage instance for that URL must be the same.&amp;lt;br/&amp;gt;&lt;br /&gt;
4. The user can reopen the domain for a later period.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Proposed Test Cases ==&lt;br /&gt;
&lt;br /&gt;
Some of the test cases which will be used to validate our changes are as follows:&lt;br /&gt;
&lt;br /&gt;
* Allow a web page to clear its session storage&lt;br /&gt;
* Allow a web page to store an item in its session storage&lt;br /&gt;
* Allow a web page to retrieve stored items from its session storage&lt;br /&gt;
* Do not allow a web page to retrieve stored items from the session storage of a web page in another domain&lt;br /&gt;
* Check the number of items stored in session storage&lt;br /&gt;
* On removing an item from storage, it should be inaccessible&lt;br /&gt;
* Should return null as value for a key not present in the session storage&lt;br /&gt;
* Should give an error on exceeding the space limit of session storage&lt;br /&gt;
&lt;br /&gt;
The complete list of test cases can be found [http://github.com/servo/web-platform-tests/tree/servo/webstorage here].&lt;br /&gt;
&lt;br /&gt;
== Further Readings ==&lt;br /&gt;
&lt;br /&gt;
Learning Rust by Examples: http://rustbyexample.com/ &amp;lt;br/&amp;gt;&lt;br /&gt;
Javascript as Servo's Garbage Collector: http://blog.mozilla.org/research/2014/08/26/javascript-servos-only-garbage-collector/  &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vankam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=92132</id>
		<title>CSC/ECE 517 Fall 2014/final design doc M1450 navr</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=92132"/>
		<updated>2014-11-18T03:07:48Z</updated>

		<summary type="html">&lt;p&gt;Vankam: /* UML Diagrams */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Implement Window.sessionStorage ==&lt;br /&gt;
&lt;br /&gt;
This is the design document for the task &amp;lt;code&amp;gt;[http://github.com/servo/servo/wiki/Storage-student-project Implement Window.sessionStorage]&amp;lt;/code&amp;gt; for the [http://www.mozilla.org/ Mozilla] research project [http://github.com/servo/servo/wiki/Design Servo].&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== [http://www.rust-lang.org/ Rust]===&lt;br /&gt;
&lt;br /&gt;
Rust is a modern systems programming language focusing on safety and speed to build reliable and efficient systems &amp;lt;ref&amp;gt; http://doc.rust-lang.org/nightly/intro.html &amp;lt;/ref&amp;gt;. It accomplishes the goals of memory safe without using garbage collection and it supports concurrency and parallelism in building platforms. &lt;br /&gt;
&lt;br /&gt;
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. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [http://github.com/servo/servo/wiki/Design Servo] ===&lt;br /&gt;
&lt;br /&gt;
Mozilla Research team is currently working on an experimental project to develop a new Web browser engine &amp;quot;Servo&amp;quot;, 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.&amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The main objectives of this experimentation project is improving the layout to graphics rendering - to optimize for power efficiency and maximize parallelism. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
&lt;br /&gt;
=== [http://html.spec.whatwg.org/multipage/webstorage.html#webstorage Web Storage] ===&lt;br /&gt;
The web storage specification defines the means by which a web application can store string key/value pairs in a browser and later retrieve them for use.&amp;lt;ref&amp;gt;https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Storage&amp;lt;/ref&amp;gt; It supports persistent data storage, similar to [http://en.wikipedia.org/wiki/HTTP_cookie cookies] but with a greatly enhanced capacity and no information stored in the [http://en.wikipedia.org/wiki/List_of_HTTP_headers HTTP request header].&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Web_storage&amp;lt;/ref&amp;gt; There are two types of web storage: [http://html.spec.whatwg.org/multipage/webstorage.html#dom-localstorage local storage] and [http://html.spec.whatwg.org/multipage/webstorage.html#dom-sessionstorage session storage].&lt;br /&gt;
&lt;br /&gt;
Browsers that support web storage have the global variables 'sessionStorage' and 'localStorage' declared at the [http://developer.mozilla.org/en-US/docs/Web/API/Window?redirectlocale=en-US&amp;amp;redirectslug=DOM%2Fwindow window] level. The following JavaScript code gives an example of how to use web storage:&lt;br /&gt;
&lt;br /&gt;
'''sessionStorage'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Store value on browser for duration of the session&lt;br /&gt;
sessionStorage.setItem('key', 'value');&lt;br /&gt;
 &lt;br /&gt;
// Retrieve value (gets deleted when browser is closed and re-opened)&lt;br /&gt;
alert(sessionStorage.getItem('key'));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''localStorage'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Store value on the browser beyond the duration of the session&lt;br /&gt;
localStorage.setItem('key', 'value');&lt;br /&gt;
 &lt;br /&gt;
// Retrieve value (persists even after closing and re-opening the browser)&lt;br /&gt;
alert(localStorage.getItem('key'));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
&lt;br /&gt;
As part of our [http://github.com/servo/servo/wiki/Storage-student-project project], we have to implement the web storage specification in the Servo browser. 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. &amp;lt;ref&amp;gt; https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Requirement Analysis &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
In order to introduce the support for session storage and local storage in the Servo Broswer, we have to create the Storage structure and allow web pages to store data in the Servo memory space.&lt;br /&gt;
&lt;br /&gt;
Below is a high level overview of the various steps that have been planned for this project:&lt;br /&gt;
&lt;br /&gt;
* Create the Storage interface and its stub implementation.&lt;br /&gt;
* Create the WindowSessionStorage interface making it return a Storage instance.&lt;br /&gt;
* Create a Storage Task which will be used to contain all stored data.&lt;br /&gt;
* Define a message-passing interface for reading and writing stored data for a particular browser tab.&lt;br /&gt;
* Use the Storage task in the implementation of Storage.&lt;br /&gt;
* When the value of a stored data is changed, notify its respective browser tab.&lt;br /&gt;
* Pass as many [http://github.com/servo/web-platform-tests/tree/servo/webstorage tests] as possible.&lt;br /&gt;
* Implement the WindowLocalStorage interface which behaves slightly different from the WindowSessionStorage interface.&lt;br /&gt;
&lt;br /&gt;
== Architecture &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Design&amp;lt;/ref&amp;gt;==&lt;br /&gt;
&lt;br /&gt;
[[File:task.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Architecture Explained ===&lt;br /&gt;
*Each box represents a Rust task.&lt;br /&gt;
*Blue boxes represent the primary tasks in the browser pipeline.&lt;br /&gt;
*Gray boxes represent tasks auxiliary to the browser pipeline.&lt;br /&gt;
*White boxes represent worker tasks. Each such box represents several tasks, the precise number of which will vary with the workload.&lt;br /&gt;
*Dashed lines indicate supervisor relationships.&lt;br /&gt;
*Solid lines indicate communication channels.&lt;br /&gt;
&lt;br /&gt;
== Component Design ==&lt;br /&gt;
[[File:servo.jpg]]&lt;br /&gt;
&lt;br /&gt;
There will be 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.&lt;br /&gt;
&lt;br /&gt;
=== Task &amp;lt;ref&amp;gt;http://doc.rust-lang.org/guide-tasks.html&amp;lt;/ref&amp;gt;===&lt;br /&gt;
Rust provides safe concurrent abstractions through a number of core library primitives. This guide will describe the concurrency model in Rust, how it relates to the Rust type system, and introduce the fundamental library abstractions for constructing concurrent programs.&lt;br /&gt;
&lt;br /&gt;
Tasks provide failure isolation and recovery. When a fatal error occurs in Rust code as a result of an explicit call to panic!(), an assertion failure, or another invalid operation, the runtime system destroys the entire task. Unlike in languages such as Java and C++, there is no way to catch an exception. Instead, tasks may monitor each other to see if they panic.&lt;br /&gt;
&lt;br /&gt;
Tasks use Rust's type system to provide strong memory safety guarantees. In particular, the type system guarantees that tasks cannot induce a data race from shared mutable state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Generate some state locally&lt;br /&gt;
let child_task_number = generate_task_number();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    // Capture it in the remote task&lt;br /&gt;
    println!(&amp;quot;I am child number {}&amp;quot;, child_task_number);&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Channel &amp;lt;ref&amp;gt;http://doc.rust-lang.org/guide-tasks.html&amp;lt;/ref&amp;gt;===&lt;br /&gt;
Now that we have spawned a new task, it would be nice if we could communicate with it. For this, we use channels. A channel is simply a pair of endpoints: one for sending messages and another for receiving messages.&lt;br /&gt;
&lt;br /&gt;
The simplest way to create a channel is to use the channel function to create a (Sender, Receiver) pair. In Rust parlance, a sender is a sending endpoint of a channel, and a receiver is the receiving endpoint. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
let (tx, rx): (Sender&amp;lt;int&amp;gt;, Receiver&amp;lt;int&amp;gt;) = channel();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    let result = some_expensive_computation();&lt;br /&gt;
    tx.send(result);&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
some_other_expensive_computation();&lt;br /&gt;
let result = rx.recv();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Data Design ==&lt;br /&gt;
&lt;br /&gt;
===  Data Description ===&lt;br /&gt;
&lt;br /&gt;
''The following are the data structures that will be used.''&lt;br /&gt;
&lt;br /&gt;
'''Storage''' | TreeMap&amp;lt;String,String&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''UrlMap''' | TreeMap&amp;lt;String,TreeMap&amp;lt;String,String&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design Pattern ==&lt;br /&gt;
&lt;br /&gt;
We will be using &amp;quot;Delegation Pattern&amp;quot; in our project. The Storage interface is used by web applications to access the web storage provided by the browser. However, the actual data is stored somewhere else(Servo Memory Space). So, it makes sense to create another class which will maintain the actual stored data. The Storage class can then delegate the task of storing/retrieving data to this class. We will create a class &amp;quot;WebStorageTask&amp;quot; for this purpose.&lt;br /&gt;
&lt;br /&gt;
== UML Diagrams ==&lt;br /&gt;
             &lt;br /&gt;
[[File:Flow_Chart_Storage.png|left]] &lt;br /&gt;
[[File:Use_Case_Storage.jpg|200px|right]]&lt;br /&gt;
&lt;br /&gt;
'''Steps:'''&lt;br /&gt;
&lt;br /&gt;
1. First, we need to build rust and servo. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. Generate the corresponding WebIDL bindings - Storage.webidl &amp;lt;br/&amp;gt;&lt;br /&gt;
3. Define Storage.rs which has the actual code for creating the storage object. &amp;lt;br/&amp;gt;&lt;br /&gt;
4. Call the receiver via a channel- this is actually used for creating an instance for each unique URL. &amp;lt;br/&amp;gt;&lt;br /&gt;
5. Build the servo again. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Use Case Functionality'''&lt;br /&gt;
&lt;br /&gt;
1. Here the user can open multiple domains( multiple URL's)where each domain will have a separate Storage object.&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Thereby the user will be creating multiple storage instances.&amp;lt;br/&amp;gt;&lt;br /&gt;
3. An user can traverse deep into the website but the storage instance for that URL must be the same.&amp;lt;br/&amp;gt;&lt;br /&gt;
4. The user can reopen the domain for a later period.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Proposed Test Cases ==&lt;br /&gt;
&lt;br /&gt;
Some of the test cases which will be used to validate our changes are as follows:&lt;br /&gt;
&lt;br /&gt;
* Allow a web page to clear its session storage&lt;br /&gt;
* Allow a web page to store an item in its session storage&lt;br /&gt;
* Allow a web page to retrieve stored items from its session storage&lt;br /&gt;
* Do not allow a web page to retrieve stored items from the session storage of a web page in another domain&lt;br /&gt;
* Check the number of items stored in session storage&lt;br /&gt;
* On removing an item from storage, it should be inaccessible&lt;br /&gt;
* Should return null as value for a key not present in the session storage&lt;br /&gt;
* Should give an error on exceeding the space limit of session storage&lt;br /&gt;
&lt;br /&gt;
The complete list of test cases can be found [http://github.com/servo/web-platform-tests/tree/servo/webstorage here].&lt;br /&gt;
&lt;br /&gt;
== Further Readings ==&lt;br /&gt;
&lt;br /&gt;
Learning Rust by Examples: http://rustbyexample.com/ &amp;lt;br/&amp;gt;&lt;br /&gt;
Javascript as Servo's Garbage Collector: http://blog.mozilla.org/research/2014/08/26/javascript-servos-only-garbage-collector/  &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vankam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=92131</id>
		<title>CSC/ECE 517 Fall 2014/final design doc M1450 navr</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=92131"/>
		<updated>2014-11-18T03:07:11Z</updated>

		<summary type="html">&lt;p&gt;Vankam: /* UML Diagrams */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Implement Window.sessionStorage ==&lt;br /&gt;
&lt;br /&gt;
This is the design document for the task &amp;lt;code&amp;gt;[http://github.com/servo/servo/wiki/Storage-student-project Implement Window.sessionStorage]&amp;lt;/code&amp;gt; for the [http://www.mozilla.org/ Mozilla] research project [http://github.com/servo/servo/wiki/Design Servo].&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== [http://www.rust-lang.org/ Rust]===&lt;br /&gt;
&lt;br /&gt;
Rust is a modern systems programming language focusing on safety and speed to build reliable and efficient systems &amp;lt;ref&amp;gt; http://doc.rust-lang.org/nightly/intro.html &amp;lt;/ref&amp;gt;. It accomplishes the goals of memory safe without using garbage collection and it supports concurrency and parallelism in building platforms. &lt;br /&gt;
&lt;br /&gt;
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. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [http://github.com/servo/servo/wiki/Design Servo] ===&lt;br /&gt;
&lt;br /&gt;
Mozilla Research team is currently working on an experimental project to develop a new Web browser engine &amp;quot;Servo&amp;quot;, 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.&amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The main objectives of this experimentation project is improving the layout to graphics rendering - to optimize for power efficiency and maximize parallelism. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
&lt;br /&gt;
=== [http://html.spec.whatwg.org/multipage/webstorage.html#webstorage Web Storage] ===&lt;br /&gt;
The web storage specification defines the means by which a web application can store string key/value pairs in a browser and later retrieve them for use.&amp;lt;ref&amp;gt;https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Storage&amp;lt;/ref&amp;gt; It supports persistent data storage, similar to [http://en.wikipedia.org/wiki/HTTP_cookie cookies] but with a greatly enhanced capacity and no information stored in the [http://en.wikipedia.org/wiki/List_of_HTTP_headers HTTP request header].&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Web_storage&amp;lt;/ref&amp;gt; There are two types of web storage: [http://html.spec.whatwg.org/multipage/webstorage.html#dom-localstorage local storage] and [http://html.spec.whatwg.org/multipage/webstorage.html#dom-sessionstorage session storage].&lt;br /&gt;
&lt;br /&gt;
Browsers that support web storage have the global variables 'sessionStorage' and 'localStorage' declared at the [http://developer.mozilla.org/en-US/docs/Web/API/Window?redirectlocale=en-US&amp;amp;redirectslug=DOM%2Fwindow window] level. The following JavaScript code gives an example of how to use web storage:&lt;br /&gt;
&lt;br /&gt;
'''sessionStorage'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Store value on browser for duration of the session&lt;br /&gt;
sessionStorage.setItem('key', 'value');&lt;br /&gt;
 &lt;br /&gt;
// Retrieve value (gets deleted when browser is closed and re-opened)&lt;br /&gt;
alert(sessionStorage.getItem('key'));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''localStorage'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Store value on the browser beyond the duration of the session&lt;br /&gt;
localStorage.setItem('key', 'value');&lt;br /&gt;
 &lt;br /&gt;
// Retrieve value (persists even after closing and re-opening the browser)&lt;br /&gt;
alert(localStorage.getItem('key'));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
&lt;br /&gt;
As part of our [http://github.com/servo/servo/wiki/Storage-student-project project], we have to implement the web storage specification in the Servo browser. 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. &amp;lt;ref&amp;gt; https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Requirement Analysis &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
In order to introduce the support for session storage and local storage in the Servo Broswer, we have to create the Storage structure and allow web pages to store data in the Servo memory space.&lt;br /&gt;
&lt;br /&gt;
Below is a high level overview of the various steps that have been planned for this project:&lt;br /&gt;
&lt;br /&gt;
* Create the Storage interface and its stub implementation.&lt;br /&gt;
* Create the WindowSessionStorage interface making it return a Storage instance.&lt;br /&gt;
* Create a Storage Task which will be used to contain all stored data.&lt;br /&gt;
* Define a message-passing interface for reading and writing stored data for a particular browser tab.&lt;br /&gt;
* Use the Storage task in the implementation of Storage.&lt;br /&gt;
* When the value of a stored data is changed, notify its respective browser tab.&lt;br /&gt;
* Pass as many [http://github.com/servo/web-platform-tests/tree/servo/webstorage tests] as possible.&lt;br /&gt;
* Implement the WindowLocalStorage interface which behaves slightly different from the WindowSessionStorage interface.&lt;br /&gt;
&lt;br /&gt;
== Architecture &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Design&amp;lt;/ref&amp;gt;==&lt;br /&gt;
&lt;br /&gt;
[[File:task.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Architecture Explained ===&lt;br /&gt;
*Each box represents a Rust task.&lt;br /&gt;
*Blue boxes represent the primary tasks in the browser pipeline.&lt;br /&gt;
*Gray boxes represent tasks auxiliary to the browser pipeline.&lt;br /&gt;
*White boxes represent worker tasks. Each such box represents several tasks, the precise number of which will vary with the workload.&lt;br /&gt;
*Dashed lines indicate supervisor relationships.&lt;br /&gt;
*Solid lines indicate communication channels.&lt;br /&gt;
&lt;br /&gt;
== Component Design ==&lt;br /&gt;
[[File:servo.jpg]]&lt;br /&gt;
&lt;br /&gt;
There will be 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.&lt;br /&gt;
&lt;br /&gt;
=== Task &amp;lt;ref&amp;gt;http://doc.rust-lang.org/guide-tasks.html&amp;lt;/ref&amp;gt;===&lt;br /&gt;
Rust provides safe concurrent abstractions through a number of core library primitives. This guide will describe the concurrency model in Rust, how it relates to the Rust type system, and introduce the fundamental library abstractions for constructing concurrent programs.&lt;br /&gt;
&lt;br /&gt;
Tasks provide failure isolation and recovery. When a fatal error occurs in Rust code as a result of an explicit call to panic!(), an assertion failure, or another invalid operation, the runtime system destroys the entire task. Unlike in languages such as Java and C++, there is no way to catch an exception. Instead, tasks may monitor each other to see if they panic.&lt;br /&gt;
&lt;br /&gt;
Tasks use Rust's type system to provide strong memory safety guarantees. In particular, the type system guarantees that tasks cannot induce a data race from shared mutable state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Generate some state locally&lt;br /&gt;
let child_task_number = generate_task_number();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    // Capture it in the remote task&lt;br /&gt;
    println!(&amp;quot;I am child number {}&amp;quot;, child_task_number);&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Channel &amp;lt;ref&amp;gt;http://doc.rust-lang.org/guide-tasks.html&amp;lt;/ref&amp;gt;===&lt;br /&gt;
Now that we have spawned a new task, it would be nice if we could communicate with it. For this, we use channels. A channel is simply a pair of endpoints: one for sending messages and another for receiving messages.&lt;br /&gt;
&lt;br /&gt;
The simplest way to create a channel is to use the channel function to create a (Sender, Receiver) pair. In Rust parlance, a sender is a sending endpoint of a channel, and a receiver is the receiving endpoint. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
let (tx, rx): (Sender&amp;lt;int&amp;gt;, Receiver&amp;lt;int&amp;gt;) = channel();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    let result = some_expensive_computation();&lt;br /&gt;
    tx.send(result);&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
some_other_expensive_computation();&lt;br /&gt;
let result = rx.recv();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Data Design ==&lt;br /&gt;
&lt;br /&gt;
===  Data Description ===&lt;br /&gt;
&lt;br /&gt;
''The following are the data structures that will be used.''&lt;br /&gt;
&lt;br /&gt;
'''Storage''' | TreeMap&amp;lt;String,String&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''UrlMap''' | TreeMap&amp;lt;String,TreeMap&amp;lt;String,String&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design Pattern ==&lt;br /&gt;
&lt;br /&gt;
We will be using &amp;quot;Delegation Pattern&amp;quot; in our project. The Storage interface is used by web applications to access the web storage provided by the browser. However, the actual data is stored somewhere else(Servo Memory Space). So, it makes sense to create another class which will maintain the actual stored data. The Storage class can then delegate the task of storing/retrieving data to this class. We will create a class &amp;quot;WebStorageTask&amp;quot; for this purpose.&lt;br /&gt;
&lt;br /&gt;
== UML Diagrams ==&lt;br /&gt;
             &lt;br /&gt;
[[File:Flow_Chart_Storage.png|left]] &lt;br /&gt;
[[File:Use_Case_Storage.jpg|right]]&lt;br /&gt;
&lt;br /&gt;
'''Steps:'''&lt;br /&gt;
&lt;br /&gt;
1. First, we need to build rust and servo. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. Generate the corresponding WebIDL bindings - Storage.webidl &amp;lt;br/&amp;gt;&lt;br /&gt;
3. Define Storage.rs which has the actual code for creating the storage object. &amp;lt;br/&amp;gt;&lt;br /&gt;
4. Call the receiver via a channel- this is actually used for creating an instance for each unique URL. &amp;lt;br/&amp;gt;&lt;br /&gt;
5. Build the servo again. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Use Case Functionality'''&lt;br /&gt;
&lt;br /&gt;
1. Here the user can open multiple domains( multiple URL's)where each domain will have a separate Storage object.&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Thereby the user will be creating multiple storage instances.&amp;lt;br/&amp;gt;&lt;br /&gt;
3. An user can traverse deep into the website but the storage instance for that URL must be the same.&amp;lt;br/&amp;gt;&lt;br /&gt;
4. The user can reopen the domain for a later period.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Proposed Test Cases ==&lt;br /&gt;
&lt;br /&gt;
Some of the test cases which will be used to validate our changes are as follows:&lt;br /&gt;
&lt;br /&gt;
* Allow a web page to clear its session storage&lt;br /&gt;
* Allow a web page to store an item in its session storage&lt;br /&gt;
* Allow a web page to retrieve stored items from its session storage&lt;br /&gt;
* Do not allow a web page to retrieve stored items from the session storage of a web page in another domain&lt;br /&gt;
* Check the number of items stored in session storage&lt;br /&gt;
* On removing an item from storage, it should be inaccessible&lt;br /&gt;
* Should return null as value for a key not present in the session storage&lt;br /&gt;
* Should give an error on exceeding the space limit of session storage&lt;br /&gt;
&lt;br /&gt;
The complete list of test cases can be found [http://github.com/servo/web-platform-tests/tree/servo/webstorage here].&lt;br /&gt;
&lt;br /&gt;
== Further Readings ==&lt;br /&gt;
&lt;br /&gt;
Learning Rust by Examples: http://rustbyexample.com/ &amp;lt;br/&amp;gt;&lt;br /&gt;
Javascript as Servo's Garbage Collector: http://blog.mozilla.org/research/2014/08/26/javascript-servos-only-garbage-collector/  &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vankam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=92130</id>
		<title>CSC/ECE 517 Fall 2014/final design doc M1450 navr</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=92130"/>
		<updated>2014-11-18T03:06:51Z</updated>

		<summary type="html">&lt;p&gt;Vankam: /* UML Diagrams */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Implement Window.sessionStorage ==&lt;br /&gt;
&lt;br /&gt;
This is the design document for the task &amp;lt;code&amp;gt;[http://github.com/servo/servo/wiki/Storage-student-project Implement Window.sessionStorage]&amp;lt;/code&amp;gt; for the [http://www.mozilla.org/ Mozilla] research project [http://github.com/servo/servo/wiki/Design Servo].&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== [http://www.rust-lang.org/ Rust]===&lt;br /&gt;
&lt;br /&gt;
Rust is a modern systems programming language focusing on safety and speed to build reliable and efficient systems &amp;lt;ref&amp;gt; http://doc.rust-lang.org/nightly/intro.html &amp;lt;/ref&amp;gt;. It accomplishes the goals of memory safe without using garbage collection and it supports concurrency and parallelism in building platforms. &lt;br /&gt;
&lt;br /&gt;
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. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [http://github.com/servo/servo/wiki/Design Servo] ===&lt;br /&gt;
&lt;br /&gt;
Mozilla Research team is currently working on an experimental project to develop a new Web browser engine &amp;quot;Servo&amp;quot;, 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.&amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The main objectives of this experimentation project is improving the layout to graphics rendering - to optimize for power efficiency and maximize parallelism. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
&lt;br /&gt;
=== [http://html.spec.whatwg.org/multipage/webstorage.html#webstorage Web Storage] ===&lt;br /&gt;
The web storage specification defines the means by which a web application can store string key/value pairs in a browser and later retrieve them for use.&amp;lt;ref&amp;gt;https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Storage&amp;lt;/ref&amp;gt; It supports persistent data storage, similar to [http://en.wikipedia.org/wiki/HTTP_cookie cookies] but with a greatly enhanced capacity and no information stored in the [http://en.wikipedia.org/wiki/List_of_HTTP_headers HTTP request header].&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Web_storage&amp;lt;/ref&amp;gt; There are two types of web storage: [http://html.spec.whatwg.org/multipage/webstorage.html#dom-localstorage local storage] and [http://html.spec.whatwg.org/multipage/webstorage.html#dom-sessionstorage session storage].&lt;br /&gt;
&lt;br /&gt;
Browsers that support web storage have the global variables 'sessionStorage' and 'localStorage' declared at the [http://developer.mozilla.org/en-US/docs/Web/API/Window?redirectlocale=en-US&amp;amp;redirectslug=DOM%2Fwindow window] level. The following JavaScript code gives an example of how to use web storage:&lt;br /&gt;
&lt;br /&gt;
'''sessionStorage'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Store value on browser for duration of the session&lt;br /&gt;
sessionStorage.setItem('key', 'value');&lt;br /&gt;
 &lt;br /&gt;
// Retrieve value (gets deleted when browser is closed and re-opened)&lt;br /&gt;
alert(sessionStorage.getItem('key'));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''localStorage'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Store value on the browser beyond the duration of the session&lt;br /&gt;
localStorage.setItem('key', 'value');&lt;br /&gt;
 &lt;br /&gt;
// Retrieve value (persists even after closing and re-opening the browser)&lt;br /&gt;
alert(localStorage.getItem('key'));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
&lt;br /&gt;
As part of our [http://github.com/servo/servo/wiki/Storage-student-project project], we have to implement the web storage specification in the Servo browser. 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. &amp;lt;ref&amp;gt; https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Requirement Analysis &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
In order to introduce the support for session storage and local storage in the Servo Broswer, we have to create the Storage structure and allow web pages to store data in the Servo memory space.&lt;br /&gt;
&lt;br /&gt;
Below is a high level overview of the various steps that have been planned for this project:&lt;br /&gt;
&lt;br /&gt;
* Create the Storage interface and its stub implementation.&lt;br /&gt;
* Create the WindowSessionStorage interface making it return a Storage instance.&lt;br /&gt;
* Create a Storage Task which will be used to contain all stored data.&lt;br /&gt;
* Define a message-passing interface for reading and writing stored data for a particular browser tab.&lt;br /&gt;
* Use the Storage task in the implementation of Storage.&lt;br /&gt;
* When the value of a stored data is changed, notify its respective browser tab.&lt;br /&gt;
* Pass as many [http://github.com/servo/web-platform-tests/tree/servo/webstorage tests] as possible.&lt;br /&gt;
* Implement the WindowLocalStorage interface which behaves slightly different from the WindowSessionStorage interface.&lt;br /&gt;
&lt;br /&gt;
== Architecture &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Design&amp;lt;/ref&amp;gt;==&lt;br /&gt;
&lt;br /&gt;
[[File:task.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Architecture Explained ===&lt;br /&gt;
*Each box represents a Rust task.&lt;br /&gt;
*Blue boxes represent the primary tasks in the browser pipeline.&lt;br /&gt;
*Gray boxes represent tasks auxiliary to the browser pipeline.&lt;br /&gt;
*White boxes represent worker tasks. Each such box represents several tasks, the precise number of which will vary with the workload.&lt;br /&gt;
*Dashed lines indicate supervisor relationships.&lt;br /&gt;
*Solid lines indicate communication channels.&lt;br /&gt;
&lt;br /&gt;
== Component Design ==&lt;br /&gt;
[[File:servo.jpg]]&lt;br /&gt;
&lt;br /&gt;
There will be 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.&lt;br /&gt;
&lt;br /&gt;
=== Task &amp;lt;ref&amp;gt;http://doc.rust-lang.org/guide-tasks.html&amp;lt;/ref&amp;gt;===&lt;br /&gt;
Rust provides safe concurrent abstractions through a number of core library primitives. This guide will describe the concurrency model in Rust, how it relates to the Rust type system, and introduce the fundamental library abstractions for constructing concurrent programs.&lt;br /&gt;
&lt;br /&gt;
Tasks provide failure isolation and recovery. When a fatal error occurs in Rust code as a result of an explicit call to panic!(), an assertion failure, or another invalid operation, the runtime system destroys the entire task. Unlike in languages such as Java and C++, there is no way to catch an exception. Instead, tasks may monitor each other to see if they panic.&lt;br /&gt;
&lt;br /&gt;
Tasks use Rust's type system to provide strong memory safety guarantees. In particular, the type system guarantees that tasks cannot induce a data race from shared mutable state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Generate some state locally&lt;br /&gt;
let child_task_number = generate_task_number();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    // Capture it in the remote task&lt;br /&gt;
    println!(&amp;quot;I am child number {}&amp;quot;, child_task_number);&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Channel &amp;lt;ref&amp;gt;http://doc.rust-lang.org/guide-tasks.html&amp;lt;/ref&amp;gt;===&lt;br /&gt;
Now that we have spawned a new task, it would be nice if we could communicate with it. For this, we use channels. A channel is simply a pair of endpoints: one for sending messages and another for receiving messages.&lt;br /&gt;
&lt;br /&gt;
The simplest way to create a channel is to use the channel function to create a (Sender, Receiver) pair. In Rust parlance, a sender is a sending endpoint of a channel, and a receiver is the receiving endpoint. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
let (tx, rx): (Sender&amp;lt;int&amp;gt;, Receiver&amp;lt;int&amp;gt;) = channel();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    let result = some_expensive_computation();&lt;br /&gt;
    tx.send(result);&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
some_other_expensive_computation();&lt;br /&gt;
let result = rx.recv();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Data Design ==&lt;br /&gt;
&lt;br /&gt;
===  Data Description ===&lt;br /&gt;
&lt;br /&gt;
''The following are the data structures that will be used.''&lt;br /&gt;
&lt;br /&gt;
'''Storage''' | TreeMap&amp;lt;String,String&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''UrlMap''' | TreeMap&amp;lt;String,TreeMap&amp;lt;String,String&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design Pattern ==&lt;br /&gt;
&lt;br /&gt;
We will be using &amp;quot;Delegation Pattern&amp;quot; in our project. The Storage interface is used by web applications to access the web storage provided by the browser. However, the actual data is stored somewhere else(Servo Memory Space). So, it makes sense to create another class which will maintain the actual stored data. The Storage class can then delegate the task of storing/retrieving data to this class. We will create a class &amp;quot;WebStorageTask&amp;quot; for this purpose.&lt;br /&gt;
&lt;br /&gt;
== UML Diagrams ==&lt;br /&gt;
             &lt;br /&gt;
[[File:Flow_Chart_Storage.png|left]] &lt;br /&gt;
[[File:Use_Case_Storage.jpg|right]]&lt;br /&gt;
&lt;br /&gt;
'''Steps:'''&lt;br /&gt;
&lt;br /&gt;
1. First, we need to build rust and servo. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. Generate the corresponding WebIDL bindings - Storage.webidl &amp;lt;br/&amp;gt;&lt;br /&gt;
3. Define Storage.rs which has the actual code for creating the storage object. &amp;lt;br/&amp;gt;&lt;br /&gt;
4. Call the receiver via a channel- this is actually used for creating an instance for each unique URL. &amp;lt;br/&amp;gt;&lt;br /&gt;
5. Build the servo again. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Use Case Functionality'''&lt;br /&gt;
&lt;br /&gt;
1. Here the user can open multiple domains( multiple URL's)where each domain will have a separate Storage object.&lt;br /&gt;
2. Thereby the user will be creating multiple storage instances.&lt;br /&gt;
3. An user can traverse deep into the website but the storage instance for that URL must be the same.&lt;br /&gt;
4. The user can reopen the domain for a later period.&lt;br /&gt;
&lt;br /&gt;
== Proposed Test Cases ==&lt;br /&gt;
&lt;br /&gt;
Some of the test cases which will be used to validate our changes are as follows:&lt;br /&gt;
&lt;br /&gt;
* Allow a web page to clear its session storage&lt;br /&gt;
* Allow a web page to store an item in its session storage&lt;br /&gt;
* Allow a web page to retrieve stored items from its session storage&lt;br /&gt;
* Do not allow a web page to retrieve stored items from the session storage of a web page in another domain&lt;br /&gt;
* Check the number of items stored in session storage&lt;br /&gt;
* On removing an item from storage, it should be inaccessible&lt;br /&gt;
* Should return null as value for a key not present in the session storage&lt;br /&gt;
* Should give an error on exceeding the space limit of session storage&lt;br /&gt;
&lt;br /&gt;
The complete list of test cases can be found [http://github.com/servo/web-platform-tests/tree/servo/webstorage here].&lt;br /&gt;
&lt;br /&gt;
== Further Readings ==&lt;br /&gt;
&lt;br /&gt;
Learning Rust by Examples: http://rustbyexample.com/ &amp;lt;br/&amp;gt;&lt;br /&gt;
Javascript as Servo's Garbage Collector: http://blog.mozilla.org/research/2014/08/26/javascript-servos-only-garbage-collector/  &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vankam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=92129</id>
		<title>CSC/ECE 517 Fall 2014/final design doc M1450 navr</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=92129"/>
		<updated>2014-11-18T03:02:49Z</updated>

		<summary type="html">&lt;p&gt;Vankam: /* UML Diagrams */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Implement Window.sessionStorage ==&lt;br /&gt;
&lt;br /&gt;
This is the design document for the task &amp;lt;code&amp;gt;[http://github.com/servo/servo/wiki/Storage-student-project Implement Window.sessionStorage]&amp;lt;/code&amp;gt; for the [http://www.mozilla.org/ Mozilla] research project [http://github.com/servo/servo/wiki/Design Servo].&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== [http://www.rust-lang.org/ Rust]===&lt;br /&gt;
&lt;br /&gt;
Rust is a modern systems programming language focusing on safety and speed to build reliable and efficient systems &amp;lt;ref&amp;gt; http://doc.rust-lang.org/nightly/intro.html &amp;lt;/ref&amp;gt;. It accomplishes the goals of memory safe without using garbage collection and it supports concurrency and parallelism in building platforms. &lt;br /&gt;
&lt;br /&gt;
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. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [http://github.com/servo/servo/wiki/Design Servo] ===&lt;br /&gt;
&lt;br /&gt;
Mozilla Research team is currently working on an experimental project to develop a new Web browser engine &amp;quot;Servo&amp;quot;, 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.&amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The main objectives of this experimentation project is improving the layout to graphics rendering - to optimize for power efficiency and maximize parallelism. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
&lt;br /&gt;
=== [http://html.spec.whatwg.org/multipage/webstorage.html#webstorage Web Storage] ===&lt;br /&gt;
The web storage specification defines the means by which a web application can store string key/value pairs in a browser and later retrieve them for use.&amp;lt;ref&amp;gt;https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Storage&amp;lt;/ref&amp;gt; It supports persistent data storage, similar to [http://en.wikipedia.org/wiki/HTTP_cookie cookies] but with a greatly enhanced capacity and no information stored in the [http://en.wikipedia.org/wiki/List_of_HTTP_headers HTTP request header].&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Web_storage&amp;lt;/ref&amp;gt; There are two types of web storage: [http://html.spec.whatwg.org/multipage/webstorage.html#dom-localstorage local storage] and [http://html.spec.whatwg.org/multipage/webstorage.html#dom-sessionstorage session storage].&lt;br /&gt;
&lt;br /&gt;
Browsers that support web storage have the global variables 'sessionStorage' and 'localStorage' declared at the [http://developer.mozilla.org/en-US/docs/Web/API/Window?redirectlocale=en-US&amp;amp;redirectslug=DOM%2Fwindow window] level. The following JavaScript code gives an example of how to use web storage:&lt;br /&gt;
&lt;br /&gt;
'''sessionStorage'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Store value on browser for duration of the session&lt;br /&gt;
sessionStorage.setItem('key', 'value');&lt;br /&gt;
 &lt;br /&gt;
// Retrieve value (gets deleted when browser is closed and re-opened)&lt;br /&gt;
alert(sessionStorage.getItem('key'));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''localStorage'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Store value on the browser beyond the duration of the session&lt;br /&gt;
localStorage.setItem('key', 'value');&lt;br /&gt;
 &lt;br /&gt;
// Retrieve value (persists even after closing and re-opening the browser)&lt;br /&gt;
alert(localStorage.getItem('key'));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
&lt;br /&gt;
As part of our [http://github.com/servo/servo/wiki/Storage-student-project project], we have to implement the web storage specification in the Servo browser. 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. &amp;lt;ref&amp;gt; https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Requirement Analysis &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
In order to introduce the support for session storage and local storage in the Servo Broswer, we have to create the Storage structure and allow web pages to store data in the Servo memory space.&lt;br /&gt;
&lt;br /&gt;
Below is a high level overview of the various steps that have been planned for this project:&lt;br /&gt;
&lt;br /&gt;
* Create the Storage interface and its stub implementation.&lt;br /&gt;
* Create the WindowSessionStorage interface making it return a Storage instance.&lt;br /&gt;
* Create a Storage Task which will be used to contain all stored data.&lt;br /&gt;
* Define a message-passing interface for reading and writing stored data for a particular browser tab.&lt;br /&gt;
* Use the Storage task in the implementation of Storage.&lt;br /&gt;
* When the value of a stored data is changed, notify its respective browser tab.&lt;br /&gt;
* Pass as many [http://github.com/servo/web-platform-tests/tree/servo/webstorage tests] as possible.&lt;br /&gt;
* Implement the WindowLocalStorage interface which behaves slightly different from the WindowSessionStorage interface.&lt;br /&gt;
&lt;br /&gt;
== Architecture &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Design&amp;lt;/ref&amp;gt;==&lt;br /&gt;
&lt;br /&gt;
[[File:task.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Architecture Explained ===&lt;br /&gt;
*Each box represents a Rust task.&lt;br /&gt;
*Blue boxes represent the primary tasks in the browser pipeline.&lt;br /&gt;
*Gray boxes represent tasks auxiliary to the browser pipeline.&lt;br /&gt;
*White boxes represent worker tasks. Each such box represents several tasks, the precise number of which will vary with the workload.&lt;br /&gt;
*Dashed lines indicate supervisor relationships.&lt;br /&gt;
*Solid lines indicate communication channels.&lt;br /&gt;
&lt;br /&gt;
== Component Design ==&lt;br /&gt;
[[File:servo.jpg]]&lt;br /&gt;
&lt;br /&gt;
There will be 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.&lt;br /&gt;
&lt;br /&gt;
=== Task &amp;lt;ref&amp;gt;http://doc.rust-lang.org/guide-tasks.html&amp;lt;/ref&amp;gt;===&lt;br /&gt;
Rust provides safe concurrent abstractions through a number of core library primitives. This guide will describe the concurrency model in Rust, how it relates to the Rust type system, and introduce the fundamental library abstractions for constructing concurrent programs.&lt;br /&gt;
&lt;br /&gt;
Tasks provide failure isolation and recovery. When a fatal error occurs in Rust code as a result of an explicit call to panic!(), an assertion failure, or another invalid operation, the runtime system destroys the entire task. Unlike in languages such as Java and C++, there is no way to catch an exception. Instead, tasks may monitor each other to see if they panic.&lt;br /&gt;
&lt;br /&gt;
Tasks use Rust's type system to provide strong memory safety guarantees. In particular, the type system guarantees that tasks cannot induce a data race from shared mutable state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Generate some state locally&lt;br /&gt;
let child_task_number = generate_task_number();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    // Capture it in the remote task&lt;br /&gt;
    println!(&amp;quot;I am child number {}&amp;quot;, child_task_number);&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Channel &amp;lt;ref&amp;gt;http://doc.rust-lang.org/guide-tasks.html&amp;lt;/ref&amp;gt;===&lt;br /&gt;
Now that we have spawned a new task, it would be nice if we could communicate with it. For this, we use channels. A channel is simply a pair of endpoints: one for sending messages and another for receiving messages.&lt;br /&gt;
&lt;br /&gt;
The simplest way to create a channel is to use the channel function to create a (Sender, Receiver) pair. In Rust parlance, a sender is a sending endpoint of a channel, and a receiver is the receiving endpoint. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
let (tx, rx): (Sender&amp;lt;int&amp;gt;, Receiver&amp;lt;int&amp;gt;) = channel();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    let result = some_expensive_computation();&lt;br /&gt;
    tx.send(result);&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
some_other_expensive_computation();&lt;br /&gt;
let result = rx.recv();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Data Design ==&lt;br /&gt;
&lt;br /&gt;
===  Data Description ===&lt;br /&gt;
&lt;br /&gt;
''The following are the data structures that will be used.''&lt;br /&gt;
&lt;br /&gt;
'''Storage''' | TreeMap&amp;lt;String,String&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''UrlMap''' | TreeMap&amp;lt;String,TreeMap&amp;lt;String,String&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design Pattern ==&lt;br /&gt;
&lt;br /&gt;
We will be using &amp;quot;Delegation Pattern&amp;quot; in our project. The Storage interface is used by web applications to access the web storage provided by the browser. However, the actual data is stored somewhere else(Servo Memory Space). So, it makes sense to create another class which will maintain the actual stored data. The Storage class can then delegate the task of storing/retrieving data to this class. We will create a class &amp;quot;WebStorageTask&amp;quot; for this purpose.&lt;br /&gt;
&lt;br /&gt;
== UML Diagrams ==&lt;br /&gt;
             &lt;br /&gt;
[[File:Flow_Chart_Storage.png|left]] &lt;br /&gt;
[[File:Use_Case_Storage.jpg|right]]&lt;br /&gt;
&lt;br /&gt;
'''Steps:'''&lt;br /&gt;
&lt;br /&gt;
1. First, we need to build rust and servo. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. Generate the corresponding WebIDL bindings - Storage.webidl &amp;lt;br/&amp;gt;&lt;br /&gt;
3. Define Storage.rs which has the actual code for creating the storage object. &amp;lt;br/&amp;gt;&lt;br /&gt;
4. Call the receiver via a channel- this is actually used for creating an instance for each unique URL. &amp;lt;br/&amp;gt;&lt;br /&gt;
5. Build the servo again. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Use Case Functionality'''&lt;br /&gt;
&lt;br /&gt;
Here the user can&lt;br /&gt;
&lt;br /&gt;
== Proposed Test Cases ==&lt;br /&gt;
&lt;br /&gt;
Some of the test cases which will be used to validate our changes are as follows:&lt;br /&gt;
&lt;br /&gt;
* Allow a web page to clear its session storage&lt;br /&gt;
* Allow a web page to store an item in its session storage&lt;br /&gt;
* Allow a web page to retrieve stored items from its session storage&lt;br /&gt;
* Do not allow a web page to retrieve stored items from the session storage of a web page in another domain&lt;br /&gt;
* Check the number of items stored in session storage&lt;br /&gt;
* On removing an item from storage, it should be inaccessible&lt;br /&gt;
* Should return null as value for a key not present in the session storage&lt;br /&gt;
* Should give an error on exceeding the space limit of session storage&lt;br /&gt;
&lt;br /&gt;
The complete list of test cases can be found [http://github.com/servo/web-platform-tests/tree/servo/webstorage here].&lt;br /&gt;
&lt;br /&gt;
== Further Readings ==&lt;br /&gt;
&lt;br /&gt;
Learning Rust by Examples: http://rustbyexample.com/ &amp;lt;br/&amp;gt;&lt;br /&gt;
Javascript as Servo's Garbage Collector: http://blog.mozilla.org/research/2014/08/26/javascript-servos-only-garbage-collector/  &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vankam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=92128</id>
		<title>CSC/ECE 517 Fall 2014/final design doc M1450 navr</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=92128"/>
		<updated>2014-11-18T03:02:08Z</updated>

		<summary type="html">&lt;p&gt;Vankam: /* UML Diagrams */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Implement Window.sessionStorage ==&lt;br /&gt;
&lt;br /&gt;
This is the design document for the task &amp;lt;code&amp;gt;[http://github.com/servo/servo/wiki/Storage-student-project Implement Window.sessionStorage]&amp;lt;/code&amp;gt; for the [http://www.mozilla.org/ Mozilla] research project [http://github.com/servo/servo/wiki/Design Servo].&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== [http://www.rust-lang.org/ Rust]===&lt;br /&gt;
&lt;br /&gt;
Rust is a modern systems programming language focusing on safety and speed to build reliable and efficient systems &amp;lt;ref&amp;gt; http://doc.rust-lang.org/nightly/intro.html &amp;lt;/ref&amp;gt;. It accomplishes the goals of memory safe without using garbage collection and it supports concurrency and parallelism in building platforms. &lt;br /&gt;
&lt;br /&gt;
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. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [http://github.com/servo/servo/wiki/Design Servo] ===&lt;br /&gt;
&lt;br /&gt;
Mozilla Research team is currently working on an experimental project to develop a new Web browser engine &amp;quot;Servo&amp;quot;, 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.&amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The main objectives of this experimentation project is improving the layout to graphics rendering - to optimize for power efficiency and maximize parallelism. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
&lt;br /&gt;
=== [http://html.spec.whatwg.org/multipage/webstorage.html#webstorage Web Storage] ===&lt;br /&gt;
The web storage specification defines the means by which a web application can store string key/value pairs in a browser and later retrieve them for use.&amp;lt;ref&amp;gt;https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Storage&amp;lt;/ref&amp;gt; It supports persistent data storage, similar to [http://en.wikipedia.org/wiki/HTTP_cookie cookies] but with a greatly enhanced capacity and no information stored in the [http://en.wikipedia.org/wiki/List_of_HTTP_headers HTTP request header].&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Web_storage&amp;lt;/ref&amp;gt; There are two types of web storage: [http://html.spec.whatwg.org/multipage/webstorage.html#dom-localstorage local storage] and [http://html.spec.whatwg.org/multipage/webstorage.html#dom-sessionstorage session storage].&lt;br /&gt;
&lt;br /&gt;
Browsers that support web storage have the global variables 'sessionStorage' and 'localStorage' declared at the [http://developer.mozilla.org/en-US/docs/Web/API/Window?redirectlocale=en-US&amp;amp;redirectslug=DOM%2Fwindow window] level. The following JavaScript code gives an example of how to use web storage:&lt;br /&gt;
&lt;br /&gt;
'''sessionStorage'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Store value on browser for duration of the session&lt;br /&gt;
sessionStorage.setItem('key', 'value');&lt;br /&gt;
 &lt;br /&gt;
// Retrieve value (gets deleted when browser is closed and re-opened)&lt;br /&gt;
alert(sessionStorage.getItem('key'));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''localStorage'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Store value on the browser beyond the duration of the session&lt;br /&gt;
localStorage.setItem('key', 'value');&lt;br /&gt;
 &lt;br /&gt;
// Retrieve value (persists even after closing and re-opening the browser)&lt;br /&gt;
alert(localStorage.getItem('key'));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
&lt;br /&gt;
As part of our [http://github.com/servo/servo/wiki/Storage-student-project project], we have to implement the web storage specification in the Servo browser. 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. &amp;lt;ref&amp;gt; https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Requirement Analysis &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
In order to introduce the support for session storage and local storage in the Servo Broswer, we have to create the Storage structure and allow web pages to store data in the Servo memory space.&lt;br /&gt;
&lt;br /&gt;
Below is a high level overview of the various steps that have been planned for this project:&lt;br /&gt;
&lt;br /&gt;
* Create the Storage interface and its stub implementation.&lt;br /&gt;
* Create the WindowSessionStorage interface making it return a Storage instance.&lt;br /&gt;
* Create a Storage Task which will be used to contain all stored data.&lt;br /&gt;
* Define a message-passing interface for reading and writing stored data for a particular browser tab.&lt;br /&gt;
* Use the Storage task in the implementation of Storage.&lt;br /&gt;
* When the value of a stored data is changed, notify its respective browser tab.&lt;br /&gt;
* Pass as many [http://github.com/servo/web-platform-tests/tree/servo/webstorage tests] as possible.&lt;br /&gt;
* Implement the WindowLocalStorage interface which behaves slightly different from the WindowSessionStorage interface.&lt;br /&gt;
&lt;br /&gt;
== Architecture &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Design&amp;lt;/ref&amp;gt;==&lt;br /&gt;
&lt;br /&gt;
[[File:task.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Architecture Explained ===&lt;br /&gt;
*Each box represents a Rust task.&lt;br /&gt;
*Blue boxes represent the primary tasks in the browser pipeline.&lt;br /&gt;
*Gray boxes represent tasks auxiliary to the browser pipeline.&lt;br /&gt;
*White boxes represent worker tasks. Each such box represents several tasks, the precise number of which will vary with the workload.&lt;br /&gt;
*Dashed lines indicate supervisor relationships.&lt;br /&gt;
*Solid lines indicate communication channels.&lt;br /&gt;
&lt;br /&gt;
== Component Design ==&lt;br /&gt;
[[File:servo.jpg]]&lt;br /&gt;
&lt;br /&gt;
There will be 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.&lt;br /&gt;
&lt;br /&gt;
=== Task &amp;lt;ref&amp;gt;http://doc.rust-lang.org/guide-tasks.html&amp;lt;/ref&amp;gt;===&lt;br /&gt;
Rust provides safe concurrent abstractions through a number of core library primitives. This guide will describe the concurrency model in Rust, how it relates to the Rust type system, and introduce the fundamental library abstractions for constructing concurrent programs.&lt;br /&gt;
&lt;br /&gt;
Tasks provide failure isolation and recovery. When a fatal error occurs in Rust code as a result of an explicit call to panic!(), an assertion failure, or another invalid operation, the runtime system destroys the entire task. Unlike in languages such as Java and C++, there is no way to catch an exception. Instead, tasks may monitor each other to see if they panic.&lt;br /&gt;
&lt;br /&gt;
Tasks use Rust's type system to provide strong memory safety guarantees. In particular, the type system guarantees that tasks cannot induce a data race from shared mutable state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Generate some state locally&lt;br /&gt;
let child_task_number = generate_task_number();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    // Capture it in the remote task&lt;br /&gt;
    println!(&amp;quot;I am child number {}&amp;quot;, child_task_number);&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Channel &amp;lt;ref&amp;gt;http://doc.rust-lang.org/guide-tasks.html&amp;lt;/ref&amp;gt;===&lt;br /&gt;
Now that we have spawned a new task, it would be nice if we could communicate with it. For this, we use channels. A channel is simply a pair of endpoints: one for sending messages and another for receiving messages.&lt;br /&gt;
&lt;br /&gt;
The simplest way to create a channel is to use the channel function to create a (Sender, Receiver) pair. In Rust parlance, a sender is a sending endpoint of a channel, and a receiver is the receiving endpoint. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
let (tx, rx): (Sender&amp;lt;int&amp;gt;, Receiver&amp;lt;int&amp;gt;) = channel();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    let result = some_expensive_computation();&lt;br /&gt;
    tx.send(result);&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
some_other_expensive_computation();&lt;br /&gt;
let result = rx.recv();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Data Design ==&lt;br /&gt;
&lt;br /&gt;
===  Data Description ===&lt;br /&gt;
&lt;br /&gt;
''The following are the data structures that will be used.''&lt;br /&gt;
&lt;br /&gt;
'''Storage''' | TreeMap&amp;lt;String,String&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''UrlMap''' | TreeMap&amp;lt;String,TreeMap&amp;lt;String,String&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design Pattern ==&lt;br /&gt;
&lt;br /&gt;
We will be using &amp;quot;Delegation Pattern&amp;quot; in our project. The Storage interface is used by web applications to access the web storage provided by the browser. However, the actual data is stored somewhere else(Servo Memory Space). So, it makes sense to create another class which will maintain the actual stored data. The Storage class can then delegate the task of storing/retrieving data to this class. We will create a class &amp;quot;WebStorageTask&amp;quot; for this purpose.&lt;br /&gt;
&lt;br /&gt;
== UML Diagrams ==&lt;br /&gt;
             &lt;br /&gt;
[[File:Flow_Chart_Storage.png|left]] &lt;br /&gt;
[[File:Use_Case_Storage.jpg|right]]&lt;br /&gt;
&lt;br /&gt;
'''Steps:'''&lt;br /&gt;
&lt;br /&gt;
1. First, we need to build rust and servo. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. Generate the corresponding WebIDL bindings - Storage.webidl &amp;lt;br/&amp;gt;&lt;br /&gt;
3. Define Storage.rs which has the actual code for creating the storage object. &amp;lt;br/&amp;gt;&lt;br /&gt;
4. Call the receiver via a channel- this is actually used for creating an instance for each unique URL. &amp;lt;br/&amp;gt;&lt;br /&gt;
5. Build the servo again. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here the user can&lt;br /&gt;
&lt;br /&gt;
== Proposed Test Cases ==&lt;br /&gt;
&lt;br /&gt;
Some of the test cases which will be used to validate our changes are as follows:&lt;br /&gt;
&lt;br /&gt;
* Allow a web page to clear its session storage&lt;br /&gt;
* Allow a web page to store an item in its session storage&lt;br /&gt;
* Allow a web page to retrieve stored items from its session storage&lt;br /&gt;
* Do not allow a web page to retrieve stored items from the session storage of a web page in another domain&lt;br /&gt;
* Check the number of items stored in session storage&lt;br /&gt;
* On removing an item from storage, it should be inaccessible&lt;br /&gt;
* Should return null as value for a key not present in the session storage&lt;br /&gt;
* Should give an error on exceeding the space limit of session storage&lt;br /&gt;
&lt;br /&gt;
The complete list of test cases can be found [http://github.com/servo/web-platform-tests/tree/servo/webstorage here].&lt;br /&gt;
&lt;br /&gt;
== Further Readings ==&lt;br /&gt;
&lt;br /&gt;
Learning Rust by Examples: http://rustbyexample.com/ &amp;lt;br/&amp;gt;&lt;br /&gt;
Javascript as Servo's Garbage Collector: http://blog.mozilla.org/research/2014/08/26/javascript-servos-only-garbage-collector/  &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vankam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=92127</id>
		<title>CSC/ECE 517 Fall 2014/final design doc M1450 navr</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=92127"/>
		<updated>2014-11-18T03:01:44Z</updated>

		<summary type="html">&lt;p&gt;Vankam: /* UML Diagrams */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Implement Window.sessionStorage ==&lt;br /&gt;
&lt;br /&gt;
This is the design document for the task &amp;lt;code&amp;gt;[http://github.com/servo/servo/wiki/Storage-student-project Implement Window.sessionStorage]&amp;lt;/code&amp;gt; for the [http://www.mozilla.org/ Mozilla] research project [http://github.com/servo/servo/wiki/Design Servo].&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== [http://www.rust-lang.org/ Rust]===&lt;br /&gt;
&lt;br /&gt;
Rust is a modern systems programming language focusing on safety and speed to build reliable and efficient systems &amp;lt;ref&amp;gt; http://doc.rust-lang.org/nightly/intro.html &amp;lt;/ref&amp;gt;. It accomplishes the goals of memory safe without using garbage collection and it supports concurrency and parallelism in building platforms. &lt;br /&gt;
&lt;br /&gt;
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. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [http://github.com/servo/servo/wiki/Design Servo] ===&lt;br /&gt;
&lt;br /&gt;
Mozilla Research team is currently working on an experimental project to develop a new Web browser engine &amp;quot;Servo&amp;quot;, 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.&amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The main objectives of this experimentation project is improving the layout to graphics rendering - to optimize for power efficiency and maximize parallelism. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
&lt;br /&gt;
=== [http://html.spec.whatwg.org/multipage/webstorage.html#webstorage Web Storage] ===&lt;br /&gt;
The web storage specification defines the means by which a web application can store string key/value pairs in a browser and later retrieve them for use.&amp;lt;ref&amp;gt;https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Storage&amp;lt;/ref&amp;gt; It supports persistent data storage, similar to [http://en.wikipedia.org/wiki/HTTP_cookie cookies] but with a greatly enhanced capacity and no information stored in the [http://en.wikipedia.org/wiki/List_of_HTTP_headers HTTP request header].&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Web_storage&amp;lt;/ref&amp;gt; There are two types of web storage: [http://html.spec.whatwg.org/multipage/webstorage.html#dom-localstorage local storage] and [http://html.spec.whatwg.org/multipage/webstorage.html#dom-sessionstorage session storage].&lt;br /&gt;
&lt;br /&gt;
Browsers that support web storage have the global variables 'sessionStorage' and 'localStorage' declared at the [http://developer.mozilla.org/en-US/docs/Web/API/Window?redirectlocale=en-US&amp;amp;redirectslug=DOM%2Fwindow window] level. The following JavaScript code gives an example of how to use web storage:&lt;br /&gt;
&lt;br /&gt;
'''sessionStorage'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Store value on browser for duration of the session&lt;br /&gt;
sessionStorage.setItem('key', 'value');&lt;br /&gt;
 &lt;br /&gt;
// Retrieve value (gets deleted when browser is closed and re-opened)&lt;br /&gt;
alert(sessionStorage.getItem('key'));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''localStorage'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Store value on the browser beyond the duration of the session&lt;br /&gt;
localStorage.setItem('key', 'value');&lt;br /&gt;
 &lt;br /&gt;
// Retrieve value (persists even after closing and re-opening the browser)&lt;br /&gt;
alert(localStorage.getItem('key'));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
&lt;br /&gt;
As part of our [http://github.com/servo/servo/wiki/Storage-student-project project], we have to implement the web storage specification in the Servo browser. 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. &amp;lt;ref&amp;gt; https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Requirement Analysis &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
In order to introduce the support for session storage and local storage in the Servo Broswer, we have to create the Storage structure and allow web pages to store data in the Servo memory space.&lt;br /&gt;
&lt;br /&gt;
Below is a high level overview of the various steps that have been planned for this project:&lt;br /&gt;
&lt;br /&gt;
* Create the Storage interface and its stub implementation.&lt;br /&gt;
* Create the WindowSessionStorage interface making it return a Storage instance.&lt;br /&gt;
* Create a Storage Task which will be used to contain all stored data.&lt;br /&gt;
* Define a message-passing interface for reading and writing stored data for a particular browser tab.&lt;br /&gt;
* Use the Storage task in the implementation of Storage.&lt;br /&gt;
* When the value of a stored data is changed, notify its respective browser tab.&lt;br /&gt;
* Pass as many [http://github.com/servo/web-platform-tests/tree/servo/webstorage tests] as possible.&lt;br /&gt;
* Implement the WindowLocalStorage interface which behaves slightly different from the WindowSessionStorage interface.&lt;br /&gt;
&lt;br /&gt;
== Architecture &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Design&amp;lt;/ref&amp;gt;==&lt;br /&gt;
&lt;br /&gt;
[[File:task.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Architecture Explained ===&lt;br /&gt;
*Each box represents a Rust task.&lt;br /&gt;
*Blue boxes represent the primary tasks in the browser pipeline.&lt;br /&gt;
*Gray boxes represent tasks auxiliary to the browser pipeline.&lt;br /&gt;
*White boxes represent worker tasks. Each such box represents several tasks, the precise number of which will vary with the workload.&lt;br /&gt;
*Dashed lines indicate supervisor relationships.&lt;br /&gt;
*Solid lines indicate communication channels.&lt;br /&gt;
&lt;br /&gt;
== Component Design ==&lt;br /&gt;
[[File:servo.jpg]]&lt;br /&gt;
&lt;br /&gt;
There will be 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.&lt;br /&gt;
&lt;br /&gt;
=== Task &amp;lt;ref&amp;gt;http://doc.rust-lang.org/guide-tasks.html&amp;lt;/ref&amp;gt;===&lt;br /&gt;
Rust provides safe concurrent abstractions through a number of core library primitives. This guide will describe the concurrency model in Rust, how it relates to the Rust type system, and introduce the fundamental library abstractions for constructing concurrent programs.&lt;br /&gt;
&lt;br /&gt;
Tasks provide failure isolation and recovery. When a fatal error occurs in Rust code as a result of an explicit call to panic!(), an assertion failure, or another invalid operation, the runtime system destroys the entire task. Unlike in languages such as Java and C++, there is no way to catch an exception. Instead, tasks may monitor each other to see if they panic.&lt;br /&gt;
&lt;br /&gt;
Tasks use Rust's type system to provide strong memory safety guarantees. In particular, the type system guarantees that tasks cannot induce a data race from shared mutable state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Generate some state locally&lt;br /&gt;
let child_task_number = generate_task_number();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    // Capture it in the remote task&lt;br /&gt;
    println!(&amp;quot;I am child number {}&amp;quot;, child_task_number);&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Channel &amp;lt;ref&amp;gt;http://doc.rust-lang.org/guide-tasks.html&amp;lt;/ref&amp;gt;===&lt;br /&gt;
Now that we have spawned a new task, it would be nice if we could communicate with it. For this, we use channels. A channel is simply a pair of endpoints: one for sending messages and another for receiving messages.&lt;br /&gt;
&lt;br /&gt;
The simplest way to create a channel is to use the channel function to create a (Sender, Receiver) pair. In Rust parlance, a sender is a sending endpoint of a channel, and a receiver is the receiving endpoint. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
let (tx, rx): (Sender&amp;lt;int&amp;gt;, Receiver&amp;lt;int&amp;gt;) = channel();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    let result = some_expensive_computation();&lt;br /&gt;
    tx.send(result);&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
some_other_expensive_computation();&lt;br /&gt;
let result = rx.recv();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Data Design ==&lt;br /&gt;
&lt;br /&gt;
===  Data Description ===&lt;br /&gt;
&lt;br /&gt;
''The following are the data structures that will be used.''&lt;br /&gt;
&lt;br /&gt;
'''Storage''' | TreeMap&amp;lt;String,String&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''UrlMap''' | TreeMap&amp;lt;String,TreeMap&amp;lt;String,String&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design Pattern ==&lt;br /&gt;
&lt;br /&gt;
We will be using &amp;quot;Delegation Pattern&amp;quot; in our project. The Storage interface is used by web applications to access the web storage provided by the browser. However, the actual data is stored somewhere else(Servo Memory Space). So, it makes sense to create another class which will maintain the actual stored data. The Storage class can then delegate the task of storing/retrieving data to this class. We will create a class &amp;quot;WebStorageTask&amp;quot; for this purpose.&lt;br /&gt;
&lt;br /&gt;
== UML Diagrams ==&lt;br /&gt;
             &lt;br /&gt;
[[File:Flow_Chart_Storage.png|left]] &lt;br /&gt;
&lt;br /&gt;
'''Steps:'''&lt;br /&gt;
&lt;br /&gt;
1. First, we need to build rust and servo. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. Generate the corresponding WebIDL bindings - Storage.webidl &amp;lt;br/&amp;gt;&lt;br /&gt;
3. Define Storage.rs which has the actual code for creating the storage object. &amp;lt;br/&amp;gt;&lt;br /&gt;
4. Call the receiver via a channel- this is actually used for creating an instance for each unique URL. &amp;lt;br/&amp;gt;&lt;br /&gt;
5. Build the servo again. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Use_Case_Storage.jpg|right]]&lt;br /&gt;
&lt;br /&gt;
Here the user can&lt;br /&gt;
&lt;br /&gt;
== Proposed Test Cases ==&lt;br /&gt;
&lt;br /&gt;
Some of the test cases which will be used to validate our changes are as follows:&lt;br /&gt;
&lt;br /&gt;
* Allow a web page to clear its session storage&lt;br /&gt;
* Allow a web page to store an item in its session storage&lt;br /&gt;
* Allow a web page to retrieve stored items from its session storage&lt;br /&gt;
* Do not allow a web page to retrieve stored items from the session storage of a web page in another domain&lt;br /&gt;
* Check the number of items stored in session storage&lt;br /&gt;
* On removing an item from storage, it should be inaccessible&lt;br /&gt;
* Should return null as value for a key not present in the session storage&lt;br /&gt;
* Should give an error on exceeding the space limit of session storage&lt;br /&gt;
&lt;br /&gt;
The complete list of test cases can be found [http://github.com/servo/web-platform-tests/tree/servo/webstorage here].&lt;br /&gt;
&lt;br /&gt;
== Further Readings ==&lt;br /&gt;
&lt;br /&gt;
Learning Rust by Examples: http://rustbyexample.com/ &amp;lt;br/&amp;gt;&lt;br /&gt;
Javascript as Servo's Garbage Collector: http://blog.mozilla.org/research/2014/08/26/javascript-servos-only-garbage-collector/  &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vankam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=92126</id>
		<title>CSC/ECE 517 Fall 2014/final design doc M1450 navr</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=92126"/>
		<updated>2014-11-18T03:01:18Z</updated>

		<summary type="html">&lt;p&gt;Vankam: /* UML Diagrams */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Implement Window.sessionStorage ==&lt;br /&gt;
&lt;br /&gt;
This is the design document for the task &amp;lt;code&amp;gt;[http://github.com/servo/servo/wiki/Storage-student-project Implement Window.sessionStorage]&amp;lt;/code&amp;gt; for the [http://www.mozilla.org/ Mozilla] research project [http://github.com/servo/servo/wiki/Design Servo].&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== [http://www.rust-lang.org/ Rust]===&lt;br /&gt;
&lt;br /&gt;
Rust is a modern systems programming language focusing on safety and speed to build reliable and efficient systems &amp;lt;ref&amp;gt; http://doc.rust-lang.org/nightly/intro.html &amp;lt;/ref&amp;gt;. It accomplishes the goals of memory safe without using garbage collection and it supports concurrency and parallelism in building platforms. &lt;br /&gt;
&lt;br /&gt;
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. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [http://github.com/servo/servo/wiki/Design Servo] ===&lt;br /&gt;
&lt;br /&gt;
Mozilla Research team is currently working on an experimental project to develop a new Web browser engine &amp;quot;Servo&amp;quot;, 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.&amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The main objectives of this experimentation project is improving the layout to graphics rendering - to optimize for power efficiency and maximize parallelism. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
&lt;br /&gt;
=== [http://html.spec.whatwg.org/multipage/webstorage.html#webstorage Web Storage] ===&lt;br /&gt;
The web storage specification defines the means by which a web application can store string key/value pairs in a browser and later retrieve them for use.&amp;lt;ref&amp;gt;https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Storage&amp;lt;/ref&amp;gt; It supports persistent data storage, similar to [http://en.wikipedia.org/wiki/HTTP_cookie cookies] but with a greatly enhanced capacity and no information stored in the [http://en.wikipedia.org/wiki/List_of_HTTP_headers HTTP request header].&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Web_storage&amp;lt;/ref&amp;gt; There are two types of web storage: [http://html.spec.whatwg.org/multipage/webstorage.html#dom-localstorage local storage] and [http://html.spec.whatwg.org/multipage/webstorage.html#dom-sessionstorage session storage].&lt;br /&gt;
&lt;br /&gt;
Browsers that support web storage have the global variables 'sessionStorage' and 'localStorage' declared at the [http://developer.mozilla.org/en-US/docs/Web/API/Window?redirectlocale=en-US&amp;amp;redirectslug=DOM%2Fwindow window] level. The following JavaScript code gives an example of how to use web storage:&lt;br /&gt;
&lt;br /&gt;
'''sessionStorage'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Store value on browser for duration of the session&lt;br /&gt;
sessionStorage.setItem('key', 'value');&lt;br /&gt;
 &lt;br /&gt;
// Retrieve value (gets deleted when browser is closed and re-opened)&lt;br /&gt;
alert(sessionStorage.getItem('key'));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''localStorage'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Store value on the browser beyond the duration of the session&lt;br /&gt;
localStorage.setItem('key', 'value');&lt;br /&gt;
 &lt;br /&gt;
// Retrieve value (persists even after closing and re-opening the browser)&lt;br /&gt;
alert(localStorage.getItem('key'));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
&lt;br /&gt;
As part of our [http://github.com/servo/servo/wiki/Storage-student-project project], we have to implement the web storage specification in the Servo browser. 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. &amp;lt;ref&amp;gt; https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Requirement Analysis &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
In order to introduce the support for session storage and local storage in the Servo Broswer, we have to create the Storage structure and allow web pages to store data in the Servo memory space.&lt;br /&gt;
&lt;br /&gt;
Below is a high level overview of the various steps that have been planned for this project:&lt;br /&gt;
&lt;br /&gt;
* Create the Storage interface and its stub implementation.&lt;br /&gt;
* Create the WindowSessionStorage interface making it return a Storage instance.&lt;br /&gt;
* Create a Storage Task which will be used to contain all stored data.&lt;br /&gt;
* Define a message-passing interface for reading and writing stored data for a particular browser tab.&lt;br /&gt;
* Use the Storage task in the implementation of Storage.&lt;br /&gt;
* When the value of a stored data is changed, notify its respective browser tab.&lt;br /&gt;
* Pass as many [http://github.com/servo/web-platform-tests/tree/servo/webstorage tests] as possible.&lt;br /&gt;
* Implement the WindowLocalStorage interface which behaves slightly different from the WindowSessionStorage interface.&lt;br /&gt;
&lt;br /&gt;
== Architecture &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Design&amp;lt;/ref&amp;gt;==&lt;br /&gt;
&lt;br /&gt;
[[File:task.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Architecture Explained ===&lt;br /&gt;
*Each box represents a Rust task.&lt;br /&gt;
*Blue boxes represent the primary tasks in the browser pipeline.&lt;br /&gt;
*Gray boxes represent tasks auxiliary to the browser pipeline.&lt;br /&gt;
*White boxes represent worker tasks. Each such box represents several tasks, the precise number of which will vary with the workload.&lt;br /&gt;
*Dashed lines indicate supervisor relationships.&lt;br /&gt;
*Solid lines indicate communication channels.&lt;br /&gt;
&lt;br /&gt;
== Component Design ==&lt;br /&gt;
[[File:servo.jpg]]&lt;br /&gt;
&lt;br /&gt;
There will be 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.&lt;br /&gt;
&lt;br /&gt;
=== Task &amp;lt;ref&amp;gt;http://doc.rust-lang.org/guide-tasks.html&amp;lt;/ref&amp;gt;===&lt;br /&gt;
Rust provides safe concurrent abstractions through a number of core library primitives. This guide will describe the concurrency model in Rust, how it relates to the Rust type system, and introduce the fundamental library abstractions for constructing concurrent programs.&lt;br /&gt;
&lt;br /&gt;
Tasks provide failure isolation and recovery. When a fatal error occurs in Rust code as a result of an explicit call to panic!(), an assertion failure, or another invalid operation, the runtime system destroys the entire task. Unlike in languages such as Java and C++, there is no way to catch an exception. Instead, tasks may monitor each other to see if they panic.&lt;br /&gt;
&lt;br /&gt;
Tasks use Rust's type system to provide strong memory safety guarantees. In particular, the type system guarantees that tasks cannot induce a data race from shared mutable state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Generate some state locally&lt;br /&gt;
let child_task_number = generate_task_number();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    // Capture it in the remote task&lt;br /&gt;
    println!(&amp;quot;I am child number {}&amp;quot;, child_task_number);&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Channel &amp;lt;ref&amp;gt;http://doc.rust-lang.org/guide-tasks.html&amp;lt;/ref&amp;gt;===&lt;br /&gt;
Now that we have spawned a new task, it would be nice if we could communicate with it. For this, we use channels. A channel is simply a pair of endpoints: one for sending messages and another for receiving messages.&lt;br /&gt;
&lt;br /&gt;
The simplest way to create a channel is to use the channel function to create a (Sender, Receiver) pair. In Rust parlance, a sender is a sending endpoint of a channel, and a receiver is the receiving endpoint. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
let (tx, rx): (Sender&amp;lt;int&amp;gt;, Receiver&amp;lt;int&amp;gt;) = channel();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    let result = some_expensive_computation();&lt;br /&gt;
    tx.send(result);&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
some_other_expensive_computation();&lt;br /&gt;
let result = rx.recv();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Data Design ==&lt;br /&gt;
&lt;br /&gt;
===  Data Description ===&lt;br /&gt;
&lt;br /&gt;
''The following are the data structures that will be used.''&lt;br /&gt;
&lt;br /&gt;
'''Storage''' | TreeMap&amp;lt;String,String&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''UrlMap''' | TreeMap&amp;lt;String,TreeMap&amp;lt;String,String&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design Pattern ==&lt;br /&gt;
&lt;br /&gt;
We will be using &amp;quot;Delegation Pattern&amp;quot; in our project. The Storage interface is used by web applications to access the web storage provided by the browser. However, the actual data is stored somewhere else(Servo Memory Space). So, it makes sense to create another class which will maintain the actual stored data. The Storage class can then delegate the task of storing/retrieving data to this class. We will create a class &amp;quot;WebStorageTask&amp;quot; for this purpose.&lt;br /&gt;
&lt;br /&gt;
== UML Diagrams ==&lt;br /&gt;
             &lt;br /&gt;
[[File:Flow_Chart_Storage.png|left]] &lt;br /&gt;
&lt;br /&gt;
'''Steps:'''&lt;br /&gt;
&lt;br /&gt;
1. First, we need to build rust and servo. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. Generate the corresponding WebIDL bindings - Storage.webidl &amp;lt;br/&amp;gt;&lt;br /&gt;
3. Define Storage.rs which has the actual code for creating the storage object. &amp;lt;br/&amp;gt;&lt;br /&gt;
4. Call the receiver via a channel- this is actually used for creating an instance for each unique URL. &amp;lt;br/&amp;gt;&lt;br /&gt;
5. Build the servo again. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Use_Case_Storage.jpg|right]]&lt;br /&gt;
&lt;br /&gt;
Here the user can&lt;br /&gt;
&lt;br /&gt;
== Proposed Test Cases ==&lt;br /&gt;
&lt;br /&gt;
Some of the test cases which will be used to validate our changes are as follows:&lt;br /&gt;
&lt;br /&gt;
* Allow a web page to clear its session storage&lt;br /&gt;
* Allow a web page to store an item in its session storage&lt;br /&gt;
* Allow a web page to retrieve stored items from its session storage&lt;br /&gt;
* Do not allow a web page to retrieve stored items from the session storage of a web page in another domain&lt;br /&gt;
* Check the number of items stored in session storage&lt;br /&gt;
* On removing an item from storage, it should be inaccessible&lt;br /&gt;
* Should return null as value for a key not present in the session storage&lt;br /&gt;
* Should give an error on exceeding the space limit of session storage&lt;br /&gt;
&lt;br /&gt;
The complete list of test cases can be found [http://github.com/servo/web-platform-tests/tree/servo/webstorage here].&lt;br /&gt;
&lt;br /&gt;
== Further Readings ==&lt;br /&gt;
&lt;br /&gt;
Learning Rust by Examples: http://rustbyexample.com/ &amp;lt;br/&amp;gt;&lt;br /&gt;
Javascript as Servo's Garbage Collector: http://blog.mozilla.org/research/2014/08/26/javascript-servos-only-garbage-collector/  &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vankam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=92125</id>
		<title>CSC/ECE 517 Fall 2014/final design doc M1450 navr</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=92125"/>
		<updated>2014-11-18T03:00:22Z</updated>

		<summary type="html">&lt;p&gt;Vankam: /* UML Diagrams */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Implement Window.sessionStorage ==&lt;br /&gt;
&lt;br /&gt;
This is the design document for the task &amp;lt;code&amp;gt;[http://github.com/servo/servo/wiki/Storage-student-project Implement Window.sessionStorage]&amp;lt;/code&amp;gt; for the [http://www.mozilla.org/ Mozilla] research project [http://github.com/servo/servo/wiki/Design Servo].&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== [http://www.rust-lang.org/ Rust]===&lt;br /&gt;
&lt;br /&gt;
Rust is a modern systems programming language focusing on safety and speed to build reliable and efficient systems &amp;lt;ref&amp;gt; http://doc.rust-lang.org/nightly/intro.html &amp;lt;/ref&amp;gt;. It accomplishes the goals of memory safe without using garbage collection and it supports concurrency and parallelism in building platforms. &lt;br /&gt;
&lt;br /&gt;
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. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [http://github.com/servo/servo/wiki/Design Servo] ===&lt;br /&gt;
&lt;br /&gt;
Mozilla Research team is currently working on an experimental project to develop a new Web browser engine &amp;quot;Servo&amp;quot;, 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.&amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The main objectives of this experimentation project is improving the layout to graphics rendering - to optimize for power efficiency and maximize parallelism. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
&lt;br /&gt;
=== [http://html.spec.whatwg.org/multipage/webstorage.html#webstorage Web Storage] ===&lt;br /&gt;
The web storage specification defines the means by which a web application can store string key/value pairs in a browser and later retrieve them for use.&amp;lt;ref&amp;gt;https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Storage&amp;lt;/ref&amp;gt; It supports persistent data storage, similar to [http://en.wikipedia.org/wiki/HTTP_cookie cookies] but with a greatly enhanced capacity and no information stored in the [http://en.wikipedia.org/wiki/List_of_HTTP_headers HTTP request header].&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Web_storage&amp;lt;/ref&amp;gt; There are two types of web storage: [http://html.spec.whatwg.org/multipage/webstorage.html#dom-localstorage local storage] and [http://html.spec.whatwg.org/multipage/webstorage.html#dom-sessionstorage session storage].&lt;br /&gt;
&lt;br /&gt;
Browsers that support web storage have the global variables 'sessionStorage' and 'localStorage' declared at the [http://developer.mozilla.org/en-US/docs/Web/API/Window?redirectlocale=en-US&amp;amp;redirectslug=DOM%2Fwindow window] level. The following JavaScript code gives an example of how to use web storage:&lt;br /&gt;
&lt;br /&gt;
'''sessionStorage'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Store value on browser for duration of the session&lt;br /&gt;
sessionStorage.setItem('key', 'value');&lt;br /&gt;
 &lt;br /&gt;
// Retrieve value (gets deleted when browser is closed and re-opened)&lt;br /&gt;
alert(sessionStorage.getItem('key'));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''localStorage'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Store value on the browser beyond the duration of the session&lt;br /&gt;
localStorage.setItem('key', 'value');&lt;br /&gt;
 &lt;br /&gt;
// Retrieve value (persists even after closing and re-opening the browser)&lt;br /&gt;
alert(localStorage.getItem('key'));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
&lt;br /&gt;
As part of our [http://github.com/servo/servo/wiki/Storage-student-project project], we have to implement the web storage specification in the Servo browser. 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. &amp;lt;ref&amp;gt; https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Requirement Analysis &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
In order to introduce the support for session storage and local storage in the Servo Broswer, we have to create the Storage structure and allow web pages to store data in the Servo memory space.&lt;br /&gt;
&lt;br /&gt;
Below is a high level overview of the various steps that have been planned for this project:&lt;br /&gt;
&lt;br /&gt;
* Create the Storage interface and its stub implementation.&lt;br /&gt;
* Create the WindowSessionStorage interface making it return a Storage instance.&lt;br /&gt;
* Create a Storage Task which will be used to contain all stored data.&lt;br /&gt;
* Define a message-passing interface for reading and writing stored data for a particular browser tab.&lt;br /&gt;
* Use the Storage task in the implementation of Storage.&lt;br /&gt;
* When the value of a stored data is changed, notify its respective browser tab.&lt;br /&gt;
* Pass as many [http://github.com/servo/web-platform-tests/tree/servo/webstorage tests] as possible.&lt;br /&gt;
* Implement the WindowLocalStorage interface which behaves slightly different from the WindowSessionStorage interface.&lt;br /&gt;
&lt;br /&gt;
== Architecture &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Design&amp;lt;/ref&amp;gt;==&lt;br /&gt;
&lt;br /&gt;
[[File:task.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Architecture Explained ===&lt;br /&gt;
*Each box represents a Rust task.&lt;br /&gt;
*Blue boxes represent the primary tasks in the browser pipeline.&lt;br /&gt;
*Gray boxes represent tasks auxiliary to the browser pipeline.&lt;br /&gt;
*White boxes represent worker tasks. Each such box represents several tasks, the precise number of which will vary with the workload.&lt;br /&gt;
*Dashed lines indicate supervisor relationships.&lt;br /&gt;
*Solid lines indicate communication channels.&lt;br /&gt;
&lt;br /&gt;
== Component Design ==&lt;br /&gt;
[[File:servo.jpg]]&lt;br /&gt;
&lt;br /&gt;
There will be 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.&lt;br /&gt;
&lt;br /&gt;
=== Task &amp;lt;ref&amp;gt;http://doc.rust-lang.org/guide-tasks.html&amp;lt;/ref&amp;gt;===&lt;br /&gt;
Rust provides safe concurrent abstractions through a number of core library primitives. This guide will describe the concurrency model in Rust, how it relates to the Rust type system, and introduce the fundamental library abstractions for constructing concurrent programs.&lt;br /&gt;
&lt;br /&gt;
Tasks provide failure isolation and recovery. When a fatal error occurs in Rust code as a result of an explicit call to panic!(), an assertion failure, or another invalid operation, the runtime system destroys the entire task. Unlike in languages such as Java and C++, there is no way to catch an exception. Instead, tasks may monitor each other to see if they panic.&lt;br /&gt;
&lt;br /&gt;
Tasks use Rust's type system to provide strong memory safety guarantees. In particular, the type system guarantees that tasks cannot induce a data race from shared mutable state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Generate some state locally&lt;br /&gt;
let child_task_number = generate_task_number();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    // Capture it in the remote task&lt;br /&gt;
    println!(&amp;quot;I am child number {}&amp;quot;, child_task_number);&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Channel &amp;lt;ref&amp;gt;http://doc.rust-lang.org/guide-tasks.html&amp;lt;/ref&amp;gt;===&lt;br /&gt;
Now that we have spawned a new task, it would be nice if we could communicate with it. For this, we use channels. A channel is simply a pair of endpoints: one for sending messages and another for receiving messages.&lt;br /&gt;
&lt;br /&gt;
The simplest way to create a channel is to use the channel function to create a (Sender, Receiver) pair. In Rust parlance, a sender is a sending endpoint of a channel, and a receiver is the receiving endpoint. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
let (tx, rx): (Sender&amp;lt;int&amp;gt;, Receiver&amp;lt;int&amp;gt;) = channel();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    let result = some_expensive_computation();&lt;br /&gt;
    tx.send(result);&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
some_other_expensive_computation();&lt;br /&gt;
let result = rx.recv();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Data Design ==&lt;br /&gt;
&lt;br /&gt;
===  Data Description ===&lt;br /&gt;
&lt;br /&gt;
''The following are the data structures that will be used.''&lt;br /&gt;
&lt;br /&gt;
'''Storage''' | TreeMap&amp;lt;String,String&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''UrlMap''' | TreeMap&amp;lt;String,TreeMap&amp;lt;String,String&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design Pattern ==&lt;br /&gt;
&lt;br /&gt;
We will be using &amp;quot;Delegation Pattern&amp;quot; in our project. The Storage interface is used by web applications to access the web storage provided by the browser. However, the actual data is stored somewhere else(Servo Memory Space). So, it makes sense to create another class which will maintain the actual stored data. The Storage class can then delegate the task of storing/retrieving data to this class. We will create a class &amp;quot;WebStorageTask&amp;quot; for this purpose.&lt;br /&gt;
&lt;br /&gt;
== UML Diagrams ==&lt;br /&gt;
             &lt;br /&gt;
[[File:Flow_Chart_Storage.png|left]] &lt;br /&gt;
&lt;br /&gt;
Steps:&lt;br /&gt;
&lt;br /&gt;
1. First, we need to build rust and servo. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. Generate the corresponding WebIDL bindings - Storage.webidl &amp;lt;br/&amp;gt;&lt;br /&gt;
3. Define Storage.rs which has the actual code for creating the storage object. &amp;lt;br/&amp;gt;&lt;br /&gt;
4. Call the receiver via a channel- this is actually used for creating an instance for each unique URL. &amp;lt;br/&amp;gt;&lt;br /&gt;
5. Build the servo again. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Use_Case_Storage.jpg]]&lt;br /&gt;
&lt;br /&gt;
Here the user can&lt;br /&gt;
&lt;br /&gt;
== Proposed Test Cases ==&lt;br /&gt;
&lt;br /&gt;
Some of the test cases which will be used to validate our changes are as follows:&lt;br /&gt;
&lt;br /&gt;
* Allow a web page to clear its session storage&lt;br /&gt;
* Allow a web page to store an item in its session storage&lt;br /&gt;
* Allow a web page to retrieve stored items from its session storage&lt;br /&gt;
* Do not allow a web page to retrieve stored items from the session storage of a web page in another domain&lt;br /&gt;
* Check the number of items stored in session storage&lt;br /&gt;
* On removing an item from storage, it should be inaccessible&lt;br /&gt;
* Should return null as value for a key not present in the session storage&lt;br /&gt;
* Should give an error on exceeding the space limit of session storage&lt;br /&gt;
&lt;br /&gt;
The complete list of test cases can be found [http://github.com/servo/web-platform-tests/tree/servo/webstorage here].&lt;br /&gt;
&lt;br /&gt;
== Further Readings ==&lt;br /&gt;
&lt;br /&gt;
Learning Rust by Examples: http://rustbyexample.com/ &amp;lt;br/&amp;gt;&lt;br /&gt;
Javascript as Servo's Garbage Collector: http://blog.mozilla.org/research/2014/08/26/javascript-servos-only-garbage-collector/  &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vankam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=92124</id>
		<title>CSC/ECE 517 Fall 2014/final design doc M1450 navr</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=92124"/>
		<updated>2014-11-18T02:57:47Z</updated>

		<summary type="html">&lt;p&gt;Vankam: /* UML Diagrams */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Implement Window.sessionStorage ==&lt;br /&gt;
&lt;br /&gt;
This is the design document for the task &amp;lt;code&amp;gt;[http://github.com/servo/servo/wiki/Storage-student-project Implement Window.sessionStorage]&amp;lt;/code&amp;gt; for the [http://www.mozilla.org/ Mozilla] research project [http://github.com/servo/servo/wiki/Design Servo].&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== [http://www.rust-lang.org/ Rust]===&lt;br /&gt;
&lt;br /&gt;
Rust is a modern systems programming language focusing on safety and speed to build reliable and efficient systems &amp;lt;ref&amp;gt; http://doc.rust-lang.org/nightly/intro.html &amp;lt;/ref&amp;gt;. It accomplishes the goals of memory safe without using garbage collection and it supports concurrency and parallelism in building platforms. &lt;br /&gt;
&lt;br /&gt;
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. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [http://github.com/servo/servo/wiki/Design Servo] ===&lt;br /&gt;
&lt;br /&gt;
Mozilla Research team is currently working on an experimental project to develop a new Web browser engine &amp;quot;Servo&amp;quot;, 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.&amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The main objectives of this experimentation project is improving the layout to graphics rendering - to optimize for power efficiency and maximize parallelism. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
&lt;br /&gt;
=== [http://html.spec.whatwg.org/multipage/webstorage.html#webstorage Web Storage] ===&lt;br /&gt;
The web storage specification defines the means by which a web application can store string key/value pairs in a browser and later retrieve them for use.&amp;lt;ref&amp;gt;https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Storage&amp;lt;/ref&amp;gt; It supports persistent data storage, similar to [http://en.wikipedia.org/wiki/HTTP_cookie cookies] but with a greatly enhanced capacity and no information stored in the [http://en.wikipedia.org/wiki/List_of_HTTP_headers HTTP request header].&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Web_storage&amp;lt;/ref&amp;gt; There are two types of web storage: [http://html.spec.whatwg.org/multipage/webstorage.html#dom-localstorage local storage] and [http://html.spec.whatwg.org/multipage/webstorage.html#dom-sessionstorage session storage].&lt;br /&gt;
&lt;br /&gt;
Browsers that support web storage have the global variables 'sessionStorage' and 'localStorage' declared at the [http://developer.mozilla.org/en-US/docs/Web/API/Window?redirectlocale=en-US&amp;amp;redirectslug=DOM%2Fwindow window] level. The following JavaScript code gives an example of how to use web storage:&lt;br /&gt;
&lt;br /&gt;
'''sessionStorage'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Store value on browser for duration of the session&lt;br /&gt;
sessionStorage.setItem('key', 'value');&lt;br /&gt;
 &lt;br /&gt;
// Retrieve value (gets deleted when browser is closed and re-opened)&lt;br /&gt;
alert(sessionStorage.getItem('key'));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''localStorage'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Store value on the browser beyond the duration of the session&lt;br /&gt;
localStorage.setItem('key', 'value');&lt;br /&gt;
 &lt;br /&gt;
// Retrieve value (persists even after closing and re-opening the browser)&lt;br /&gt;
alert(localStorage.getItem('key'));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
&lt;br /&gt;
As part of our [http://github.com/servo/servo/wiki/Storage-student-project project], we have to implement the web storage specification in the Servo browser. 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. &amp;lt;ref&amp;gt; https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Requirement Analysis &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
In order to introduce the support for session storage and local storage in the Servo Broswer, we have to create the Storage structure and allow web pages to store data in the Servo memory space.&lt;br /&gt;
&lt;br /&gt;
Below is a high level overview of the various steps that have been planned for this project:&lt;br /&gt;
&lt;br /&gt;
* Create the Storage interface and its stub implementation.&lt;br /&gt;
* Create the WindowSessionStorage interface making it return a Storage instance.&lt;br /&gt;
* Create a Storage Task which will be used to contain all stored data.&lt;br /&gt;
* Define a message-passing interface for reading and writing stored data for a particular browser tab.&lt;br /&gt;
* Use the Storage task in the implementation of Storage.&lt;br /&gt;
* When the value of a stored data is changed, notify its respective browser tab.&lt;br /&gt;
* Pass as many [http://github.com/servo/web-platform-tests/tree/servo/webstorage tests] as possible.&lt;br /&gt;
* Implement the WindowLocalStorage interface which behaves slightly different from the WindowSessionStorage interface.&lt;br /&gt;
&lt;br /&gt;
== Architecture &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Design&amp;lt;/ref&amp;gt;==&lt;br /&gt;
&lt;br /&gt;
[[File:task.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Architecture Explained ===&lt;br /&gt;
*Each box represents a Rust task.&lt;br /&gt;
*Blue boxes represent the primary tasks in the browser pipeline.&lt;br /&gt;
*Gray boxes represent tasks auxiliary to the browser pipeline.&lt;br /&gt;
*White boxes represent worker tasks. Each such box represents several tasks, the precise number of which will vary with the workload.&lt;br /&gt;
*Dashed lines indicate supervisor relationships.&lt;br /&gt;
*Solid lines indicate communication channels.&lt;br /&gt;
&lt;br /&gt;
== Component Design ==&lt;br /&gt;
[[File:servo.jpg]]&lt;br /&gt;
&lt;br /&gt;
There will be 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.&lt;br /&gt;
&lt;br /&gt;
=== Task &amp;lt;ref&amp;gt;http://doc.rust-lang.org/guide-tasks.html&amp;lt;/ref&amp;gt;===&lt;br /&gt;
Rust provides safe concurrent abstractions through a number of core library primitives. This guide will describe the concurrency model in Rust, how it relates to the Rust type system, and introduce the fundamental library abstractions for constructing concurrent programs.&lt;br /&gt;
&lt;br /&gt;
Tasks provide failure isolation and recovery. When a fatal error occurs in Rust code as a result of an explicit call to panic!(), an assertion failure, or another invalid operation, the runtime system destroys the entire task. Unlike in languages such as Java and C++, there is no way to catch an exception. Instead, tasks may monitor each other to see if they panic.&lt;br /&gt;
&lt;br /&gt;
Tasks use Rust's type system to provide strong memory safety guarantees. In particular, the type system guarantees that tasks cannot induce a data race from shared mutable state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Generate some state locally&lt;br /&gt;
let child_task_number = generate_task_number();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    // Capture it in the remote task&lt;br /&gt;
    println!(&amp;quot;I am child number {}&amp;quot;, child_task_number);&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Channel &amp;lt;ref&amp;gt;http://doc.rust-lang.org/guide-tasks.html&amp;lt;/ref&amp;gt;===&lt;br /&gt;
Now that we have spawned a new task, it would be nice if we could communicate with it. For this, we use channels. A channel is simply a pair of endpoints: one for sending messages and another for receiving messages.&lt;br /&gt;
&lt;br /&gt;
The simplest way to create a channel is to use the channel function to create a (Sender, Receiver) pair. In Rust parlance, a sender is a sending endpoint of a channel, and a receiver is the receiving endpoint. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
let (tx, rx): (Sender&amp;lt;int&amp;gt;, Receiver&amp;lt;int&amp;gt;) = channel();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    let result = some_expensive_computation();&lt;br /&gt;
    tx.send(result);&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
some_other_expensive_computation();&lt;br /&gt;
let result = rx.recv();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Data Design ==&lt;br /&gt;
&lt;br /&gt;
===  Data Description ===&lt;br /&gt;
&lt;br /&gt;
''The following are the data structures that will be used.''&lt;br /&gt;
&lt;br /&gt;
'''Storage''' | TreeMap&amp;lt;String,String&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''UrlMap''' | TreeMap&amp;lt;String,TreeMap&amp;lt;String,String&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design Pattern ==&lt;br /&gt;
&lt;br /&gt;
We will be using &amp;quot;Delegation Pattern&amp;quot; in our project. The Storage interface is used by web applications to access the web storage provided by the browser. However, the actual data is stored somewhere else(Servo Memory Space). So, it makes sense to create another class which will maintain the actual stored data. The Storage class can then delegate the task of storing/retrieving data to this class. We will create a class &amp;quot;WebStorageTask&amp;quot; for this purpose.&lt;br /&gt;
&lt;br /&gt;
== UML Diagrams ==&lt;br /&gt;
             &lt;br /&gt;
[[File:Flow_Chart_Storage.png|left]] &lt;br /&gt;
&lt;br /&gt;
Steps:&lt;br /&gt;
&lt;br /&gt;
# First, we need to build rust and servo.&lt;br /&gt;
# Generate the corresponding WebIDL bindings - Storage.webidl&lt;br /&gt;
# Define Storage.rs which has the actual code for creating the storage object.&lt;br /&gt;
# Call the receiver via a channel- this is actually used for creating an instance for each unique URL.&lt;br /&gt;
## Build the servo again.&lt;br /&gt;
&lt;br /&gt;
[[File:Use_Case_Storage.jpg]]&lt;br /&gt;
&lt;br /&gt;
Here the user can&lt;br /&gt;
&lt;br /&gt;
== Proposed Test Cases ==&lt;br /&gt;
&lt;br /&gt;
Some of the test cases which will be used to validate our changes are as follows:&lt;br /&gt;
&lt;br /&gt;
* Allow a web page to clear its session storage&lt;br /&gt;
* Allow a web page to store an item in its session storage&lt;br /&gt;
* Allow a web page to retrieve stored items from its session storage&lt;br /&gt;
* Do not allow a web page to retrieve stored items from the session storage of a web page in another domain&lt;br /&gt;
* Check the number of items stored in session storage&lt;br /&gt;
* On removing an item from storage, it should be inaccessible&lt;br /&gt;
* Should return null as value for a key not present in the session storage&lt;br /&gt;
* Should give an error on exceeding the space limit of session storage&lt;br /&gt;
&lt;br /&gt;
The complete list of test cases can be found [http://github.com/servo/web-platform-tests/tree/servo/webstorage here].&lt;br /&gt;
&lt;br /&gt;
== Further Readings ==&lt;br /&gt;
&lt;br /&gt;
Learning Rust by Examples: http://rustbyexample.com/ &amp;lt;br/&amp;gt;&lt;br /&gt;
Javascript as Servo's Garbage Collector: http://blog.mozilla.org/research/2014/08/26/javascript-servos-only-garbage-collector/  &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vankam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=92123</id>
		<title>CSC/ECE 517 Fall 2014/final design doc M1450 navr</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=92123"/>
		<updated>2014-11-18T02:56:50Z</updated>

		<summary type="html">&lt;p&gt;Vankam: /* UML Diagrams */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Implement Window.sessionStorage ==&lt;br /&gt;
&lt;br /&gt;
This is the design document for the task &amp;lt;code&amp;gt;[http://github.com/servo/servo/wiki/Storage-student-project Implement Window.sessionStorage]&amp;lt;/code&amp;gt; for the [http://www.mozilla.org/ Mozilla] research project [http://github.com/servo/servo/wiki/Design Servo].&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== [http://www.rust-lang.org/ Rust]===&lt;br /&gt;
&lt;br /&gt;
Rust is a modern systems programming language focusing on safety and speed to build reliable and efficient systems &amp;lt;ref&amp;gt; http://doc.rust-lang.org/nightly/intro.html &amp;lt;/ref&amp;gt;. It accomplishes the goals of memory safe without using garbage collection and it supports concurrency and parallelism in building platforms. &lt;br /&gt;
&lt;br /&gt;
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. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [http://github.com/servo/servo/wiki/Design Servo] ===&lt;br /&gt;
&lt;br /&gt;
Mozilla Research team is currently working on an experimental project to develop a new Web browser engine &amp;quot;Servo&amp;quot;, 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.&amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The main objectives of this experimentation project is improving the layout to graphics rendering - to optimize for power efficiency and maximize parallelism. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
&lt;br /&gt;
=== [http://html.spec.whatwg.org/multipage/webstorage.html#webstorage Web Storage] ===&lt;br /&gt;
The web storage specification defines the means by which a web application can store string key/value pairs in a browser and later retrieve them for use.&amp;lt;ref&amp;gt;https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Storage&amp;lt;/ref&amp;gt; It supports persistent data storage, similar to [http://en.wikipedia.org/wiki/HTTP_cookie cookies] but with a greatly enhanced capacity and no information stored in the [http://en.wikipedia.org/wiki/List_of_HTTP_headers HTTP request header].&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Web_storage&amp;lt;/ref&amp;gt; There are two types of web storage: [http://html.spec.whatwg.org/multipage/webstorage.html#dom-localstorage local storage] and [http://html.spec.whatwg.org/multipage/webstorage.html#dom-sessionstorage session storage].&lt;br /&gt;
&lt;br /&gt;
Browsers that support web storage have the global variables 'sessionStorage' and 'localStorage' declared at the [http://developer.mozilla.org/en-US/docs/Web/API/Window?redirectlocale=en-US&amp;amp;redirectslug=DOM%2Fwindow window] level. The following JavaScript code gives an example of how to use web storage:&lt;br /&gt;
&lt;br /&gt;
'''sessionStorage'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Store value on browser for duration of the session&lt;br /&gt;
sessionStorage.setItem('key', 'value');&lt;br /&gt;
 &lt;br /&gt;
// Retrieve value (gets deleted when browser is closed and re-opened)&lt;br /&gt;
alert(sessionStorage.getItem('key'));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''localStorage'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Store value on the browser beyond the duration of the session&lt;br /&gt;
localStorage.setItem('key', 'value');&lt;br /&gt;
 &lt;br /&gt;
// Retrieve value (persists even after closing and re-opening the browser)&lt;br /&gt;
alert(localStorage.getItem('key'));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
&lt;br /&gt;
As part of our [http://github.com/servo/servo/wiki/Storage-student-project project], we have to implement the web storage specification in the Servo browser. 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. &amp;lt;ref&amp;gt; https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Requirement Analysis &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
In order to introduce the support for session storage and local storage in the Servo Broswer, we have to create the Storage structure and allow web pages to store data in the Servo memory space.&lt;br /&gt;
&lt;br /&gt;
Below is a high level overview of the various steps that have been planned for this project:&lt;br /&gt;
&lt;br /&gt;
* Create the Storage interface and its stub implementation.&lt;br /&gt;
* Create the WindowSessionStorage interface making it return a Storage instance.&lt;br /&gt;
* Create a Storage Task which will be used to contain all stored data.&lt;br /&gt;
* Define a message-passing interface for reading and writing stored data for a particular browser tab.&lt;br /&gt;
* Use the Storage task in the implementation of Storage.&lt;br /&gt;
* When the value of a stored data is changed, notify its respective browser tab.&lt;br /&gt;
* Pass as many [http://github.com/servo/web-platform-tests/tree/servo/webstorage tests] as possible.&lt;br /&gt;
* Implement the WindowLocalStorage interface which behaves slightly different from the WindowSessionStorage interface.&lt;br /&gt;
&lt;br /&gt;
== Architecture &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Design&amp;lt;/ref&amp;gt;==&lt;br /&gt;
&lt;br /&gt;
[[File:task.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Architecture Explained ===&lt;br /&gt;
*Each box represents a Rust task.&lt;br /&gt;
*Blue boxes represent the primary tasks in the browser pipeline.&lt;br /&gt;
*Gray boxes represent tasks auxiliary to the browser pipeline.&lt;br /&gt;
*White boxes represent worker tasks. Each such box represents several tasks, the precise number of which will vary with the workload.&lt;br /&gt;
*Dashed lines indicate supervisor relationships.&lt;br /&gt;
*Solid lines indicate communication channels.&lt;br /&gt;
&lt;br /&gt;
== Component Design ==&lt;br /&gt;
[[File:servo.jpg]]&lt;br /&gt;
&lt;br /&gt;
There will be 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.&lt;br /&gt;
&lt;br /&gt;
=== Task &amp;lt;ref&amp;gt;http://doc.rust-lang.org/guide-tasks.html&amp;lt;/ref&amp;gt;===&lt;br /&gt;
Rust provides safe concurrent abstractions through a number of core library primitives. This guide will describe the concurrency model in Rust, how it relates to the Rust type system, and introduce the fundamental library abstractions for constructing concurrent programs.&lt;br /&gt;
&lt;br /&gt;
Tasks provide failure isolation and recovery. When a fatal error occurs in Rust code as a result of an explicit call to panic!(), an assertion failure, or another invalid operation, the runtime system destroys the entire task. Unlike in languages such as Java and C++, there is no way to catch an exception. Instead, tasks may monitor each other to see if they panic.&lt;br /&gt;
&lt;br /&gt;
Tasks use Rust's type system to provide strong memory safety guarantees. In particular, the type system guarantees that tasks cannot induce a data race from shared mutable state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Generate some state locally&lt;br /&gt;
let child_task_number = generate_task_number();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    // Capture it in the remote task&lt;br /&gt;
    println!(&amp;quot;I am child number {}&amp;quot;, child_task_number);&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Channel &amp;lt;ref&amp;gt;http://doc.rust-lang.org/guide-tasks.html&amp;lt;/ref&amp;gt;===&lt;br /&gt;
Now that we have spawned a new task, it would be nice if we could communicate with it. For this, we use channels. A channel is simply a pair of endpoints: one for sending messages and another for receiving messages.&lt;br /&gt;
&lt;br /&gt;
The simplest way to create a channel is to use the channel function to create a (Sender, Receiver) pair. In Rust parlance, a sender is a sending endpoint of a channel, and a receiver is the receiving endpoint. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
let (tx, rx): (Sender&amp;lt;int&amp;gt;, Receiver&amp;lt;int&amp;gt;) = channel();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    let result = some_expensive_computation();&lt;br /&gt;
    tx.send(result);&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
some_other_expensive_computation();&lt;br /&gt;
let result = rx.recv();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Data Design ==&lt;br /&gt;
&lt;br /&gt;
===  Data Description ===&lt;br /&gt;
&lt;br /&gt;
''The following are the data structures that will be used.''&lt;br /&gt;
&lt;br /&gt;
'''Storage''' | TreeMap&amp;lt;String,String&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''UrlMap''' | TreeMap&amp;lt;String,TreeMap&amp;lt;String,String&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design Pattern ==&lt;br /&gt;
&lt;br /&gt;
We will be using &amp;quot;Delegation Pattern&amp;quot; in our project. The Storage interface is used by web applications to access the web storage provided by the browser. However, the actual data is stored somewhere else(Servo Memory Space). So, it makes sense to create another class which will maintain the actual stored data. The Storage class can then delegate the task of storing/retrieving data to this class. We will create a class &amp;quot;WebStorageTask&amp;quot; for this purpose.&lt;br /&gt;
&lt;br /&gt;
== UML Diagrams ==&lt;br /&gt;
             &lt;br /&gt;
[[File:Flow_Chart_Storage.png|left]] &lt;br /&gt;
&lt;br /&gt;
Steps:&lt;br /&gt;
&lt;br /&gt;
# First, we need to build rust and servo.&lt;br /&gt;
# Generate the corresponding WebIDL bindings - Storage.webidl&lt;br /&gt;
# Define Storage.rs which has the actual code for creating the storage object.&lt;br /&gt;
# Call the receiver via a channel- this is actually used for creating an instance for each unique URL.&lt;br /&gt;
# Build the servo again.&lt;br /&gt;
&lt;br /&gt;
[[File:Use_Case_Storage.jpg]]&lt;br /&gt;
&lt;br /&gt;
Here the user can&lt;br /&gt;
&lt;br /&gt;
== Proposed Test Cases ==&lt;br /&gt;
&lt;br /&gt;
Some of the test cases which will be used to validate our changes are as follows:&lt;br /&gt;
&lt;br /&gt;
* Allow a web page to clear its session storage&lt;br /&gt;
* Allow a web page to store an item in its session storage&lt;br /&gt;
* Allow a web page to retrieve stored items from its session storage&lt;br /&gt;
* Do not allow a web page to retrieve stored items from the session storage of a web page in another domain&lt;br /&gt;
* Check the number of items stored in session storage&lt;br /&gt;
* On removing an item from storage, it should be inaccessible&lt;br /&gt;
* Should return null as value for a key not present in the session storage&lt;br /&gt;
* Should give an error on exceeding the space limit of session storage&lt;br /&gt;
&lt;br /&gt;
The complete list of test cases can be found [http://github.com/servo/web-platform-tests/tree/servo/webstorage here].&lt;br /&gt;
&lt;br /&gt;
== Further Readings ==&lt;br /&gt;
&lt;br /&gt;
Learning Rust by Examples: http://rustbyexample.com/ &amp;lt;br/&amp;gt;&lt;br /&gt;
Javascript as Servo's Garbage Collector: http://blog.mozilla.org/research/2014/08/26/javascript-servos-only-garbage-collector/  &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vankam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=92122</id>
		<title>CSC/ECE 517 Fall 2014/final design doc M1450 navr</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=92122"/>
		<updated>2014-11-18T02:55:22Z</updated>

		<summary type="html">&lt;p&gt;Vankam: `&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Implement Window.sessionStorage ==&lt;br /&gt;
&lt;br /&gt;
This is the design document for the task &amp;lt;code&amp;gt;[http://github.com/servo/servo/wiki/Storage-student-project Implement Window.sessionStorage]&amp;lt;/code&amp;gt; for the [http://www.mozilla.org/ Mozilla] research project [http://github.com/servo/servo/wiki/Design Servo].&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== [http://www.rust-lang.org/ Rust]===&lt;br /&gt;
&lt;br /&gt;
Rust is a modern systems programming language focusing on safety and speed to build reliable and efficient systems &amp;lt;ref&amp;gt; http://doc.rust-lang.org/nightly/intro.html &amp;lt;/ref&amp;gt;. It accomplishes the goals of memory safe without using garbage collection and it supports concurrency and parallelism in building platforms. &lt;br /&gt;
&lt;br /&gt;
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. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [http://github.com/servo/servo/wiki/Design Servo] ===&lt;br /&gt;
&lt;br /&gt;
Mozilla Research team is currently working on an experimental project to develop a new Web browser engine &amp;quot;Servo&amp;quot;, 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.&amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The main objectives of this experimentation project is improving the layout to graphics rendering - to optimize for power efficiency and maximize parallelism. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
&lt;br /&gt;
=== [http://html.spec.whatwg.org/multipage/webstorage.html#webstorage Web Storage] ===&lt;br /&gt;
The web storage specification defines the means by which a web application can store string key/value pairs in a browser and later retrieve them for use.&amp;lt;ref&amp;gt;https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Storage&amp;lt;/ref&amp;gt; It supports persistent data storage, similar to [http://en.wikipedia.org/wiki/HTTP_cookie cookies] but with a greatly enhanced capacity and no information stored in the [http://en.wikipedia.org/wiki/List_of_HTTP_headers HTTP request header].&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Web_storage&amp;lt;/ref&amp;gt; There are two types of web storage: [http://html.spec.whatwg.org/multipage/webstorage.html#dom-localstorage local storage] and [http://html.spec.whatwg.org/multipage/webstorage.html#dom-sessionstorage session storage].&lt;br /&gt;
&lt;br /&gt;
Browsers that support web storage have the global variables 'sessionStorage' and 'localStorage' declared at the [http://developer.mozilla.org/en-US/docs/Web/API/Window?redirectlocale=en-US&amp;amp;redirectslug=DOM%2Fwindow window] level. The following JavaScript code gives an example of how to use web storage:&lt;br /&gt;
&lt;br /&gt;
'''sessionStorage'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Store value on browser for duration of the session&lt;br /&gt;
sessionStorage.setItem('key', 'value');&lt;br /&gt;
 &lt;br /&gt;
// Retrieve value (gets deleted when browser is closed and re-opened)&lt;br /&gt;
alert(sessionStorage.getItem('key'));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''localStorage'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Store value on the browser beyond the duration of the session&lt;br /&gt;
localStorage.setItem('key', 'value');&lt;br /&gt;
 &lt;br /&gt;
// Retrieve value (persists even after closing and re-opening the browser)&lt;br /&gt;
alert(localStorage.getItem('key'));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
&lt;br /&gt;
As part of our [http://github.com/servo/servo/wiki/Storage-student-project project], we have to implement the web storage specification in the Servo browser. 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. &amp;lt;ref&amp;gt; https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Requirement Analysis &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
In order to introduce the support for session storage and local storage in the Servo Broswer, we have to create the Storage structure and allow web pages to store data in the Servo memory space.&lt;br /&gt;
&lt;br /&gt;
Below is a high level overview of the various steps that have been planned for this project:&lt;br /&gt;
&lt;br /&gt;
* Create the Storage interface and its stub implementation.&lt;br /&gt;
* Create the WindowSessionStorage interface making it return a Storage instance.&lt;br /&gt;
* Create a Storage Task which will be used to contain all stored data.&lt;br /&gt;
* Define a message-passing interface for reading and writing stored data for a particular browser tab.&lt;br /&gt;
* Use the Storage task in the implementation of Storage.&lt;br /&gt;
* When the value of a stored data is changed, notify its respective browser tab.&lt;br /&gt;
* Pass as many [http://github.com/servo/web-platform-tests/tree/servo/webstorage tests] as possible.&lt;br /&gt;
* Implement the WindowLocalStorage interface which behaves slightly different from the WindowSessionStorage interface.&lt;br /&gt;
&lt;br /&gt;
== Architecture &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Design&amp;lt;/ref&amp;gt;==&lt;br /&gt;
&lt;br /&gt;
[[File:task.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Architecture Explained ===&lt;br /&gt;
*Each box represents a Rust task.&lt;br /&gt;
*Blue boxes represent the primary tasks in the browser pipeline.&lt;br /&gt;
*Gray boxes represent tasks auxiliary to the browser pipeline.&lt;br /&gt;
*White boxes represent worker tasks. Each such box represents several tasks, the precise number of which will vary with the workload.&lt;br /&gt;
*Dashed lines indicate supervisor relationships.&lt;br /&gt;
*Solid lines indicate communication channels.&lt;br /&gt;
&lt;br /&gt;
== Component Design ==&lt;br /&gt;
[[File:servo.jpg]]&lt;br /&gt;
&lt;br /&gt;
There will be 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.&lt;br /&gt;
&lt;br /&gt;
=== Task &amp;lt;ref&amp;gt;http://doc.rust-lang.org/guide-tasks.html&amp;lt;/ref&amp;gt;===&lt;br /&gt;
Rust provides safe concurrent abstractions through a number of core library primitives. This guide will describe the concurrency model in Rust, how it relates to the Rust type system, and introduce the fundamental library abstractions for constructing concurrent programs.&lt;br /&gt;
&lt;br /&gt;
Tasks provide failure isolation and recovery. When a fatal error occurs in Rust code as a result of an explicit call to panic!(), an assertion failure, or another invalid operation, the runtime system destroys the entire task. Unlike in languages such as Java and C++, there is no way to catch an exception. Instead, tasks may monitor each other to see if they panic.&lt;br /&gt;
&lt;br /&gt;
Tasks use Rust's type system to provide strong memory safety guarantees. In particular, the type system guarantees that tasks cannot induce a data race from shared mutable state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Generate some state locally&lt;br /&gt;
let child_task_number = generate_task_number();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    // Capture it in the remote task&lt;br /&gt;
    println!(&amp;quot;I am child number {}&amp;quot;, child_task_number);&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Channel &amp;lt;ref&amp;gt;http://doc.rust-lang.org/guide-tasks.html&amp;lt;/ref&amp;gt;===&lt;br /&gt;
Now that we have spawned a new task, it would be nice if we could communicate with it. For this, we use channels. A channel is simply a pair of endpoints: one for sending messages and another for receiving messages.&lt;br /&gt;
&lt;br /&gt;
The simplest way to create a channel is to use the channel function to create a (Sender, Receiver) pair. In Rust parlance, a sender is a sending endpoint of a channel, and a receiver is the receiving endpoint. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
let (tx, rx): (Sender&amp;lt;int&amp;gt;, Receiver&amp;lt;int&amp;gt;) = channel();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    let result = some_expensive_computation();&lt;br /&gt;
    tx.send(result);&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
some_other_expensive_computation();&lt;br /&gt;
let result = rx.recv();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Data Design ==&lt;br /&gt;
&lt;br /&gt;
===  Data Description ===&lt;br /&gt;
&lt;br /&gt;
''The following are the data structures that will be used.''&lt;br /&gt;
&lt;br /&gt;
'''Storage''' | TreeMap&amp;lt;String,String&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''UrlMap''' | TreeMap&amp;lt;String,TreeMap&amp;lt;String,String&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design Pattern ==&lt;br /&gt;
&lt;br /&gt;
We will be using &amp;quot;Delegation Pattern&amp;quot; in our project. The Storage interface is used by web applications to access the web storage provided by the browser. However, the actual data is stored somewhere else(Servo Memory Space). So, it makes sense to create another class which will maintain the actual stored data. The Storage class can then delegate the task of storing/retrieving data to this class. We will create a class &amp;quot;WebStorageTask&amp;quot; for this purpose.&lt;br /&gt;
&lt;br /&gt;
== UML Diagrams ==&lt;br /&gt;
             &lt;br /&gt;
[[File:Flow_Chart_Storage.png|left]] &lt;br /&gt;
&lt;br /&gt;
Steps:&lt;br /&gt;
&lt;br /&gt;
1. First, we need to build rust and servo.&lt;br /&gt;
2. Generate the corresponding WebIDL bindings - Storage.webidl&lt;br /&gt;
3. Define Storage.rs which has the actual code for creating the storage object.&lt;br /&gt;
4. Call the receiver via a channel- this is actually used for creating an instance for each unique URL.&lt;br /&gt;
5. Build the servo again.&lt;br /&gt;
&lt;br /&gt;
[[File:Use_Case_Storage.jpg]]&lt;br /&gt;
&lt;br /&gt;
Here the user can&lt;br /&gt;
&lt;br /&gt;
== Proposed Test Cases ==&lt;br /&gt;
&lt;br /&gt;
Some of the test cases which will be used to validate our changes are as follows:&lt;br /&gt;
&lt;br /&gt;
* Allow a web page to clear its session storage&lt;br /&gt;
* Allow a web page to store an item in its session storage&lt;br /&gt;
* Allow a web page to retrieve stored items from its session storage&lt;br /&gt;
* Do not allow a web page to retrieve stored items from the session storage of a web page in another domain&lt;br /&gt;
* Check the number of items stored in session storage&lt;br /&gt;
* On removing an item from storage, it should be inaccessible&lt;br /&gt;
* Should return null as value for a key not present in the session storage&lt;br /&gt;
* Should give an error on exceeding the space limit of session storage&lt;br /&gt;
&lt;br /&gt;
The complete list of test cases can be found [http://github.com/servo/web-platform-tests/tree/servo/webstorage here].&lt;br /&gt;
&lt;br /&gt;
== Further Readings ==&lt;br /&gt;
&lt;br /&gt;
Learning Rust by Examples: http://rustbyexample.com/ &amp;lt;br/&amp;gt;&lt;br /&gt;
Javascript as Servo's Garbage Collector: http://blog.mozilla.org/research/2014/08/26/javascript-servos-only-garbage-collector/  &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vankam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=92121</id>
		<title>CSC/ECE 517 Fall 2014/final design doc M1450 navr</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=92121"/>
		<updated>2014-11-18T02:47:09Z</updated>

		<summary type="html">&lt;p&gt;Vankam: /* UML Diagrams */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Implement Window.sessionStorage ==&lt;br /&gt;
&lt;br /&gt;
This is the design document for the task &amp;lt;code&amp;gt;[http://github.com/servo/servo/wiki/Storage-student-project Implement Window.sessionStorage]&amp;lt;/code&amp;gt; for the [http://www.mozilla.org/ Mozilla] research project [http://github.com/servo/servo/wiki/Design Servo].&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== [http://www.rust-lang.org/ Rust]===&lt;br /&gt;
&lt;br /&gt;
Rust is a modern systems programming language focusing on safety and speed to build reliable and efficient systems &amp;lt;ref&amp;gt; http://doc.rust-lang.org/nightly/intro.html &amp;lt;/ref&amp;gt;. It accomplishes the goals of memory safe without using garbage collection and it supports concurrency and parallelism in building platforms. &lt;br /&gt;
&lt;br /&gt;
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. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [http://github.com/servo/servo/wiki/Design Servo] ===&lt;br /&gt;
&lt;br /&gt;
Mozilla Research team is currently working on an experimental project to develop a new Web browser engine &amp;quot;Servo&amp;quot;, 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.&amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The main objectives of this experimentation project is improving the layout to graphics rendering - to optimize for power efficiency and maximize parallelism. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
&lt;br /&gt;
=== [http://html.spec.whatwg.org/multipage/webstorage.html#webstorage Web Storage] ===&lt;br /&gt;
The web storage specification defines the means by which a web application can store string key/value pairs in a browser and later retrieve them for use.&amp;lt;ref&amp;gt;https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Storage&amp;lt;/ref&amp;gt; It supports persistent data storage, similar to [http://en.wikipedia.org/wiki/HTTP_cookie cookies] but with a greatly enhanced capacity and no information stored in the [http://en.wikipedia.org/wiki/List_of_HTTP_headers HTTP request header].&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Web_storage&amp;lt;/ref&amp;gt; There are two types of web storage: [http://html.spec.whatwg.org/multipage/webstorage.html#dom-localstorage local storage] and [http://html.spec.whatwg.org/multipage/webstorage.html#dom-sessionstorage session storage].&lt;br /&gt;
&lt;br /&gt;
Browsers that support web storage have the global variables 'sessionStorage' and 'localStorage' declared at the [http://developer.mozilla.org/en-US/docs/Web/API/Window?redirectlocale=en-US&amp;amp;redirectslug=DOM%2Fwindow window] level. The following JavaScript code gives an example of how to use web storage:&lt;br /&gt;
&lt;br /&gt;
'''sessionStorage'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Store value on browser for duration of the session&lt;br /&gt;
sessionStorage.setItem('key', 'value');&lt;br /&gt;
 &lt;br /&gt;
// Retrieve value (gets deleted when browser is closed and re-opened)&lt;br /&gt;
alert(sessionStorage.getItem('key'));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''localStorage'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Store value on the browser beyond the duration of the session&lt;br /&gt;
localStorage.setItem('key', 'value');&lt;br /&gt;
 &lt;br /&gt;
// Retrieve value (persists even after closing and re-opening the browser)&lt;br /&gt;
alert(localStorage.getItem('key'));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
&lt;br /&gt;
As part of our [http://github.com/servo/servo/wiki/Storage-student-project project], we have to implement the web storage specification in the Servo browser. 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. &amp;lt;ref&amp;gt; https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Requirement Analysis &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
In order to introduce the support for session storage and local storage in the Servo Broswer, we have to create the Storage structure and allow web pages to store data in the Servo memory space.&lt;br /&gt;
&lt;br /&gt;
Below is a high level overview of the various steps that have been planned for this project:&lt;br /&gt;
&lt;br /&gt;
* Create the Storage interface and its stub implementation.&lt;br /&gt;
* Create the WindowSessionStorage interface making it return a Storage instance.&lt;br /&gt;
* Create a Storage Task which will be used to contain all stored data.&lt;br /&gt;
* Define a message-passing interface for reading and writing stored data for a particular browser tab.&lt;br /&gt;
* Use the Storage task in the implementation of Storage.&lt;br /&gt;
* When the value of a stored data is changed, notify its respective browser tab.&lt;br /&gt;
* Pass as many [http://github.com/servo/web-platform-tests/tree/servo/webstorage tests] as possible.&lt;br /&gt;
* Implement the WindowLocalStorage interface which behaves slightly different from the WindowSessionStorage interface.&lt;br /&gt;
&lt;br /&gt;
== Architecture &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Design&amp;lt;/ref&amp;gt;==&lt;br /&gt;
&lt;br /&gt;
[[File:task.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Architecture Explained ===&lt;br /&gt;
*Each box represents a Rust task.&lt;br /&gt;
*Blue boxes represent the primary tasks in the browser pipeline.&lt;br /&gt;
*Gray boxes represent tasks auxiliary to the browser pipeline.&lt;br /&gt;
*White boxes represent worker tasks. Each such box represents several tasks, the precise number of which will vary with the workload.&lt;br /&gt;
*Dashed lines indicate supervisor relationships.&lt;br /&gt;
*Solid lines indicate communication channels.&lt;br /&gt;
&lt;br /&gt;
== Component Design ==&lt;br /&gt;
[[File:servo.jpg]]&lt;br /&gt;
&lt;br /&gt;
There will be 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.&lt;br /&gt;
&lt;br /&gt;
=== Task &amp;lt;ref&amp;gt;http://doc.rust-lang.org/guide-tasks.html&amp;lt;/ref&amp;gt;===&lt;br /&gt;
Rust provides safe concurrent abstractions through a number of core library primitives. This guide will describe the concurrency model in Rust, how it relates to the Rust type system, and introduce the fundamental library abstractions for constructing concurrent programs.&lt;br /&gt;
&lt;br /&gt;
Tasks provide failure isolation and recovery. When a fatal error occurs in Rust code as a result of an explicit call to panic!(), an assertion failure, or another invalid operation, the runtime system destroys the entire task. Unlike in languages such as Java and C++, there is no way to catch an exception. Instead, tasks may monitor each other to see if they panic.&lt;br /&gt;
&lt;br /&gt;
Tasks use Rust's type system to provide strong memory safety guarantees. In particular, the type system guarantees that tasks cannot induce a data race from shared mutable state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Generate some state locally&lt;br /&gt;
let child_task_number = generate_task_number();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    // Capture it in the remote task&lt;br /&gt;
    println!(&amp;quot;I am child number {}&amp;quot;, child_task_number);&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Channel &amp;lt;ref&amp;gt;http://doc.rust-lang.org/guide-tasks.html&amp;lt;/ref&amp;gt;===&lt;br /&gt;
Now that we have spawned a new task, it would be nice if we could communicate with it. For this, we use channels. A channel is simply a pair of endpoints: one for sending messages and another for receiving messages.&lt;br /&gt;
&lt;br /&gt;
The simplest way to create a channel is to use the channel function to create a (Sender, Receiver) pair. In Rust parlance, a sender is a sending endpoint of a channel, and a receiver is the receiving endpoint. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
let (tx, rx): (Sender&amp;lt;int&amp;gt;, Receiver&amp;lt;int&amp;gt;) = channel();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    let result = some_expensive_computation();&lt;br /&gt;
    tx.send(result);&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
some_other_expensive_computation();&lt;br /&gt;
let result = rx.recv();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Data Design ==&lt;br /&gt;
&lt;br /&gt;
===  Data Description ===&lt;br /&gt;
&lt;br /&gt;
''The following are the data structures that will be used.''&lt;br /&gt;
&lt;br /&gt;
'''Storage''' | TreeMap&amp;lt;String,String&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''UrlMap''' | TreeMap&amp;lt;String,TreeMap&amp;lt;String,String&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design Pattern ==&lt;br /&gt;
&lt;br /&gt;
We will be using &amp;quot;Delegation Pattern&amp;quot; in our project. The Storage interface is used by web applications to access the web storage provided by the browser. However, the actual data is stored somewhere else(Servo Memory Space). So, it makes sense to create another class which will maintain the actual stored data. The Storage class can then delegate the task of storing/retrieving data to this class. We will create a class &amp;quot;WebStorageTask&amp;quot; for this purpose.&lt;br /&gt;
&lt;br /&gt;
== UML Diagrams ==&lt;br /&gt;
&lt;br /&gt;
'''Flow Chart''' &lt;br /&gt;
----&lt;br /&gt;
             &lt;br /&gt;
[[File:Flow_Chart_Storage.png|left]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Use Case'''&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[File:Use_Case_Storage.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Proposed Test Cases ==&lt;br /&gt;
&lt;br /&gt;
Some of the test cases which will be used to validate our changes are as follows:&lt;br /&gt;
&lt;br /&gt;
* Allow a web page to clear its session storage&lt;br /&gt;
* Allow a web page to store an item in its session storage&lt;br /&gt;
* Allow a web page to retrieve stored items from its session storage&lt;br /&gt;
* Do not allow a web page to retrieve stored items from the session storage of a web page in another domain&lt;br /&gt;
* Check the number of items stored in session storage&lt;br /&gt;
* On removing an item from storage, it should be inaccessible&lt;br /&gt;
* Should return null as value for a key not present in the session storage&lt;br /&gt;
* Should give an error on exceeding the space limit of session storage&lt;br /&gt;
&lt;br /&gt;
The complete list of test cases can be found [http://github.com/servo/web-platform-tests/tree/servo/webstorage here].&lt;br /&gt;
&lt;br /&gt;
== Further Readings ==&lt;br /&gt;
&lt;br /&gt;
Learning Rust by Examples: http://rustbyexample.com/ &amp;lt;br/&amp;gt;&lt;br /&gt;
Javascript as Servo's Garbage Collector: http://blog.mozilla.org/research/2014/08/26/javascript-servos-only-garbage-collector/  &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vankam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=92120</id>
		<title>CSC/ECE 517 Fall 2014/final design doc M1450 navr</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=92120"/>
		<updated>2014-11-18T02:45:06Z</updated>

		<summary type="html">&lt;p&gt;Vankam: /* UML Diagrams */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Implement Window.sessionStorage ==&lt;br /&gt;
&lt;br /&gt;
This is the design document for the task &amp;lt;code&amp;gt;[http://github.com/servo/servo/wiki/Storage-student-project Implement Window.sessionStorage]&amp;lt;/code&amp;gt; for the [http://www.mozilla.org/ Mozilla] research project [http://github.com/servo/servo/wiki/Design Servo].&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== [http://www.rust-lang.org/ Rust]===&lt;br /&gt;
&lt;br /&gt;
Rust is a modern systems programming language focusing on safety and speed to build reliable and efficient systems &amp;lt;ref&amp;gt; http://doc.rust-lang.org/nightly/intro.html &amp;lt;/ref&amp;gt;. It accomplishes the goals of memory safe without using garbage collection and it supports concurrency and parallelism in building platforms. &lt;br /&gt;
&lt;br /&gt;
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. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [http://github.com/servo/servo/wiki/Design Servo] ===&lt;br /&gt;
&lt;br /&gt;
Mozilla Research team is currently working on an experimental project to develop a new Web browser engine &amp;quot;Servo&amp;quot;, 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.&amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The main objectives of this experimentation project is improving the layout to graphics rendering - to optimize for power efficiency and maximize parallelism. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
&lt;br /&gt;
=== [http://html.spec.whatwg.org/multipage/webstorage.html#webstorage Web Storage] ===&lt;br /&gt;
The web storage specification defines the means by which a web application can store string key/value pairs in a browser and later retrieve them for use.&amp;lt;ref&amp;gt;https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Storage&amp;lt;/ref&amp;gt; It supports persistent data storage, similar to [http://en.wikipedia.org/wiki/HTTP_cookie cookies] but with a greatly enhanced capacity and no information stored in the [http://en.wikipedia.org/wiki/List_of_HTTP_headers HTTP request header].&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Web_storage&amp;lt;/ref&amp;gt; There are two types of web storage: [http://html.spec.whatwg.org/multipage/webstorage.html#dom-localstorage local storage] and [http://html.spec.whatwg.org/multipage/webstorage.html#dom-sessionstorage session storage].&lt;br /&gt;
&lt;br /&gt;
Browsers that support web storage have the global variables 'sessionStorage' and 'localStorage' declared at the [http://developer.mozilla.org/en-US/docs/Web/API/Window?redirectlocale=en-US&amp;amp;redirectslug=DOM%2Fwindow window] level. The following JavaScript code gives an example of how to use web storage:&lt;br /&gt;
&lt;br /&gt;
'''sessionStorage'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Store value on browser for duration of the session&lt;br /&gt;
sessionStorage.setItem('key', 'value');&lt;br /&gt;
 &lt;br /&gt;
// Retrieve value (gets deleted when browser is closed and re-opened)&lt;br /&gt;
alert(sessionStorage.getItem('key'));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''localStorage'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Store value on the browser beyond the duration of the session&lt;br /&gt;
localStorage.setItem('key', 'value');&lt;br /&gt;
 &lt;br /&gt;
// Retrieve value (persists even after closing and re-opening the browser)&lt;br /&gt;
alert(localStorage.getItem('key'));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
&lt;br /&gt;
As part of our [http://github.com/servo/servo/wiki/Storage-student-project project], we have to implement the web storage specification in the Servo browser. 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. &amp;lt;ref&amp;gt; https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Requirement Analysis &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
In order to introduce the support for session storage and local storage in the Servo Broswer, we have to create the Storage structure and allow web pages to store data in the Servo memory space.&lt;br /&gt;
&lt;br /&gt;
Below is a high level overview of the various steps that have been planned for this project:&lt;br /&gt;
&lt;br /&gt;
* Create the Storage interface and its stub implementation.&lt;br /&gt;
* Create the WindowSessionStorage interface making it return a Storage instance.&lt;br /&gt;
* Create a Storage Task which will be used to contain all stored data.&lt;br /&gt;
* Define a message-passing interface for reading and writing stored data for a particular browser tab.&lt;br /&gt;
* Use the Storage task in the implementation of Storage.&lt;br /&gt;
* When the value of a stored data is changed, notify its respective browser tab.&lt;br /&gt;
* Pass as many [http://github.com/servo/web-platform-tests/tree/servo/webstorage tests] as possible.&lt;br /&gt;
* Implement the WindowLocalStorage interface which behaves slightly different from the WindowSessionStorage interface.&lt;br /&gt;
&lt;br /&gt;
== Architecture &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Design&amp;lt;/ref&amp;gt;==&lt;br /&gt;
&lt;br /&gt;
[[File:task.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Architecture Explained ===&lt;br /&gt;
*Each box represents a Rust task.&lt;br /&gt;
*Blue boxes represent the primary tasks in the browser pipeline.&lt;br /&gt;
*Gray boxes represent tasks auxiliary to the browser pipeline.&lt;br /&gt;
*White boxes represent worker tasks. Each such box represents several tasks, the precise number of which will vary with the workload.&lt;br /&gt;
*Dashed lines indicate supervisor relationships.&lt;br /&gt;
*Solid lines indicate communication channels.&lt;br /&gt;
&lt;br /&gt;
== Component Design ==&lt;br /&gt;
[[File:servo.jpg]]&lt;br /&gt;
&lt;br /&gt;
There will be 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.&lt;br /&gt;
&lt;br /&gt;
=== Task &amp;lt;ref&amp;gt;http://doc.rust-lang.org/guide-tasks.html&amp;lt;/ref&amp;gt;===&lt;br /&gt;
Rust provides safe concurrent abstractions through a number of core library primitives. This guide will describe the concurrency model in Rust, how it relates to the Rust type system, and introduce the fundamental library abstractions for constructing concurrent programs.&lt;br /&gt;
&lt;br /&gt;
Tasks provide failure isolation and recovery. When a fatal error occurs in Rust code as a result of an explicit call to panic!(), an assertion failure, or another invalid operation, the runtime system destroys the entire task. Unlike in languages such as Java and C++, there is no way to catch an exception. Instead, tasks may monitor each other to see if they panic.&lt;br /&gt;
&lt;br /&gt;
Tasks use Rust's type system to provide strong memory safety guarantees. In particular, the type system guarantees that tasks cannot induce a data race from shared mutable state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Generate some state locally&lt;br /&gt;
let child_task_number = generate_task_number();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    // Capture it in the remote task&lt;br /&gt;
    println!(&amp;quot;I am child number {}&amp;quot;, child_task_number);&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Channel &amp;lt;ref&amp;gt;http://doc.rust-lang.org/guide-tasks.html&amp;lt;/ref&amp;gt;===&lt;br /&gt;
Now that we have spawned a new task, it would be nice if we could communicate with it. For this, we use channels. A channel is simply a pair of endpoints: one for sending messages and another for receiving messages.&lt;br /&gt;
&lt;br /&gt;
The simplest way to create a channel is to use the channel function to create a (Sender, Receiver) pair. In Rust parlance, a sender is a sending endpoint of a channel, and a receiver is the receiving endpoint. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
let (tx, rx): (Sender&amp;lt;int&amp;gt;, Receiver&amp;lt;int&amp;gt;) = channel();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    let result = some_expensive_computation();&lt;br /&gt;
    tx.send(result);&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
some_other_expensive_computation();&lt;br /&gt;
let result = rx.recv();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Data Design ==&lt;br /&gt;
&lt;br /&gt;
===  Data Description ===&lt;br /&gt;
&lt;br /&gt;
''The following are the data structures that will be used.''&lt;br /&gt;
&lt;br /&gt;
'''Storage''' | TreeMap&amp;lt;String,String&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''UrlMap''' | TreeMap&amp;lt;String,TreeMap&amp;lt;String,String&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design Pattern ==&lt;br /&gt;
&lt;br /&gt;
We will be using &amp;quot;Delegation Pattern&amp;quot; in our project. The Storage interface is used by web applications to access the web storage provided by the browser. However, the actual data is stored somewhere else(Servo Memory Space). So, it makes sense to create another class which will maintain the actual stored data. The Storage class can then delegate the task of storing/retrieving data to this class. We will create a class &amp;quot;WebStorageTask&amp;quot; for this purpose.&lt;br /&gt;
&lt;br /&gt;
== UML Diagrams ==&lt;br /&gt;
&lt;br /&gt;
Flow Chart                             Use Case&lt;br /&gt;
[[File:Flow_Chart_Storage.png|left]]  [[File:Use_Case_Storage.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
asdfasd&lt;br /&gt;
Question 3: Does the design incorporate all of the functionality required? (See http://courses.ncsu.edu/csc517/common/homework/project/ideas.html?) [Or, if this is a project idea submitted by students, does the design document clearly explain the required functionality?]&lt;br /&gt;
Question 3: Does the design incorporate all of the functionality required? (See http://courses.ncsu.edu/csc517/common/homework/project/ideas.html?) [Or, if this is a project idea submitted by students, does the design document clearly explain the required functionality?]&lt;br /&gt;
Question 3: Does the design incorporate all of the functionality required? (See http://courses.ncsu.edu/csc517/common/homework/project/ideas.html?) [Or, if this is a project idea submitted by students, does the design document clearly explain the required functionality?]&lt;br /&gt;
Question 3: Does the design incorporate all of the functionality required? (See http://courses.ncsu.edu/csc517/common/homework/project/ideas.html?) [Or, if this is a project idea submitted by students, does the design document clearly explain the required functionality?]&lt;br /&gt;
Question 3: Does the design incorporate all of the functionality required? (See http://courses.ncsu.edu/csc517/common/homework/project/ideas.html?) [Or, if this is a project idea submitted by students, does the design document clearly explain the required functionality?]&lt;br /&gt;
&lt;br /&gt;
== Proposed Test Cases ==&lt;br /&gt;
&lt;br /&gt;
Some of the test cases which will be used to validate our changes are as follows:&lt;br /&gt;
&lt;br /&gt;
* Allow a web page to clear its session storage&lt;br /&gt;
* Allow a web page to store an item in its session storage&lt;br /&gt;
* Allow a web page to retrieve stored items from its session storage&lt;br /&gt;
* Do not allow a web page to retrieve stored items from the session storage of a web page in another domain&lt;br /&gt;
* Check the number of items stored in session storage&lt;br /&gt;
* On removing an item from storage, it should be inaccessible&lt;br /&gt;
* Should return null as value for a key not present in the session storage&lt;br /&gt;
* Should give an error on exceeding the space limit of session storage&lt;br /&gt;
&lt;br /&gt;
The complete list of test cases can be found [http://github.com/servo/web-platform-tests/tree/servo/webstorage here].&lt;br /&gt;
&lt;br /&gt;
== Further Readings ==&lt;br /&gt;
&lt;br /&gt;
Learning Rust by Examples: http://rustbyexample.com/ &amp;lt;br/&amp;gt;&lt;br /&gt;
Javascript as Servo's Garbage Collector: http://blog.mozilla.org/research/2014/08/26/javascript-servos-only-garbage-collector/  &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vankam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=92119</id>
		<title>CSC/ECE 517 Fall 2014/final design doc M1450 navr</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=92119"/>
		<updated>2014-11-18T02:44:33Z</updated>

		<summary type="html">&lt;p&gt;Vankam: /* UML Diagrams */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Implement Window.sessionStorage ==&lt;br /&gt;
&lt;br /&gt;
This is the design document for the task &amp;lt;code&amp;gt;[http://github.com/servo/servo/wiki/Storage-student-project Implement Window.sessionStorage]&amp;lt;/code&amp;gt; for the [http://www.mozilla.org/ Mozilla] research project [http://github.com/servo/servo/wiki/Design Servo].&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== [http://www.rust-lang.org/ Rust]===&lt;br /&gt;
&lt;br /&gt;
Rust is a modern systems programming language focusing on safety and speed to build reliable and efficient systems &amp;lt;ref&amp;gt; http://doc.rust-lang.org/nightly/intro.html &amp;lt;/ref&amp;gt;. It accomplishes the goals of memory safe without using garbage collection and it supports concurrency and parallelism in building platforms. &lt;br /&gt;
&lt;br /&gt;
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. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [http://github.com/servo/servo/wiki/Design Servo] ===&lt;br /&gt;
&lt;br /&gt;
Mozilla Research team is currently working on an experimental project to develop a new Web browser engine &amp;quot;Servo&amp;quot;, 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.&amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The main objectives of this experimentation project is improving the layout to graphics rendering - to optimize for power efficiency and maximize parallelism. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
&lt;br /&gt;
=== [http://html.spec.whatwg.org/multipage/webstorage.html#webstorage Web Storage] ===&lt;br /&gt;
The web storage specification defines the means by which a web application can store string key/value pairs in a browser and later retrieve them for use.&amp;lt;ref&amp;gt;https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Storage&amp;lt;/ref&amp;gt; It supports persistent data storage, similar to [http://en.wikipedia.org/wiki/HTTP_cookie cookies] but with a greatly enhanced capacity and no information stored in the [http://en.wikipedia.org/wiki/List_of_HTTP_headers HTTP request header].&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Web_storage&amp;lt;/ref&amp;gt; There are two types of web storage: [http://html.spec.whatwg.org/multipage/webstorage.html#dom-localstorage local storage] and [http://html.spec.whatwg.org/multipage/webstorage.html#dom-sessionstorage session storage].&lt;br /&gt;
&lt;br /&gt;
Browsers that support web storage have the global variables 'sessionStorage' and 'localStorage' declared at the [http://developer.mozilla.org/en-US/docs/Web/API/Window?redirectlocale=en-US&amp;amp;redirectslug=DOM%2Fwindow window] level. The following JavaScript code gives an example of how to use web storage:&lt;br /&gt;
&lt;br /&gt;
'''sessionStorage'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Store value on browser for duration of the session&lt;br /&gt;
sessionStorage.setItem('key', 'value');&lt;br /&gt;
 &lt;br /&gt;
// Retrieve value (gets deleted when browser is closed and re-opened)&lt;br /&gt;
alert(sessionStorage.getItem('key'));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''localStorage'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Store value on the browser beyond the duration of the session&lt;br /&gt;
localStorage.setItem('key', 'value');&lt;br /&gt;
 &lt;br /&gt;
// Retrieve value (persists even after closing and re-opening the browser)&lt;br /&gt;
alert(localStorage.getItem('key'));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
&lt;br /&gt;
As part of our [http://github.com/servo/servo/wiki/Storage-student-project project], we have to implement the web storage specification in the Servo browser. 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. &amp;lt;ref&amp;gt; https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Requirement Analysis &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
In order to introduce the support for session storage and local storage in the Servo Broswer, we have to create the Storage structure and allow web pages to store data in the Servo memory space.&lt;br /&gt;
&lt;br /&gt;
Below is a high level overview of the various steps that have been planned for this project:&lt;br /&gt;
&lt;br /&gt;
* Create the Storage interface and its stub implementation.&lt;br /&gt;
* Create the WindowSessionStorage interface making it return a Storage instance.&lt;br /&gt;
* Create a Storage Task which will be used to contain all stored data.&lt;br /&gt;
* Define a message-passing interface for reading and writing stored data for a particular browser tab.&lt;br /&gt;
* Use the Storage task in the implementation of Storage.&lt;br /&gt;
* When the value of a stored data is changed, notify its respective browser tab.&lt;br /&gt;
* Pass as many [http://github.com/servo/web-platform-tests/tree/servo/webstorage tests] as possible.&lt;br /&gt;
* Implement the WindowLocalStorage interface which behaves slightly different from the WindowSessionStorage interface.&lt;br /&gt;
&lt;br /&gt;
== Architecture &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Design&amp;lt;/ref&amp;gt;==&lt;br /&gt;
&lt;br /&gt;
[[File:task.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Architecture Explained ===&lt;br /&gt;
*Each box represents a Rust task.&lt;br /&gt;
*Blue boxes represent the primary tasks in the browser pipeline.&lt;br /&gt;
*Gray boxes represent tasks auxiliary to the browser pipeline.&lt;br /&gt;
*White boxes represent worker tasks. Each such box represents several tasks, the precise number of which will vary with the workload.&lt;br /&gt;
*Dashed lines indicate supervisor relationships.&lt;br /&gt;
*Solid lines indicate communication channels.&lt;br /&gt;
&lt;br /&gt;
== Component Design ==&lt;br /&gt;
[[File:servo.jpg]]&lt;br /&gt;
&lt;br /&gt;
There will be 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.&lt;br /&gt;
&lt;br /&gt;
=== Task &amp;lt;ref&amp;gt;http://doc.rust-lang.org/guide-tasks.html&amp;lt;/ref&amp;gt;===&lt;br /&gt;
Rust provides safe concurrent abstractions through a number of core library primitives. This guide will describe the concurrency model in Rust, how it relates to the Rust type system, and introduce the fundamental library abstractions for constructing concurrent programs.&lt;br /&gt;
&lt;br /&gt;
Tasks provide failure isolation and recovery. When a fatal error occurs in Rust code as a result of an explicit call to panic!(), an assertion failure, or another invalid operation, the runtime system destroys the entire task. Unlike in languages such as Java and C++, there is no way to catch an exception. Instead, tasks may monitor each other to see if they panic.&lt;br /&gt;
&lt;br /&gt;
Tasks use Rust's type system to provide strong memory safety guarantees. In particular, the type system guarantees that tasks cannot induce a data race from shared mutable state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Generate some state locally&lt;br /&gt;
let child_task_number = generate_task_number();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    // Capture it in the remote task&lt;br /&gt;
    println!(&amp;quot;I am child number {}&amp;quot;, child_task_number);&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Channel &amp;lt;ref&amp;gt;http://doc.rust-lang.org/guide-tasks.html&amp;lt;/ref&amp;gt;===&lt;br /&gt;
Now that we have spawned a new task, it would be nice if we could communicate with it. For this, we use channels. A channel is simply a pair of endpoints: one for sending messages and another for receiving messages.&lt;br /&gt;
&lt;br /&gt;
The simplest way to create a channel is to use the channel function to create a (Sender, Receiver) pair. In Rust parlance, a sender is a sending endpoint of a channel, and a receiver is the receiving endpoint. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
let (tx, rx): (Sender&amp;lt;int&amp;gt;, Receiver&amp;lt;int&amp;gt;) = channel();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    let result = some_expensive_computation();&lt;br /&gt;
    tx.send(result);&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
some_other_expensive_computation();&lt;br /&gt;
let result = rx.recv();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Data Design ==&lt;br /&gt;
&lt;br /&gt;
===  Data Description ===&lt;br /&gt;
&lt;br /&gt;
''The following are the data structures that will be used.''&lt;br /&gt;
&lt;br /&gt;
'''Storage''' | TreeMap&amp;lt;String,String&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''UrlMap''' | TreeMap&amp;lt;String,TreeMap&amp;lt;String,String&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design Pattern ==&lt;br /&gt;
&lt;br /&gt;
We will be using &amp;quot;Delegation Pattern&amp;quot; in our project. The Storage interface is used by web applications to access the web storage provided by the browser. However, the actual data is stored somewhere else(Servo Memory Space). So, it makes sense to create another class which will maintain the actual stored data. The Storage class can then delegate the task of storing/retrieving data to this class. We will create a class &amp;quot;WebStorageTask&amp;quot; for this purpose.&lt;br /&gt;
&lt;br /&gt;
== UML Diagrams ==&lt;br /&gt;
&lt;br /&gt;
Flow Chart&lt;br /&gt;
[[File:Flow_Chart_Storage.png|left]] [[File:Use_Case_Storage.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
asdfasd&lt;br /&gt;
Question 3: Does the design incorporate all of the functionality required? (See http://courses.ncsu.edu/csc517/common/homework/project/ideas.html?) [Or, if this is a project idea submitted by students, does the design document clearly explain the required functionality?]&lt;br /&gt;
Question 3: Does the design incorporate all of the functionality required? (See http://courses.ncsu.edu/csc517/common/homework/project/ideas.html?) [Or, if this is a project idea submitted by students, does the design document clearly explain the required functionality?]&lt;br /&gt;
Question 3: Does the design incorporate all of the functionality required? (See http://courses.ncsu.edu/csc517/common/homework/project/ideas.html?) [Or, if this is a project idea submitted by students, does the design document clearly explain the required functionality?]&lt;br /&gt;
Question 3: Does the design incorporate all of the functionality required? (See http://courses.ncsu.edu/csc517/common/homework/project/ideas.html?) [Or, if this is a project idea submitted by students, does the design document clearly explain the required functionality?]&lt;br /&gt;
Question 3: Does the design incorporate all of the functionality required? (See http://courses.ncsu.edu/csc517/common/homework/project/ideas.html?) [Or, if this is a project idea submitted by students, does the design document clearly explain the required functionality?]&lt;br /&gt;
&lt;br /&gt;
== Proposed Test Cases ==&lt;br /&gt;
&lt;br /&gt;
Some of the test cases which will be used to validate our changes are as follows:&lt;br /&gt;
&lt;br /&gt;
* Allow a web page to clear its session storage&lt;br /&gt;
* Allow a web page to store an item in its session storage&lt;br /&gt;
* Allow a web page to retrieve stored items from its session storage&lt;br /&gt;
* Do not allow a web page to retrieve stored items from the session storage of a web page in another domain&lt;br /&gt;
* Check the number of items stored in session storage&lt;br /&gt;
* On removing an item from storage, it should be inaccessible&lt;br /&gt;
* Should return null as value for a key not present in the session storage&lt;br /&gt;
* Should give an error on exceeding the space limit of session storage&lt;br /&gt;
&lt;br /&gt;
The complete list of test cases can be found [http://github.com/servo/web-platform-tests/tree/servo/webstorage here].&lt;br /&gt;
&lt;br /&gt;
== Further Readings ==&lt;br /&gt;
&lt;br /&gt;
Learning Rust by Examples: http://rustbyexample.com/ &amp;lt;br/&amp;gt;&lt;br /&gt;
Javascript as Servo's Garbage Collector: http://blog.mozilla.org/research/2014/08/26/javascript-servos-only-garbage-collector/  &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vankam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=92118</id>
		<title>CSC/ECE 517 Fall 2014/final design doc M1450 navr</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=92118"/>
		<updated>2014-11-18T02:44:01Z</updated>

		<summary type="html">&lt;p&gt;Vankam: /* UML Diagrams */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Implement Window.sessionStorage ==&lt;br /&gt;
&lt;br /&gt;
This is the design document for the task &amp;lt;code&amp;gt;[http://github.com/servo/servo/wiki/Storage-student-project Implement Window.sessionStorage]&amp;lt;/code&amp;gt; for the [http://www.mozilla.org/ Mozilla] research project [http://github.com/servo/servo/wiki/Design Servo].&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== [http://www.rust-lang.org/ Rust]===&lt;br /&gt;
&lt;br /&gt;
Rust is a modern systems programming language focusing on safety and speed to build reliable and efficient systems &amp;lt;ref&amp;gt; http://doc.rust-lang.org/nightly/intro.html &amp;lt;/ref&amp;gt;. It accomplishes the goals of memory safe without using garbage collection and it supports concurrency and parallelism in building platforms. &lt;br /&gt;
&lt;br /&gt;
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. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [http://github.com/servo/servo/wiki/Design Servo] ===&lt;br /&gt;
&lt;br /&gt;
Mozilla Research team is currently working on an experimental project to develop a new Web browser engine &amp;quot;Servo&amp;quot;, 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.&amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The main objectives of this experimentation project is improving the layout to graphics rendering - to optimize for power efficiency and maximize parallelism. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
&lt;br /&gt;
=== [http://html.spec.whatwg.org/multipage/webstorage.html#webstorage Web Storage] ===&lt;br /&gt;
The web storage specification defines the means by which a web application can store string key/value pairs in a browser and later retrieve them for use.&amp;lt;ref&amp;gt;https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Storage&amp;lt;/ref&amp;gt; It supports persistent data storage, similar to [http://en.wikipedia.org/wiki/HTTP_cookie cookies] but with a greatly enhanced capacity and no information stored in the [http://en.wikipedia.org/wiki/List_of_HTTP_headers HTTP request header].&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Web_storage&amp;lt;/ref&amp;gt; There are two types of web storage: [http://html.spec.whatwg.org/multipage/webstorage.html#dom-localstorage local storage] and [http://html.spec.whatwg.org/multipage/webstorage.html#dom-sessionstorage session storage].&lt;br /&gt;
&lt;br /&gt;
Browsers that support web storage have the global variables 'sessionStorage' and 'localStorage' declared at the [http://developer.mozilla.org/en-US/docs/Web/API/Window?redirectlocale=en-US&amp;amp;redirectslug=DOM%2Fwindow window] level. The following JavaScript code gives an example of how to use web storage:&lt;br /&gt;
&lt;br /&gt;
'''sessionStorage'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Store value on browser for duration of the session&lt;br /&gt;
sessionStorage.setItem('key', 'value');&lt;br /&gt;
 &lt;br /&gt;
// Retrieve value (gets deleted when browser is closed and re-opened)&lt;br /&gt;
alert(sessionStorage.getItem('key'));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''localStorage'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Store value on the browser beyond the duration of the session&lt;br /&gt;
localStorage.setItem('key', 'value');&lt;br /&gt;
 &lt;br /&gt;
// Retrieve value (persists even after closing and re-opening the browser)&lt;br /&gt;
alert(localStorage.getItem('key'));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
&lt;br /&gt;
As part of our [http://github.com/servo/servo/wiki/Storage-student-project project], we have to implement the web storage specification in the Servo browser. 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. &amp;lt;ref&amp;gt; https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Requirement Analysis &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
In order to introduce the support for session storage and local storage in the Servo Broswer, we have to create the Storage structure and allow web pages to store data in the Servo memory space.&lt;br /&gt;
&lt;br /&gt;
Below is a high level overview of the various steps that have been planned for this project:&lt;br /&gt;
&lt;br /&gt;
* Create the Storage interface and its stub implementation.&lt;br /&gt;
* Create the WindowSessionStorage interface making it return a Storage instance.&lt;br /&gt;
* Create a Storage Task which will be used to contain all stored data.&lt;br /&gt;
* Define a message-passing interface for reading and writing stored data for a particular browser tab.&lt;br /&gt;
* Use the Storage task in the implementation of Storage.&lt;br /&gt;
* When the value of a stored data is changed, notify its respective browser tab.&lt;br /&gt;
* Pass as many [http://github.com/servo/web-platform-tests/tree/servo/webstorage tests] as possible.&lt;br /&gt;
* Implement the WindowLocalStorage interface which behaves slightly different from the WindowSessionStorage interface.&lt;br /&gt;
&lt;br /&gt;
== Architecture &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Design&amp;lt;/ref&amp;gt;==&lt;br /&gt;
&lt;br /&gt;
[[File:task.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Architecture Explained ===&lt;br /&gt;
*Each box represents a Rust task.&lt;br /&gt;
*Blue boxes represent the primary tasks in the browser pipeline.&lt;br /&gt;
*Gray boxes represent tasks auxiliary to the browser pipeline.&lt;br /&gt;
*White boxes represent worker tasks. Each such box represents several tasks, the precise number of which will vary with the workload.&lt;br /&gt;
*Dashed lines indicate supervisor relationships.&lt;br /&gt;
*Solid lines indicate communication channels.&lt;br /&gt;
&lt;br /&gt;
== Component Design ==&lt;br /&gt;
[[File:servo.jpg]]&lt;br /&gt;
&lt;br /&gt;
There will be 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.&lt;br /&gt;
&lt;br /&gt;
=== Task &amp;lt;ref&amp;gt;http://doc.rust-lang.org/guide-tasks.html&amp;lt;/ref&amp;gt;===&lt;br /&gt;
Rust provides safe concurrent abstractions through a number of core library primitives. This guide will describe the concurrency model in Rust, how it relates to the Rust type system, and introduce the fundamental library abstractions for constructing concurrent programs.&lt;br /&gt;
&lt;br /&gt;
Tasks provide failure isolation and recovery. When a fatal error occurs in Rust code as a result of an explicit call to panic!(), an assertion failure, or another invalid operation, the runtime system destroys the entire task. Unlike in languages such as Java and C++, there is no way to catch an exception. Instead, tasks may monitor each other to see if they panic.&lt;br /&gt;
&lt;br /&gt;
Tasks use Rust's type system to provide strong memory safety guarantees. In particular, the type system guarantees that tasks cannot induce a data race from shared mutable state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Generate some state locally&lt;br /&gt;
let child_task_number = generate_task_number();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    // Capture it in the remote task&lt;br /&gt;
    println!(&amp;quot;I am child number {}&amp;quot;, child_task_number);&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Channel &amp;lt;ref&amp;gt;http://doc.rust-lang.org/guide-tasks.html&amp;lt;/ref&amp;gt;===&lt;br /&gt;
Now that we have spawned a new task, it would be nice if we could communicate with it. For this, we use channels. A channel is simply a pair of endpoints: one for sending messages and another for receiving messages.&lt;br /&gt;
&lt;br /&gt;
The simplest way to create a channel is to use the channel function to create a (Sender, Receiver) pair. In Rust parlance, a sender is a sending endpoint of a channel, and a receiver is the receiving endpoint. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
let (tx, rx): (Sender&amp;lt;int&amp;gt;, Receiver&amp;lt;int&amp;gt;) = channel();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    let result = some_expensive_computation();&lt;br /&gt;
    tx.send(result);&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
some_other_expensive_computation();&lt;br /&gt;
let result = rx.recv();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Data Design ==&lt;br /&gt;
&lt;br /&gt;
===  Data Description ===&lt;br /&gt;
&lt;br /&gt;
''The following are the data structures that will be used.''&lt;br /&gt;
&lt;br /&gt;
'''Storage''' | TreeMap&amp;lt;String,String&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''UrlMap''' | TreeMap&amp;lt;String,TreeMap&amp;lt;String,String&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design Pattern ==&lt;br /&gt;
&lt;br /&gt;
We will be using &amp;quot;Delegation Pattern&amp;quot; in our project. The Storage interface is used by web applications to access the web storage provided by the browser. However, the actual data is stored somewhere else(Servo Memory Space). So, it makes sense to create another class which will maintain the actual stored data. The Storage class can then delegate the task of storing/retrieving data to this class. We will create a class &amp;quot;WebStorageTask&amp;quot; for this purpose.&lt;br /&gt;
&lt;br /&gt;
== UML Diagrams ==&lt;br /&gt;
&lt;br /&gt;
Flow Chart&lt;br /&gt;
[[File:Flow_Chart_Storage.png|left]] [[File:Use_Case_Storage.jpg|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
asdfasd&lt;br /&gt;
Question 3: Does the design incorporate all of the functionality required? (See http://courses.ncsu.edu/csc517/common/homework/project/ideas.html?) [Or, if this is a project idea submitted by students, does the design document clearly explain the required functionality?]&lt;br /&gt;
Question 3: Does the design incorporate all of the functionality required? (See http://courses.ncsu.edu/csc517/common/homework/project/ideas.html?) [Or, if this is a project idea submitted by students, does the design document clearly explain the required functionality?]&lt;br /&gt;
Question 3: Does the design incorporate all of the functionality required? (See http://courses.ncsu.edu/csc517/common/homework/project/ideas.html?) [Or, if this is a project idea submitted by students, does the design document clearly explain the required functionality?]&lt;br /&gt;
Question 3: Does the design incorporate all of the functionality required? (See http://courses.ncsu.edu/csc517/common/homework/project/ideas.html?) [Or, if this is a project idea submitted by students, does the design document clearly explain the required functionality?]&lt;br /&gt;
Question 3: Does the design incorporate all of the functionality required? (See http://courses.ncsu.edu/csc517/common/homework/project/ideas.html?) [Or, if this is a project idea submitted by students, does the design document clearly explain the required functionality?]&lt;br /&gt;
&lt;br /&gt;
== Proposed Test Cases ==&lt;br /&gt;
&lt;br /&gt;
Some of the test cases which will be used to validate our changes are as follows:&lt;br /&gt;
&lt;br /&gt;
* Allow a web page to clear its session storage&lt;br /&gt;
* Allow a web page to store an item in its session storage&lt;br /&gt;
* Allow a web page to retrieve stored items from its session storage&lt;br /&gt;
* Do not allow a web page to retrieve stored items from the session storage of a web page in another domain&lt;br /&gt;
* Check the number of items stored in session storage&lt;br /&gt;
* On removing an item from storage, it should be inaccessible&lt;br /&gt;
* Should return null as value for a key not present in the session storage&lt;br /&gt;
* Should give an error on exceeding the space limit of session storage&lt;br /&gt;
&lt;br /&gt;
The complete list of test cases can be found [http://github.com/servo/web-platform-tests/tree/servo/webstorage here].&lt;br /&gt;
&lt;br /&gt;
== Further Readings ==&lt;br /&gt;
&lt;br /&gt;
Learning Rust by Examples: http://rustbyexample.com/ &amp;lt;br/&amp;gt;&lt;br /&gt;
Javascript as Servo's Garbage Collector: http://blog.mozilla.org/research/2014/08/26/javascript-servos-only-garbage-collector/  &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vankam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=92117</id>
		<title>CSC/ECE 517 Fall 2014/final design doc M1450 navr</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=92117"/>
		<updated>2014-11-18T02:43:30Z</updated>

		<summary type="html">&lt;p&gt;Vankam: /* UML Diagrams */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Implement Window.sessionStorage ==&lt;br /&gt;
&lt;br /&gt;
This is the design document for the task &amp;lt;code&amp;gt;[http://github.com/servo/servo/wiki/Storage-student-project Implement Window.sessionStorage]&amp;lt;/code&amp;gt; for the [http://www.mozilla.org/ Mozilla] research project [http://github.com/servo/servo/wiki/Design Servo].&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== [http://www.rust-lang.org/ Rust]===&lt;br /&gt;
&lt;br /&gt;
Rust is a modern systems programming language focusing on safety and speed to build reliable and efficient systems &amp;lt;ref&amp;gt; http://doc.rust-lang.org/nightly/intro.html &amp;lt;/ref&amp;gt;. It accomplishes the goals of memory safe without using garbage collection and it supports concurrency and parallelism in building platforms. &lt;br /&gt;
&lt;br /&gt;
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. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [http://github.com/servo/servo/wiki/Design Servo] ===&lt;br /&gt;
&lt;br /&gt;
Mozilla Research team is currently working on an experimental project to develop a new Web browser engine &amp;quot;Servo&amp;quot;, 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.&amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The main objectives of this experimentation project is improving the layout to graphics rendering - to optimize for power efficiency and maximize parallelism. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
&lt;br /&gt;
=== [http://html.spec.whatwg.org/multipage/webstorage.html#webstorage Web Storage] ===&lt;br /&gt;
The web storage specification defines the means by which a web application can store string key/value pairs in a browser and later retrieve them for use.&amp;lt;ref&amp;gt;https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Storage&amp;lt;/ref&amp;gt; It supports persistent data storage, similar to [http://en.wikipedia.org/wiki/HTTP_cookie cookies] but with a greatly enhanced capacity and no information stored in the [http://en.wikipedia.org/wiki/List_of_HTTP_headers HTTP request header].&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Web_storage&amp;lt;/ref&amp;gt; There are two types of web storage: [http://html.spec.whatwg.org/multipage/webstorage.html#dom-localstorage local storage] and [http://html.spec.whatwg.org/multipage/webstorage.html#dom-sessionstorage session storage].&lt;br /&gt;
&lt;br /&gt;
Browsers that support web storage have the global variables 'sessionStorage' and 'localStorage' declared at the [http://developer.mozilla.org/en-US/docs/Web/API/Window?redirectlocale=en-US&amp;amp;redirectslug=DOM%2Fwindow window] level. The following JavaScript code gives an example of how to use web storage:&lt;br /&gt;
&lt;br /&gt;
'''sessionStorage'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Store value on browser for duration of the session&lt;br /&gt;
sessionStorage.setItem('key', 'value');&lt;br /&gt;
 &lt;br /&gt;
// Retrieve value (gets deleted when browser is closed and re-opened)&lt;br /&gt;
alert(sessionStorage.getItem('key'));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''localStorage'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Store value on the browser beyond the duration of the session&lt;br /&gt;
localStorage.setItem('key', 'value');&lt;br /&gt;
 &lt;br /&gt;
// Retrieve value (persists even after closing and re-opening the browser)&lt;br /&gt;
alert(localStorage.getItem('key'));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
&lt;br /&gt;
As part of our [http://github.com/servo/servo/wiki/Storage-student-project project], we have to implement the web storage specification in the Servo browser. 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. &amp;lt;ref&amp;gt; https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Requirement Analysis &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
In order to introduce the support for session storage and local storage in the Servo Broswer, we have to create the Storage structure and allow web pages to store data in the Servo memory space.&lt;br /&gt;
&lt;br /&gt;
Below is a high level overview of the various steps that have been planned for this project:&lt;br /&gt;
&lt;br /&gt;
* Create the Storage interface and its stub implementation.&lt;br /&gt;
* Create the WindowSessionStorage interface making it return a Storage instance.&lt;br /&gt;
* Create a Storage Task which will be used to contain all stored data.&lt;br /&gt;
* Define a message-passing interface for reading and writing stored data for a particular browser tab.&lt;br /&gt;
* Use the Storage task in the implementation of Storage.&lt;br /&gt;
* When the value of a stored data is changed, notify its respective browser tab.&lt;br /&gt;
* Pass as many [http://github.com/servo/web-platform-tests/tree/servo/webstorage tests] as possible.&lt;br /&gt;
* Implement the WindowLocalStorage interface which behaves slightly different from the WindowSessionStorage interface.&lt;br /&gt;
&lt;br /&gt;
== Architecture &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Design&amp;lt;/ref&amp;gt;==&lt;br /&gt;
&lt;br /&gt;
[[File:task.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Architecture Explained ===&lt;br /&gt;
*Each box represents a Rust task.&lt;br /&gt;
*Blue boxes represent the primary tasks in the browser pipeline.&lt;br /&gt;
*Gray boxes represent tasks auxiliary to the browser pipeline.&lt;br /&gt;
*White boxes represent worker tasks. Each such box represents several tasks, the precise number of which will vary with the workload.&lt;br /&gt;
*Dashed lines indicate supervisor relationships.&lt;br /&gt;
*Solid lines indicate communication channels.&lt;br /&gt;
&lt;br /&gt;
== Component Design ==&lt;br /&gt;
[[File:servo.jpg]]&lt;br /&gt;
&lt;br /&gt;
There will be 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.&lt;br /&gt;
&lt;br /&gt;
=== Task &amp;lt;ref&amp;gt;http://doc.rust-lang.org/guide-tasks.html&amp;lt;/ref&amp;gt;===&lt;br /&gt;
Rust provides safe concurrent abstractions through a number of core library primitives. This guide will describe the concurrency model in Rust, how it relates to the Rust type system, and introduce the fundamental library abstractions for constructing concurrent programs.&lt;br /&gt;
&lt;br /&gt;
Tasks provide failure isolation and recovery. When a fatal error occurs in Rust code as a result of an explicit call to panic!(), an assertion failure, or another invalid operation, the runtime system destroys the entire task. Unlike in languages such as Java and C++, there is no way to catch an exception. Instead, tasks may monitor each other to see if they panic.&lt;br /&gt;
&lt;br /&gt;
Tasks use Rust's type system to provide strong memory safety guarantees. In particular, the type system guarantees that tasks cannot induce a data race from shared mutable state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Generate some state locally&lt;br /&gt;
let child_task_number = generate_task_number();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    // Capture it in the remote task&lt;br /&gt;
    println!(&amp;quot;I am child number {}&amp;quot;, child_task_number);&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Channel &amp;lt;ref&amp;gt;http://doc.rust-lang.org/guide-tasks.html&amp;lt;/ref&amp;gt;===&lt;br /&gt;
Now that we have spawned a new task, it would be nice if we could communicate with it. For this, we use channels. A channel is simply a pair of endpoints: one for sending messages and another for receiving messages.&lt;br /&gt;
&lt;br /&gt;
The simplest way to create a channel is to use the channel function to create a (Sender, Receiver) pair. In Rust parlance, a sender is a sending endpoint of a channel, and a receiver is the receiving endpoint. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
let (tx, rx): (Sender&amp;lt;int&amp;gt;, Receiver&amp;lt;int&amp;gt;) = channel();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    let result = some_expensive_computation();&lt;br /&gt;
    tx.send(result);&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
some_other_expensive_computation();&lt;br /&gt;
let result = rx.recv();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Data Design ==&lt;br /&gt;
&lt;br /&gt;
===  Data Description ===&lt;br /&gt;
&lt;br /&gt;
''The following are the data structures that will be used.''&lt;br /&gt;
&lt;br /&gt;
'''Storage''' | TreeMap&amp;lt;String,String&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''UrlMap''' | TreeMap&amp;lt;String,TreeMap&amp;lt;String,String&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design Pattern ==&lt;br /&gt;
&lt;br /&gt;
We will be using &amp;quot;Delegation Pattern&amp;quot; in our project. The Storage interface is used by web applications to access the web storage provided by the browser. However, the actual data is stored somewhere else(Servo Memory Space). So, it makes sense to create another class which will maintain the actual stored data. The Storage class can then delegate the task of storing/retrieving data to this class. We will create a class &amp;quot;WebStorageTask&amp;quot; for this purpose.&lt;br /&gt;
&lt;br /&gt;
== UML Diagrams ==&lt;br /&gt;
&lt;br /&gt;
Flow Chart&lt;br /&gt;
[[File:Flow_Chart_Storage.png|left]]&lt;br /&gt;
Question 3: Does the design incorporate all of the functionality required? (See http://courses.ncsu.edu/csc517/common/homework/project/ideas.html?) [Or, if this is a project idea submitted by students, does the design document clearly explain the required functionality?]&lt;br /&gt;
Question 3: Does the design incorporate all of the functionality required? (See http://courses.ncsu.edu/csc517/common/homework/project/ideas.html?) [Or, if this is a project idea submitted by students, does the design document clearly explain the required functionality?]&lt;br /&gt;
Question 3: Does the design incorporate all of the functionality required? (See http://courses.ncsu.edu/csc517/common/homework/project/ideas.html?) [Or, if this is a project idea submitted by students, does the design document clearly explain the required functionality?][[File:Use_Case_Storage.jpg|right]]&lt;br /&gt;
&lt;br /&gt;
== Proposed Test Cases ==&lt;br /&gt;
&lt;br /&gt;
Some of the test cases which will be used to validate our changes are as follows:&lt;br /&gt;
&lt;br /&gt;
* Allow a web page to clear its session storage&lt;br /&gt;
* Allow a web page to store an item in its session storage&lt;br /&gt;
* Allow a web page to retrieve stored items from its session storage&lt;br /&gt;
* Do not allow a web page to retrieve stored items from the session storage of a web page in another domain&lt;br /&gt;
* Check the number of items stored in session storage&lt;br /&gt;
* On removing an item from storage, it should be inaccessible&lt;br /&gt;
* Should return null as value for a key not present in the session storage&lt;br /&gt;
* Should give an error on exceeding the space limit of session storage&lt;br /&gt;
&lt;br /&gt;
The complete list of test cases can be found [http://github.com/servo/web-platform-tests/tree/servo/webstorage here].&lt;br /&gt;
&lt;br /&gt;
== Further Readings ==&lt;br /&gt;
&lt;br /&gt;
Learning Rust by Examples: http://rustbyexample.com/ &amp;lt;br/&amp;gt;&lt;br /&gt;
Javascript as Servo's Garbage Collector: http://blog.mozilla.org/research/2014/08/26/javascript-servos-only-garbage-collector/  &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vankam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=92116</id>
		<title>CSC/ECE 517 Fall 2014/final design doc M1450 navr</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=92116"/>
		<updated>2014-11-18T02:42:59Z</updated>

		<summary type="html">&lt;p&gt;Vankam: /* UML Diagrams */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Implement Window.sessionStorage ==&lt;br /&gt;
&lt;br /&gt;
This is the design document for the task &amp;lt;code&amp;gt;[http://github.com/servo/servo/wiki/Storage-student-project Implement Window.sessionStorage]&amp;lt;/code&amp;gt; for the [http://www.mozilla.org/ Mozilla] research project [http://github.com/servo/servo/wiki/Design Servo].&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== [http://www.rust-lang.org/ Rust]===&lt;br /&gt;
&lt;br /&gt;
Rust is a modern systems programming language focusing on safety and speed to build reliable and efficient systems &amp;lt;ref&amp;gt; http://doc.rust-lang.org/nightly/intro.html &amp;lt;/ref&amp;gt;. It accomplishes the goals of memory safe without using garbage collection and it supports concurrency and parallelism in building platforms. &lt;br /&gt;
&lt;br /&gt;
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. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [http://github.com/servo/servo/wiki/Design Servo] ===&lt;br /&gt;
&lt;br /&gt;
Mozilla Research team is currently working on an experimental project to develop a new Web browser engine &amp;quot;Servo&amp;quot;, 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.&amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The main objectives of this experimentation project is improving the layout to graphics rendering - to optimize for power efficiency and maximize parallelism. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
&lt;br /&gt;
=== [http://html.spec.whatwg.org/multipage/webstorage.html#webstorage Web Storage] ===&lt;br /&gt;
The web storage specification defines the means by which a web application can store string key/value pairs in a browser and later retrieve them for use.&amp;lt;ref&amp;gt;https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Storage&amp;lt;/ref&amp;gt; It supports persistent data storage, similar to [http://en.wikipedia.org/wiki/HTTP_cookie cookies] but with a greatly enhanced capacity and no information stored in the [http://en.wikipedia.org/wiki/List_of_HTTP_headers HTTP request header].&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Web_storage&amp;lt;/ref&amp;gt; There are two types of web storage: [http://html.spec.whatwg.org/multipage/webstorage.html#dom-localstorage local storage] and [http://html.spec.whatwg.org/multipage/webstorage.html#dom-sessionstorage session storage].&lt;br /&gt;
&lt;br /&gt;
Browsers that support web storage have the global variables 'sessionStorage' and 'localStorage' declared at the [http://developer.mozilla.org/en-US/docs/Web/API/Window?redirectlocale=en-US&amp;amp;redirectslug=DOM%2Fwindow window] level. The following JavaScript code gives an example of how to use web storage:&lt;br /&gt;
&lt;br /&gt;
'''sessionStorage'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Store value on browser for duration of the session&lt;br /&gt;
sessionStorage.setItem('key', 'value');&lt;br /&gt;
 &lt;br /&gt;
// Retrieve value (gets deleted when browser is closed and re-opened)&lt;br /&gt;
alert(sessionStorage.getItem('key'));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''localStorage'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Store value on the browser beyond the duration of the session&lt;br /&gt;
localStorage.setItem('key', 'value');&lt;br /&gt;
 &lt;br /&gt;
// Retrieve value (persists even after closing and re-opening the browser)&lt;br /&gt;
alert(localStorage.getItem('key'));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
&lt;br /&gt;
As part of our [http://github.com/servo/servo/wiki/Storage-student-project project], we have to implement the web storage specification in the Servo browser. 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. &amp;lt;ref&amp;gt; https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Requirement Analysis &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
In order to introduce the support for session storage and local storage in the Servo Broswer, we have to create the Storage structure and allow web pages to store data in the Servo memory space.&lt;br /&gt;
&lt;br /&gt;
Below is a high level overview of the various steps that have been planned for this project:&lt;br /&gt;
&lt;br /&gt;
* Create the Storage interface and its stub implementation.&lt;br /&gt;
* Create the WindowSessionStorage interface making it return a Storage instance.&lt;br /&gt;
* Create a Storage Task which will be used to contain all stored data.&lt;br /&gt;
* Define a message-passing interface for reading and writing stored data for a particular browser tab.&lt;br /&gt;
* Use the Storage task in the implementation of Storage.&lt;br /&gt;
* When the value of a stored data is changed, notify its respective browser tab.&lt;br /&gt;
* Pass as many [http://github.com/servo/web-platform-tests/tree/servo/webstorage tests] as possible.&lt;br /&gt;
* Implement the WindowLocalStorage interface which behaves slightly different from the WindowSessionStorage interface.&lt;br /&gt;
&lt;br /&gt;
== Architecture &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Design&amp;lt;/ref&amp;gt;==&lt;br /&gt;
&lt;br /&gt;
[[File:task.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Architecture Explained ===&lt;br /&gt;
*Each box represents a Rust task.&lt;br /&gt;
*Blue boxes represent the primary tasks in the browser pipeline.&lt;br /&gt;
*Gray boxes represent tasks auxiliary to the browser pipeline.&lt;br /&gt;
*White boxes represent worker tasks. Each such box represents several tasks, the precise number of which will vary with the workload.&lt;br /&gt;
*Dashed lines indicate supervisor relationships.&lt;br /&gt;
*Solid lines indicate communication channels.&lt;br /&gt;
&lt;br /&gt;
== Component Design ==&lt;br /&gt;
[[File:servo.jpg]]&lt;br /&gt;
&lt;br /&gt;
There will be 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.&lt;br /&gt;
&lt;br /&gt;
=== Task &amp;lt;ref&amp;gt;http://doc.rust-lang.org/guide-tasks.html&amp;lt;/ref&amp;gt;===&lt;br /&gt;
Rust provides safe concurrent abstractions through a number of core library primitives. This guide will describe the concurrency model in Rust, how it relates to the Rust type system, and introduce the fundamental library abstractions for constructing concurrent programs.&lt;br /&gt;
&lt;br /&gt;
Tasks provide failure isolation and recovery. When a fatal error occurs in Rust code as a result of an explicit call to panic!(), an assertion failure, or another invalid operation, the runtime system destroys the entire task. Unlike in languages such as Java and C++, there is no way to catch an exception. Instead, tasks may monitor each other to see if they panic.&lt;br /&gt;
&lt;br /&gt;
Tasks use Rust's type system to provide strong memory safety guarantees. In particular, the type system guarantees that tasks cannot induce a data race from shared mutable state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Generate some state locally&lt;br /&gt;
let child_task_number = generate_task_number();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    // Capture it in the remote task&lt;br /&gt;
    println!(&amp;quot;I am child number {}&amp;quot;, child_task_number);&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Channel &amp;lt;ref&amp;gt;http://doc.rust-lang.org/guide-tasks.html&amp;lt;/ref&amp;gt;===&lt;br /&gt;
Now that we have spawned a new task, it would be nice if we could communicate with it. For this, we use channels. A channel is simply a pair of endpoints: one for sending messages and another for receiving messages.&lt;br /&gt;
&lt;br /&gt;
The simplest way to create a channel is to use the channel function to create a (Sender, Receiver) pair. In Rust parlance, a sender is a sending endpoint of a channel, and a receiver is the receiving endpoint. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
let (tx, rx): (Sender&amp;lt;int&amp;gt;, Receiver&amp;lt;int&amp;gt;) = channel();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    let result = some_expensive_computation();&lt;br /&gt;
    tx.send(result);&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
some_other_expensive_computation();&lt;br /&gt;
let result = rx.recv();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Data Design ==&lt;br /&gt;
&lt;br /&gt;
===  Data Description ===&lt;br /&gt;
&lt;br /&gt;
''The following are the data structures that will be used.''&lt;br /&gt;
&lt;br /&gt;
'''Storage''' | TreeMap&amp;lt;String,String&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''UrlMap''' | TreeMap&amp;lt;String,TreeMap&amp;lt;String,String&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design Pattern ==&lt;br /&gt;
&lt;br /&gt;
We will be using &amp;quot;Delegation Pattern&amp;quot; in our project. The Storage interface is used by web applications to access the web storage provided by the browser. However, the actual data is stored somewhere else(Servo Memory Space). So, it makes sense to create another class which will maintain the actual stored data. The Storage class can then delegate the task of storing/retrieving data to this class. We will create a class &amp;quot;WebStorageTask&amp;quot; for this purpose.&lt;br /&gt;
&lt;br /&gt;
== UML Diagrams ==&lt;br /&gt;
&lt;br /&gt;
Flow Chart&lt;br /&gt;
[[File:Flow_Chart_Storage.png|left]]Use Case [[File:Use_Case_Storage.jpg|right]]&lt;br /&gt;
&lt;br /&gt;
== Proposed Test Cases ==&lt;br /&gt;
&lt;br /&gt;
Some of the test cases which will be used to validate our changes are as follows:&lt;br /&gt;
&lt;br /&gt;
* Allow a web page to clear its session storage&lt;br /&gt;
* Allow a web page to store an item in its session storage&lt;br /&gt;
* Allow a web page to retrieve stored items from its session storage&lt;br /&gt;
* Do not allow a web page to retrieve stored items from the session storage of a web page in another domain&lt;br /&gt;
* Check the number of items stored in session storage&lt;br /&gt;
* On removing an item from storage, it should be inaccessible&lt;br /&gt;
* Should return null as value for a key not present in the session storage&lt;br /&gt;
* Should give an error on exceeding the space limit of session storage&lt;br /&gt;
&lt;br /&gt;
The complete list of test cases can be found [http://github.com/servo/web-platform-tests/tree/servo/webstorage here].&lt;br /&gt;
&lt;br /&gt;
== Further Readings ==&lt;br /&gt;
&lt;br /&gt;
Learning Rust by Examples: http://rustbyexample.com/ &amp;lt;br/&amp;gt;&lt;br /&gt;
Javascript as Servo's Garbage Collector: http://blog.mozilla.org/research/2014/08/26/javascript-servos-only-garbage-collector/  &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vankam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=92115</id>
		<title>CSC/ECE 517 Fall 2014/final design doc M1450 navr</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=92115"/>
		<updated>2014-11-18T02:42:16Z</updated>

		<summary type="html">&lt;p&gt;Vankam: /* UML Diagrams */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Implement Window.sessionStorage ==&lt;br /&gt;
&lt;br /&gt;
This is the design document for the task &amp;lt;code&amp;gt;[http://github.com/servo/servo/wiki/Storage-student-project Implement Window.sessionStorage]&amp;lt;/code&amp;gt; for the [http://www.mozilla.org/ Mozilla] research project [http://github.com/servo/servo/wiki/Design Servo].&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== [http://www.rust-lang.org/ Rust]===&lt;br /&gt;
&lt;br /&gt;
Rust is a modern systems programming language focusing on safety and speed to build reliable and efficient systems &amp;lt;ref&amp;gt; http://doc.rust-lang.org/nightly/intro.html &amp;lt;/ref&amp;gt;. It accomplishes the goals of memory safe without using garbage collection and it supports concurrency and parallelism in building platforms. &lt;br /&gt;
&lt;br /&gt;
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. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [http://github.com/servo/servo/wiki/Design Servo] ===&lt;br /&gt;
&lt;br /&gt;
Mozilla Research team is currently working on an experimental project to develop a new Web browser engine &amp;quot;Servo&amp;quot;, 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.&amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The main objectives of this experimentation project is improving the layout to graphics rendering - to optimize for power efficiency and maximize parallelism. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
&lt;br /&gt;
=== [http://html.spec.whatwg.org/multipage/webstorage.html#webstorage Web Storage] ===&lt;br /&gt;
The web storage specification defines the means by which a web application can store string key/value pairs in a browser and later retrieve them for use.&amp;lt;ref&amp;gt;https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Storage&amp;lt;/ref&amp;gt; It supports persistent data storage, similar to [http://en.wikipedia.org/wiki/HTTP_cookie cookies] but with a greatly enhanced capacity and no information stored in the [http://en.wikipedia.org/wiki/List_of_HTTP_headers HTTP request header].&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Web_storage&amp;lt;/ref&amp;gt; There are two types of web storage: [http://html.spec.whatwg.org/multipage/webstorage.html#dom-localstorage local storage] and [http://html.spec.whatwg.org/multipage/webstorage.html#dom-sessionstorage session storage].&lt;br /&gt;
&lt;br /&gt;
Browsers that support web storage have the global variables 'sessionStorage' and 'localStorage' declared at the [http://developer.mozilla.org/en-US/docs/Web/API/Window?redirectlocale=en-US&amp;amp;redirectslug=DOM%2Fwindow window] level. The following JavaScript code gives an example of how to use web storage:&lt;br /&gt;
&lt;br /&gt;
'''sessionStorage'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Store value on browser for duration of the session&lt;br /&gt;
sessionStorage.setItem('key', 'value');&lt;br /&gt;
 &lt;br /&gt;
// Retrieve value (gets deleted when browser is closed and re-opened)&lt;br /&gt;
alert(sessionStorage.getItem('key'));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''localStorage'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Store value on the browser beyond the duration of the session&lt;br /&gt;
localStorage.setItem('key', 'value');&lt;br /&gt;
 &lt;br /&gt;
// Retrieve value (persists even after closing and re-opening the browser)&lt;br /&gt;
alert(localStorage.getItem('key'));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
&lt;br /&gt;
As part of our [http://github.com/servo/servo/wiki/Storage-student-project project], we have to implement the web storage specification in the Servo browser. 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. &amp;lt;ref&amp;gt; https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Requirement Analysis &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
In order to introduce the support for session storage and local storage in the Servo Broswer, we have to create the Storage structure and allow web pages to store data in the Servo memory space.&lt;br /&gt;
&lt;br /&gt;
Below is a high level overview of the various steps that have been planned for this project:&lt;br /&gt;
&lt;br /&gt;
* Create the Storage interface and its stub implementation.&lt;br /&gt;
* Create the WindowSessionStorage interface making it return a Storage instance.&lt;br /&gt;
* Create a Storage Task which will be used to contain all stored data.&lt;br /&gt;
* Define a message-passing interface for reading and writing stored data for a particular browser tab.&lt;br /&gt;
* Use the Storage task in the implementation of Storage.&lt;br /&gt;
* When the value of a stored data is changed, notify its respective browser tab.&lt;br /&gt;
* Pass as many [http://github.com/servo/web-platform-tests/tree/servo/webstorage tests] as possible.&lt;br /&gt;
* Implement the WindowLocalStorage interface which behaves slightly different from the WindowSessionStorage interface.&lt;br /&gt;
&lt;br /&gt;
== Architecture &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Design&amp;lt;/ref&amp;gt;==&lt;br /&gt;
&lt;br /&gt;
[[File:task.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Architecture Explained ===&lt;br /&gt;
*Each box represents a Rust task.&lt;br /&gt;
*Blue boxes represent the primary tasks in the browser pipeline.&lt;br /&gt;
*Gray boxes represent tasks auxiliary to the browser pipeline.&lt;br /&gt;
*White boxes represent worker tasks. Each such box represents several tasks, the precise number of which will vary with the workload.&lt;br /&gt;
*Dashed lines indicate supervisor relationships.&lt;br /&gt;
*Solid lines indicate communication channels.&lt;br /&gt;
&lt;br /&gt;
== Component Design ==&lt;br /&gt;
[[File:servo.jpg]]&lt;br /&gt;
&lt;br /&gt;
There will be 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.&lt;br /&gt;
&lt;br /&gt;
=== Task &amp;lt;ref&amp;gt;http://doc.rust-lang.org/guide-tasks.html&amp;lt;/ref&amp;gt;===&lt;br /&gt;
Rust provides safe concurrent abstractions through a number of core library primitives. This guide will describe the concurrency model in Rust, how it relates to the Rust type system, and introduce the fundamental library abstractions for constructing concurrent programs.&lt;br /&gt;
&lt;br /&gt;
Tasks provide failure isolation and recovery. When a fatal error occurs in Rust code as a result of an explicit call to panic!(), an assertion failure, or another invalid operation, the runtime system destroys the entire task. Unlike in languages such as Java and C++, there is no way to catch an exception. Instead, tasks may monitor each other to see if they panic.&lt;br /&gt;
&lt;br /&gt;
Tasks use Rust's type system to provide strong memory safety guarantees. In particular, the type system guarantees that tasks cannot induce a data race from shared mutable state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Generate some state locally&lt;br /&gt;
let child_task_number = generate_task_number();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    // Capture it in the remote task&lt;br /&gt;
    println!(&amp;quot;I am child number {}&amp;quot;, child_task_number);&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Channel &amp;lt;ref&amp;gt;http://doc.rust-lang.org/guide-tasks.html&amp;lt;/ref&amp;gt;===&lt;br /&gt;
Now that we have spawned a new task, it would be nice if we could communicate with it. For this, we use channels. A channel is simply a pair of endpoints: one for sending messages and another for receiving messages.&lt;br /&gt;
&lt;br /&gt;
The simplest way to create a channel is to use the channel function to create a (Sender, Receiver) pair. In Rust parlance, a sender is a sending endpoint of a channel, and a receiver is the receiving endpoint. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
let (tx, rx): (Sender&amp;lt;int&amp;gt;, Receiver&amp;lt;int&amp;gt;) = channel();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    let result = some_expensive_computation();&lt;br /&gt;
    tx.send(result);&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
some_other_expensive_computation();&lt;br /&gt;
let result = rx.recv();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Data Design ==&lt;br /&gt;
&lt;br /&gt;
===  Data Description ===&lt;br /&gt;
&lt;br /&gt;
''The following are the data structures that will be used.''&lt;br /&gt;
&lt;br /&gt;
'''Storage''' | TreeMap&amp;lt;String,String&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''UrlMap''' | TreeMap&amp;lt;String,TreeMap&amp;lt;String,String&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design Pattern ==&lt;br /&gt;
&lt;br /&gt;
We will be using &amp;quot;Delegation Pattern&amp;quot; in our project. The Storage interface is used by web applications to access the web storage provided by the browser. However, the actual data is stored somewhere else(Servo Memory Space). So, it makes sense to create another class which will maintain the actual stored data. The Storage class can then delegate the task of storing/retrieving data to this class. We will create a class &amp;quot;WebStorageTask&amp;quot; for this purpose.&lt;br /&gt;
&lt;br /&gt;
== UML Diagrams ==&lt;br /&gt;
&lt;br /&gt;
Flow Chart&lt;br /&gt;
[[File:Flow_Chart_Storage.png|left]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Use Case&lt;br /&gt;
[[File:Use_Case_Storage.jpg|right]]&lt;br /&gt;
&lt;br /&gt;
== Proposed Test Cases ==&lt;br /&gt;
&lt;br /&gt;
Some of the test cases which will be used to validate our changes are as follows:&lt;br /&gt;
&lt;br /&gt;
* Allow a web page to clear its session storage&lt;br /&gt;
* Allow a web page to store an item in its session storage&lt;br /&gt;
* Allow a web page to retrieve stored items from its session storage&lt;br /&gt;
* Do not allow a web page to retrieve stored items from the session storage of a web page in another domain&lt;br /&gt;
* Check the number of items stored in session storage&lt;br /&gt;
* On removing an item from storage, it should be inaccessible&lt;br /&gt;
* Should return null as value for a key not present in the session storage&lt;br /&gt;
* Should give an error on exceeding the space limit of session storage&lt;br /&gt;
&lt;br /&gt;
The complete list of test cases can be found [http://github.com/servo/web-platform-tests/tree/servo/webstorage here].&lt;br /&gt;
&lt;br /&gt;
== Further Readings ==&lt;br /&gt;
&lt;br /&gt;
Learning Rust by Examples: http://rustbyexample.com/ &amp;lt;br/&amp;gt;&lt;br /&gt;
Javascript as Servo's Garbage Collector: http://blog.mozilla.org/research/2014/08/26/javascript-servos-only-garbage-collector/  &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vankam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=92114</id>
		<title>CSC/ECE 517 Fall 2014/final design doc M1450 navr</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=92114"/>
		<updated>2014-11-18T02:41:54Z</updated>

		<summary type="html">&lt;p&gt;Vankam: /* UML Diagrams */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Implement Window.sessionStorage ==&lt;br /&gt;
&lt;br /&gt;
This is the design document for the task &amp;lt;code&amp;gt;[http://github.com/servo/servo/wiki/Storage-student-project Implement Window.sessionStorage]&amp;lt;/code&amp;gt; for the [http://www.mozilla.org/ Mozilla] research project [http://github.com/servo/servo/wiki/Design Servo].&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== [http://www.rust-lang.org/ Rust]===&lt;br /&gt;
&lt;br /&gt;
Rust is a modern systems programming language focusing on safety and speed to build reliable and efficient systems &amp;lt;ref&amp;gt; http://doc.rust-lang.org/nightly/intro.html &amp;lt;/ref&amp;gt;. It accomplishes the goals of memory safe without using garbage collection and it supports concurrency and parallelism in building platforms. &lt;br /&gt;
&lt;br /&gt;
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. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [http://github.com/servo/servo/wiki/Design Servo] ===&lt;br /&gt;
&lt;br /&gt;
Mozilla Research team is currently working on an experimental project to develop a new Web browser engine &amp;quot;Servo&amp;quot;, 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.&amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The main objectives of this experimentation project is improving the layout to graphics rendering - to optimize for power efficiency and maximize parallelism. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
&lt;br /&gt;
=== [http://html.spec.whatwg.org/multipage/webstorage.html#webstorage Web Storage] ===&lt;br /&gt;
The web storage specification defines the means by which a web application can store string key/value pairs in a browser and later retrieve them for use.&amp;lt;ref&amp;gt;https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Storage&amp;lt;/ref&amp;gt; It supports persistent data storage, similar to [http://en.wikipedia.org/wiki/HTTP_cookie cookies] but with a greatly enhanced capacity and no information stored in the [http://en.wikipedia.org/wiki/List_of_HTTP_headers HTTP request header].&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Web_storage&amp;lt;/ref&amp;gt; There are two types of web storage: [http://html.spec.whatwg.org/multipage/webstorage.html#dom-localstorage local storage] and [http://html.spec.whatwg.org/multipage/webstorage.html#dom-sessionstorage session storage].&lt;br /&gt;
&lt;br /&gt;
Browsers that support web storage have the global variables 'sessionStorage' and 'localStorage' declared at the [http://developer.mozilla.org/en-US/docs/Web/API/Window?redirectlocale=en-US&amp;amp;redirectslug=DOM%2Fwindow window] level. The following JavaScript code gives an example of how to use web storage:&lt;br /&gt;
&lt;br /&gt;
'''sessionStorage'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Store value on browser for duration of the session&lt;br /&gt;
sessionStorage.setItem('key', 'value');&lt;br /&gt;
 &lt;br /&gt;
// Retrieve value (gets deleted when browser is closed and re-opened)&lt;br /&gt;
alert(sessionStorage.getItem('key'));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''localStorage'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Store value on the browser beyond the duration of the session&lt;br /&gt;
localStorage.setItem('key', 'value');&lt;br /&gt;
 &lt;br /&gt;
// Retrieve value (persists even after closing and re-opening the browser)&lt;br /&gt;
alert(localStorage.getItem('key'));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
&lt;br /&gt;
As part of our [http://github.com/servo/servo/wiki/Storage-student-project project], we have to implement the web storage specification in the Servo browser. 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. &amp;lt;ref&amp;gt; https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Requirement Analysis &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
In order to introduce the support for session storage and local storage in the Servo Broswer, we have to create the Storage structure and allow web pages to store data in the Servo memory space.&lt;br /&gt;
&lt;br /&gt;
Below is a high level overview of the various steps that have been planned for this project:&lt;br /&gt;
&lt;br /&gt;
* Create the Storage interface and its stub implementation.&lt;br /&gt;
* Create the WindowSessionStorage interface making it return a Storage instance.&lt;br /&gt;
* Create a Storage Task which will be used to contain all stored data.&lt;br /&gt;
* Define a message-passing interface for reading and writing stored data for a particular browser tab.&lt;br /&gt;
* Use the Storage task in the implementation of Storage.&lt;br /&gt;
* When the value of a stored data is changed, notify its respective browser tab.&lt;br /&gt;
* Pass as many [http://github.com/servo/web-platform-tests/tree/servo/webstorage tests] as possible.&lt;br /&gt;
* Implement the WindowLocalStorage interface which behaves slightly different from the WindowSessionStorage interface.&lt;br /&gt;
&lt;br /&gt;
== Architecture &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Design&amp;lt;/ref&amp;gt;==&lt;br /&gt;
&lt;br /&gt;
[[File:task.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Architecture Explained ===&lt;br /&gt;
*Each box represents a Rust task.&lt;br /&gt;
*Blue boxes represent the primary tasks in the browser pipeline.&lt;br /&gt;
*Gray boxes represent tasks auxiliary to the browser pipeline.&lt;br /&gt;
*White boxes represent worker tasks. Each such box represents several tasks, the precise number of which will vary with the workload.&lt;br /&gt;
*Dashed lines indicate supervisor relationships.&lt;br /&gt;
*Solid lines indicate communication channels.&lt;br /&gt;
&lt;br /&gt;
== Component Design ==&lt;br /&gt;
[[File:servo.jpg]]&lt;br /&gt;
&lt;br /&gt;
There will be 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.&lt;br /&gt;
&lt;br /&gt;
=== Task &amp;lt;ref&amp;gt;http://doc.rust-lang.org/guide-tasks.html&amp;lt;/ref&amp;gt;===&lt;br /&gt;
Rust provides safe concurrent abstractions through a number of core library primitives. This guide will describe the concurrency model in Rust, how it relates to the Rust type system, and introduce the fundamental library abstractions for constructing concurrent programs.&lt;br /&gt;
&lt;br /&gt;
Tasks provide failure isolation and recovery. When a fatal error occurs in Rust code as a result of an explicit call to panic!(), an assertion failure, or another invalid operation, the runtime system destroys the entire task. Unlike in languages such as Java and C++, there is no way to catch an exception. Instead, tasks may monitor each other to see if they panic.&lt;br /&gt;
&lt;br /&gt;
Tasks use Rust's type system to provide strong memory safety guarantees. In particular, the type system guarantees that tasks cannot induce a data race from shared mutable state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Generate some state locally&lt;br /&gt;
let child_task_number = generate_task_number();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    // Capture it in the remote task&lt;br /&gt;
    println!(&amp;quot;I am child number {}&amp;quot;, child_task_number);&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Channel &amp;lt;ref&amp;gt;http://doc.rust-lang.org/guide-tasks.html&amp;lt;/ref&amp;gt;===&lt;br /&gt;
Now that we have spawned a new task, it would be nice if we could communicate with it. For this, we use channels. A channel is simply a pair of endpoints: one for sending messages and another for receiving messages.&lt;br /&gt;
&lt;br /&gt;
The simplest way to create a channel is to use the channel function to create a (Sender, Receiver) pair. In Rust parlance, a sender is a sending endpoint of a channel, and a receiver is the receiving endpoint. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
let (tx, rx): (Sender&amp;lt;int&amp;gt;, Receiver&amp;lt;int&amp;gt;) = channel();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    let result = some_expensive_computation();&lt;br /&gt;
    tx.send(result);&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
some_other_expensive_computation();&lt;br /&gt;
let result = rx.recv();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Data Design ==&lt;br /&gt;
&lt;br /&gt;
===  Data Description ===&lt;br /&gt;
&lt;br /&gt;
''The following are the data structures that will be used.''&lt;br /&gt;
&lt;br /&gt;
'''Storage''' | TreeMap&amp;lt;String,String&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''UrlMap''' | TreeMap&amp;lt;String,TreeMap&amp;lt;String,String&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design Pattern ==&lt;br /&gt;
&lt;br /&gt;
We will be using &amp;quot;Delegation Pattern&amp;quot; in our project. The Storage interface is used by web applications to access the web storage provided by the browser. However, the actual data is stored somewhere else(Servo Memory Space). So, it makes sense to create another class which will maintain the actual stored data. The Storage class can then delegate the task of storing/retrieving data to this class. We will create a class &amp;quot;WebStorageTask&amp;quot; for this purpose.&lt;br /&gt;
&lt;br /&gt;
== UML Diagrams ==&lt;br /&gt;
&lt;br /&gt;
Flow Chart&lt;br /&gt;
[[File:Flow_Chart_Storage.png|left]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
adfasdfasdf&lt;br /&gt;
dsfasdf&lt;br /&gt;
adsf&lt;br /&gt;
asdf&lt;br /&gt;
asdf&lt;br /&gt;
adsf&lt;br /&gt;
asdfa&lt;br /&gt;
asdfasdfasdfasdfasdf&lt;br /&gt;
adsfasdf&lt;br /&gt;
adsf&lt;br /&gt;
asdf&lt;br /&gt;
asdf&lt;br /&gt;
adsf&lt;br /&gt;
asdfaasdfasdfasdfasdfasdf&lt;br /&gt;
adsfasdf&lt;br /&gt;
adsf&lt;br /&gt;
asdf&lt;br /&gt;
asdf&lt;br /&gt;
adsf&lt;br /&gt;
asdfaasdfasdfasdfasdfasdf&lt;br /&gt;
adsfasdf&lt;br /&gt;
adsf&lt;br /&gt;
asdf&lt;br /&gt;
asdf&lt;br /&gt;
adsf&lt;br /&gt;
asdfaasdfasdfasdfasdfasdf&lt;br /&gt;
adsfasdf&lt;br /&gt;
adsf&lt;br /&gt;
asdf&lt;br /&gt;
asdf&lt;br /&gt;
adsf&lt;br /&gt;
asdfaasdfasdfasdfasdfasdf&lt;br /&gt;
adsfasdf&lt;br /&gt;
adsf&lt;br /&gt;
asdf&lt;br /&gt;
asdf&lt;br /&gt;
adsf&lt;br /&gt;
asdfaasdfasdfasdfasdfasdf&lt;br /&gt;
adsfasdf&lt;br /&gt;
adsf&lt;br /&gt;
asdf&lt;br /&gt;
asdf&lt;br /&gt;
adsf&lt;br /&gt;
asdfaasdfasdfasdfasdfasdf&lt;br /&gt;
adsfasdf&lt;br /&gt;
adsf&lt;br /&gt;
asdf&lt;br /&gt;
asdf&lt;br /&gt;
adsf&lt;br /&gt;
asdfaasdfasdfasdfasdfasdf&lt;br /&gt;
adsfasdf&lt;br /&gt;
adsf&lt;br /&gt;
asdf&lt;br /&gt;
asdf&lt;br /&gt;
adsf&lt;br /&gt;
asdfaasdfasdfasdfasdfasdf&lt;br /&gt;
adsfasdf&lt;br /&gt;
adsf&lt;br /&gt;
asdf&lt;br /&gt;
asdf&lt;br /&gt;
adsf&lt;br /&gt;
asdfaasdfasdfasdfasdfasdf&lt;br /&gt;
adsfasdf&lt;br /&gt;
adsf&lt;br /&gt;
asdf&lt;br /&gt;
asdf&lt;br /&gt;
adsf&lt;br /&gt;
asdfaasdfasdfasdfasdfasdf&lt;br /&gt;
adsfasdf&lt;br /&gt;
adsf&lt;br /&gt;
asdf&lt;br /&gt;
asdf&lt;br /&gt;
adsf&lt;br /&gt;
asdfaasdfasdfasdfasdfasdf&lt;br /&gt;
adsfasdf&lt;br /&gt;
adsf&lt;br /&gt;
asdf&lt;br /&gt;
asdf&lt;br /&gt;
adsf&lt;br /&gt;
asdfaasdfasdfasdfasdfasdf&lt;br /&gt;
adsfasdf&lt;br /&gt;
adsf&lt;br /&gt;
asdf&lt;br /&gt;
asdf&lt;br /&gt;
adsf&lt;br /&gt;
asdfaasdfasdfasdfasdfasdf&lt;br /&gt;
adsfasdf&lt;br /&gt;
adsf&lt;br /&gt;
asdf&lt;br /&gt;
asdf&lt;br /&gt;
adsf&lt;br /&gt;
asdfaasdfasdfasdfasdfasdf&lt;br /&gt;
adsfasdf&lt;br /&gt;
adsf&lt;br /&gt;
asdf&lt;br /&gt;
asdf&lt;br /&gt;
adsf&lt;br /&gt;
asdfaasdfasdfasdfasdfasdf&lt;br /&gt;
adsfasdf&lt;br /&gt;
adsf&lt;br /&gt;
asdf&lt;br /&gt;
asdf&lt;br /&gt;
adsf&lt;br /&gt;
asdfa&lt;br /&gt;
&lt;br /&gt;
Use Case&lt;br /&gt;
[[File:Use_Case_Storage.jpg|right]]&lt;br /&gt;
&lt;br /&gt;
== Proposed Test Cases ==&lt;br /&gt;
&lt;br /&gt;
Some of the test cases which will be used to validate our changes are as follows:&lt;br /&gt;
&lt;br /&gt;
* Allow a web page to clear its session storage&lt;br /&gt;
* Allow a web page to store an item in its session storage&lt;br /&gt;
* Allow a web page to retrieve stored items from its session storage&lt;br /&gt;
* Do not allow a web page to retrieve stored items from the session storage of a web page in another domain&lt;br /&gt;
* Check the number of items stored in session storage&lt;br /&gt;
* On removing an item from storage, it should be inaccessible&lt;br /&gt;
* Should return null as value for a key not present in the session storage&lt;br /&gt;
* Should give an error on exceeding the space limit of session storage&lt;br /&gt;
&lt;br /&gt;
The complete list of test cases can be found [http://github.com/servo/web-platform-tests/tree/servo/webstorage here].&lt;br /&gt;
&lt;br /&gt;
== Further Readings ==&lt;br /&gt;
&lt;br /&gt;
Learning Rust by Examples: http://rustbyexample.com/ &amp;lt;br/&amp;gt;&lt;br /&gt;
Javascript as Servo's Garbage Collector: http://blog.mozilla.org/research/2014/08/26/javascript-servos-only-garbage-collector/  &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vankam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=92113</id>
		<title>CSC/ECE 517 Fall 2014/final design doc M1450 navr</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=92113"/>
		<updated>2014-11-18T02:41:26Z</updated>

		<summary type="html">&lt;p&gt;Vankam: /* UML Diagrams */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Implement Window.sessionStorage ==&lt;br /&gt;
&lt;br /&gt;
This is the design document for the task &amp;lt;code&amp;gt;[http://github.com/servo/servo/wiki/Storage-student-project Implement Window.sessionStorage]&amp;lt;/code&amp;gt; for the [http://www.mozilla.org/ Mozilla] research project [http://github.com/servo/servo/wiki/Design Servo].&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== [http://www.rust-lang.org/ Rust]===&lt;br /&gt;
&lt;br /&gt;
Rust is a modern systems programming language focusing on safety and speed to build reliable and efficient systems &amp;lt;ref&amp;gt; http://doc.rust-lang.org/nightly/intro.html &amp;lt;/ref&amp;gt;. It accomplishes the goals of memory safe without using garbage collection and it supports concurrency and parallelism in building platforms. &lt;br /&gt;
&lt;br /&gt;
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. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [http://github.com/servo/servo/wiki/Design Servo] ===&lt;br /&gt;
&lt;br /&gt;
Mozilla Research team is currently working on an experimental project to develop a new Web browser engine &amp;quot;Servo&amp;quot;, 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.&amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The main objectives of this experimentation project is improving the layout to graphics rendering - to optimize for power efficiency and maximize parallelism. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
&lt;br /&gt;
=== [http://html.spec.whatwg.org/multipage/webstorage.html#webstorage Web Storage] ===&lt;br /&gt;
The web storage specification defines the means by which a web application can store string key/value pairs in a browser and later retrieve them for use.&amp;lt;ref&amp;gt;https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Storage&amp;lt;/ref&amp;gt; It supports persistent data storage, similar to [http://en.wikipedia.org/wiki/HTTP_cookie cookies] but with a greatly enhanced capacity and no information stored in the [http://en.wikipedia.org/wiki/List_of_HTTP_headers HTTP request header].&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Web_storage&amp;lt;/ref&amp;gt; There are two types of web storage: [http://html.spec.whatwg.org/multipage/webstorage.html#dom-localstorage local storage] and [http://html.spec.whatwg.org/multipage/webstorage.html#dom-sessionstorage session storage].&lt;br /&gt;
&lt;br /&gt;
Browsers that support web storage have the global variables 'sessionStorage' and 'localStorage' declared at the [http://developer.mozilla.org/en-US/docs/Web/API/Window?redirectlocale=en-US&amp;amp;redirectslug=DOM%2Fwindow window] level. The following JavaScript code gives an example of how to use web storage:&lt;br /&gt;
&lt;br /&gt;
'''sessionStorage'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Store value on browser for duration of the session&lt;br /&gt;
sessionStorage.setItem('key', 'value');&lt;br /&gt;
 &lt;br /&gt;
// Retrieve value (gets deleted when browser is closed and re-opened)&lt;br /&gt;
alert(sessionStorage.getItem('key'));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''localStorage'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Store value on the browser beyond the duration of the session&lt;br /&gt;
localStorage.setItem('key', 'value');&lt;br /&gt;
 &lt;br /&gt;
// Retrieve value (persists even after closing and re-opening the browser)&lt;br /&gt;
alert(localStorage.getItem('key'));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
&lt;br /&gt;
As part of our [http://github.com/servo/servo/wiki/Storage-student-project project], we have to implement the web storage specification in the Servo browser. 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. &amp;lt;ref&amp;gt; https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Requirement Analysis &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
In order to introduce the support for session storage and local storage in the Servo Broswer, we have to create the Storage structure and allow web pages to store data in the Servo memory space.&lt;br /&gt;
&lt;br /&gt;
Below is a high level overview of the various steps that have been planned for this project:&lt;br /&gt;
&lt;br /&gt;
* Create the Storage interface and its stub implementation.&lt;br /&gt;
* Create the WindowSessionStorage interface making it return a Storage instance.&lt;br /&gt;
* Create a Storage Task which will be used to contain all stored data.&lt;br /&gt;
* Define a message-passing interface for reading and writing stored data for a particular browser tab.&lt;br /&gt;
* Use the Storage task in the implementation of Storage.&lt;br /&gt;
* When the value of a stored data is changed, notify its respective browser tab.&lt;br /&gt;
* Pass as many [http://github.com/servo/web-platform-tests/tree/servo/webstorage tests] as possible.&lt;br /&gt;
* Implement the WindowLocalStorage interface which behaves slightly different from the WindowSessionStorage interface.&lt;br /&gt;
&lt;br /&gt;
== Architecture &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Design&amp;lt;/ref&amp;gt;==&lt;br /&gt;
&lt;br /&gt;
[[File:task.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Architecture Explained ===&lt;br /&gt;
*Each box represents a Rust task.&lt;br /&gt;
*Blue boxes represent the primary tasks in the browser pipeline.&lt;br /&gt;
*Gray boxes represent tasks auxiliary to the browser pipeline.&lt;br /&gt;
*White boxes represent worker tasks. Each such box represents several tasks, the precise number of which will vary with the workload.&lt;br /&gt;
*Dashed lines indicate supervisor relationships.&lt;br /&gt;
*Solid lines indicate communication channels.&lt;br /&gt;
&lt;br /&gt;
== Component Design ==&lt;br /&gt;
[[File:servo.jpg]]&lt;br /&gt;
&lt;br /&gt;
There will be 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.&lt;br /&gt;
&lt;br /&gt;
=== Task &amp;lt;ref&amp;gt;http://doc.rust-lang.org/guide-tasks.html&amp;lt;/ref&amp;gt;===&lt;br /&gt;
Rust provides safe concurrent abstractions through a number of core library primitives. This guide will describe the concurrency model in Rust, how it relates to the Rust type system, and introduce the fundamental library abstractions for constructing concurrent programs.&lt;br /&gt;
&lt;br /&gt;
Tasks provide failure isolation and recovery. When a fatal error occurs in Rust code as a result of an explicit call to panic!(), an assertion failure, or another invalid operation, the runtime system destroys the entire task. Unlike in languages such as Java and C++, there is no way to catch an exception. Instead, tasks may monitor each other to see if they panic.&lt;br /&gt;
&lt;br /&gt;
Tasks use Rust's type system to provide strong memory safety guarantees. In particular, the type system guarantees that tasks cannot induce a data race from shared mutable state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Generate some state locally&lt;br /&gt;
let child_task_number = generate_task_number();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    // Capture it in the remote task&lt;br /&gt;
    println!(&amp;quot;I am child number {}&amp;quot;, child_task_number);&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Channel &amp;lt;ref&amp;gt;http://doc.rust-lang.org/guide-tasks.html&amp;lt;/ref&amp;gt;===&lt;br /&gt;
Now that we have spawned a new task, it would be nice if we could communicate with it. For this, we use channels. A channel is simply a pair of endpoints: one for sending messages and another for receiving messages.&lt;br /&gt;
&lt;br /&gt;
The simplest way to create a channel is to use the channel function to create a (Sender, Receiver) pair. In Rust parlance, a sender is a sending endpoint of a channel, and a receiver is the receiving endpoint. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
let (tx, rx): (Sender&amp;lt;int&amp;gt;, Receiver&amp;lt;int&amp;gt;) = channel();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    let result = some_expensive_computation();&lt;br /&gt;
    tx.send(result);&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
some_other_expensive_computation();&lt;br /&gt;
let result = rx.recv();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Data Design ==&lt;br /&gt;
&lt;br /&gt;
===  Data Description ===&lt;br /&gt;
&lt;br /&gt;
''The following are the data structures that will be used.''&lt;br /&gt;
&lt;br /&gt;
'''Storage''' | TreeMap&amp;lt;String,String&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''UrlMap''' | TreeMap&amp;lt;String,TreeMap&amp;lt;String,String&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design Pattern ==&lt;br /&gt;
&lt;br /&gt;
We will be using &amp;quot;Delegation Pattern&amp;quot; in our project. The Storage interface is used by web applications to access the web storage provided by the browser. However, the actual data is stored somewhere else(Servo Memory Space). So, it makes sense to create another class which will maintain the actual stored data. The Storage class can then delegate the task of storing/retrieving data to this class. We will create a class &amp;quot;WebStorageTask&amp;quot; for this purpose.&lt;br /&gt;
&lt;br /&gt;
== UML Diagrams ==&lt;br /&gt;
&lt;br /&gt;
Flow Chart&lt;br /&gt;
[[File:Flow_Chart_Storage.png|left]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
adfasdfasdf&lt;br /&gt;
dsfasdf&lt;br /&gt;
adsf&lt;br /&gt;
asdf&lt;br /&gt;
asdf&lt;br /&gt;
adsf&lt;br /&gt;
asdfa&lt;br /&gt;
asdfasdfasdfasdfasdf&lt;br /&gt;
adsfasdf&lt;br /&gt;
adsf&lt;br /&gt;
asdf&lt;br /&gt;
asdf&lt;br /&gt;
adsf&lt;br /&gt;
asdfaasdfasdfasdfasdfasdf&lt;br /&gt;
adsfasdf&lt;br /&gt;
adsf&lt;br /&gt;
asdf&lt;br /&gt;
asdf&lt;br /&gt;
adsf&lt;br /&gt;
asdfa&lt;br /&gt;
&lt;br /&gt;
Use Case&lt;br /&gt;
[[File:Use_Case_Storage.jpg|right]]&lt;br /&gt;
&lt;br /&gt;
== Proposed Test Cases ==&lt;br /&gt;
&lt;br /&gt;
Some of the test cases which will be used to validate our changes are as follows:&lt;br /&gt;
&lt;br /&gt;
* Allow a web page to clear its session storage&lt;br /&gt;
* Allow a web page to store an item in its session storage&lt;br /&gt;
* Allow a web page to retrieve stored items from its session storage&lt;br /&gt;
* Do not allow a web page to retrieve stored items from the session storage of a web page in another domain&lt;br /&gt;
* Check the number of items stored in session storage&lt;br /&gt;
* On removing an item from storage, it should be inaccessible&lt;br /&gt;
* Should return null as value for a key not present in the session storage&lt;br /&gt;
* Should give an error on exceeding the space limit of session storage&lt;br /&gt;
&lt;br /&gt;
The complete list of test cases can be found [http://github.com/servo/web-platform-tests/tree/servo/webstorage here].&lt;br /&gt;
&lt;br /&gt;
== Further Readings ==&lt;br /&gt;
&lt;br /&gt;
Learning Rust by Examples: http://rustbyexample.com/ &amp;lt;br/&amp;gt;&lt;br /&gt;
Javascript as Servo's Garbage Collector: http://blog.mozilla.org/research/2014/08/26/javascript-servos-only-garbage-collector/  &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vankam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=92112</id>
		<title>CSC/ECE 517 Fall 2014/final design doc M1450 navr</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=92112"/>
		<updated>2014-11-18T02:34:14Z</updated>

		<summary type="html">&lt;p&gt;Vankam: /* UML Diagrams */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Implement Window.sessionStorage ==&lt;br /&gt;
&lt;br /&gt;
This is the design document for the task &amp;lt;code&amp;gt;[http://github.com/servo/servo/wiki/Storage-student-project Implement Window.sessionStorage]&amp;lt;/code&amp;gt; for the [http://www.mozilla.org/ Mozilla] research project [http://github.com/servo/servo/wiki/Design Servo].&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== [http://www.rust-lang.org/ Rust]===&lt;br /&gt;
&lt;br /&gt;
Rust is a modern systems programming language focusing on safety and speed to build reliable and efficient systems &amp;lt;ref&amp;gt; http://doc.rust-lang.org/nightly/intro.html &amp;lt;/ref&amp;gt;. It accomplishes the goals of memory safe without using garbage collection and it supports concurrency and parallelism in building platforms. &lt;br /&gt;
&lt;br /&gt;
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. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [http://github.com/servo/servo/wiki/Design Servo] ===&lt;br /&gt;
&lt;br /&gt;
Mozilla Research team is currently working on an experimental project to develop a new Web browser engine &amp;quot;Servo&amp;quot;, 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.&amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The main objectives of this experimentation project is improving the layout to graphics rendering - to optimize for power efficiency and maximize parallelism. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
&lt;br /&gt;
=== [http://html.spec.whatwg.org/multipage/webstorage.html#webstorage Web Storage] ===&lt;br /&gt;
The web storage specification defines the means by which a web application can store string key/value pairs in a browser and later retrieve them for use.&amp;lt;ref&amp;gt;https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Storage&amp;lt;/ref&amp;gt; It supports persistent data storage, similar to [http://en.wikipedia.org/wiki/HTTP_cookie cookies] but with a greatly enhanced capacity and no information stored in the [http://en.wikipedia.org/wiki/List_of_HTTP_headers HTTP request header].&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Web_storage&amp;lt;/ref&amp;gt; There are two types of web storage: [http://html.spec.whatwg.org/multipage/webstorage.html#dom-localstorage local storage] and [http://html.spec.whatwg.org/multipage/webstorage.html#dom-sessionstorage session storage].&lt;br /&gt;
&lt;br /&gt;
Browsers that support web storage have the global variables 'sessionStorage' and 'localStorage' declared at the [http://developer.mozilla.org/en-US/docs/Web/API/Window?redirectlocale=en-US&amp;amp;redirectslug=DOM%2Fwindow window] level. The following JavaScript code gives an example of how to use web storage:&lt;br /&gt;
&lt;br /&gt;
'''sessionStorage'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Store value on browser for duration of the session&lt;br /&gt;
sessionStorage.setItem('key', 'value');&lt;br /&gt;
 &lt;br /&gt;
// Retrieve value (gets deleted when browser is closed and re-opened)&lt;br /&gt;
alert(sessionStorage.getItem('key'));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''localStorage'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Store value on the browser beyond the duration of the session&lt;br /&gt;
localStorage.setItem('key', 'value');&lt;br /&gt;
 &lt;br /&gt;
// Retrieve value (persists even after closing and re-opening the browser)&lt;br /&gt;
alert(localStorage.getItem('key'));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
&lt;br /&gt;
As part of our [http://github.com/servo/servo/wiki/Storage-student-project project], we have to implement the web storage specification in the Servo browser. 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. &amp;lt;ref&amp;gt; https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Requirement Analysis &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
In order to introduce the support for session storage and local storage in the Servo Broswer, we have to create the Storage structure and allow web pages to store data in the Servo memory space.&lt;br /&gt;
&lt;br /&gt;
Below is a high level overview of the various steps that have been planned for this project:&lt;br /&gt;
&lt;br /&gt;
* Create the Storage interface and its stub implementation.&lt;br /&gt;
* Create the WindowSessionStorage interface making it return a Storage instance.&lt;br /&gt;
* Create a Storage Task which will be used to contain all stored data.&lt;br /&gt;
* Define a message-passing interface for reading and writing stored data for a particular browser tab.&lt;br /&gt;
* Use the Storage task in the implementation of Storage.&lt;br /&gt;
* When the value of a stored data is changed, notify its respective browser tab.&lt;br /&gt;
* Pass as many [http://github.com/servo/web-platform-tests/tree/servo/webstorage tests] as possible.&lt;br /&gt;
* Implement the WindowLocalStorage interface which behaves slightly different from the WindowSessionStorage interface.&lt;br /&gt;
&lt;br /&gt;
== Architecture &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Design&amp;lt;/ref&amp;gt;==&lt;br /&gt;
&lt;br /&gt;
[[File:task.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Architecture Explained ===&lt;br /&gt;
*Each box represents a Rust task.&lt;br /&gt;
*Blue boxes represent the primary tasks in the browser pipeline.&lt;br /&gt;
*Gray boxes represent tasks auxiliary to the browser pipeline.&lt;br /&gt;
*White boxes represent worker tasks. Each such box represents several tasks, the precise number of which will vary with the workload.&lt;br /&gt;
*Dashed lines indicate supervisor relationships.&lt;br /&gt;
*Solid lines indicate communication channels.&lt;br /&gt;
&lt;br /&gt;
== Component Design ==&lt;br /&gt;
[[File:servo.jpg]]&lt;br /&gt;
&lt;br /&gt;
There will be 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.&lt;br /&gt;
&lt;br /&gt;
=== Task &amp;lt;ref&amp;gt;http://doc.rust-lang.org/guide-tasks.html&amp;lt;/ref&amp;gt;===&lt;br /&gt;
Rust provides safe concurrent abstractions through a number of core library primitives. This guide will describe the concurrency model in Rust, how it relates to the Rust type system, and introduce the fundamental library abstractions for constructing concurrent programs.&lt;br /&gt;
&lt;br /&gt;
Tasks provide failure isolation and recovery. When a fatal error occurs in Rust code as a result of an explicit call to panic!(), an assertion failure, or another invalid operation, the runtime system destroys the entire task. Unlike in languages such as Java and C++, there is no way to catch an exception. Instead, tasks may monitor each other to see if they panic.&lt;br /&gt;
&lt;br /&gt;
Tasks use Rust's type system to provide strong memory safety guarantees. In particular, the type system guarantees that tasks cannot induce a data race from shared mutable state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Generate some state locally&lt;br /&gt;
let child_task_number = generate_task_number();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    // Capture it in the remote task&lt;br /&gt;
    println!(&amp;quot;I am child number {}&amp;quot;, child_task_number);&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Channel &amp;lt;ref&amp;gt;http://doc.rust-lang.org/guide-tasks.html&amp;lt;/ref&amp;gt;===&lt;br /&gt;
Now that we have spawned a new task, it would be nice if we could communicate with it. For this, we use channels. A channel is simply a pair of endpoints: one for sending messages and another for receiving messages.&lt;br /&gt;
&lt;br /&gt;
The simplest way to create a channel is to use the channel function to create a (Sender, Receiver) pair. In Rust parlance, a sender is a sending endpoint of a channel, and a receiver is the receiving endpoint. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
let (tx, rx): (Sender&amp;lt;int&amp;gt;, Receiver&amp;lt;int&amp;gt;) = channel();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    let result = some_expensive_computation();&lt;br /&gt;
    tx.send(result);&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
some_other_expensive_computation();&lt;br /&gt;
let result = rx.recv();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Data Design ==&lt;br /&gt;
&lt;br /&gt;
===  Data Description ===&lt;br /&gt;
&lt;br /&gt;
''The following are the data structures that will be used.''&lt;br /&gt;
&lt;br /&gt;
'''Storage''' | TreeMap&amp;lt;String,String&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''UrlMap''' | TreeMap&amp;lt;String,TreeMap&amp;lt;String,String&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design Pattern ==&lt;br /&gt;
&lt;br /&gt;
We will be using &amp;quot;Delegation Pattern&amp;quot; in our project. The Storage interface is used by web applications to access the web storage provided by the browser. However, the actual data is stored somewhere else(Servo Memory Space). So, it makes sense to create another class which will maintain the actual stored data. The Storage class can then delegate the task of storing/retrieving data to this class. We will create a class &amp;quot;WebStorageTask&amp;quot; for this purpose.&lt;br /&gt;
&lt;br /&gt;
== UML Diagrams ==&lt;br /&gt;
&lt;br /&gt;
Flow Chart&lt;br /&gt;
[[File:Flow_Chart_Storage.png|left]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
adfasdfasdf&lt;br /&gt;
dsfasdf&lt;br /&gt;
adsf&lt;br /&gt;
asdf&lt;br /&gt;
asdf&lt;br /&gt;
adsf&lt;br /&gt;
asdfa&lt;br /&gt;
&lt;br /&gt;
Use Case&lt;br /&gt;
[[File:Use_Case_Storage.jpg|right]]&lt;br /&gt;
asdfasdfasdfasdfasdf&lt;br /&gt;
adsfasdf&lt;br /&gt;
adsf&lt;br /&gt;
asdf&lt;br /&gt;
asdf&lt;br /&gt;
adsf&lt;br /&gt;
asdfa&lt;br /&gt;
&lt;br /&gt;
== Proposed Test Cases ==&lt;br /&gt;
&lt;br /&gt;
Some of the test cases which will be used to validate our changes are as follows:&lt;br /&gt;
&lt;br /&gt;
* Allow a web page to clear its session storage&lt;br /&gt;
* Allow a web page to store an item in its session storage&lt;br /&gt;
* Allow a web page to retrieve stored items from its session storage&lt;br /&gt;
* Do not allow a web page to retrieve stored items from the session storage of a web page in another domain&lt;br /&gt;
* Check the number of items stored in session storage&lt;br /&gt;
* On removing an item from storage, it should be inaccessible&lt;br /&gt;
* Should return null as value for a key not present in the session storage&lt;br /&gt;
* Should give an error on exceeding the space limit of session storage&lt;br /&gt;
&lt;br /&gt;
The complete list of test cases can be found [http://github.com/servo/web-platform-tests/tree/servo/webstorage here].&lt;br /&gt;
&lt;br /&gt;
== Further Readings ==&lt;br /&gt;
&lt;br /&gt;
Learning Rust by Examples: http://rustbyexample.com/ &amp;lt;br/&amp;gt;&lt;br /&gt;
Javascript as Servo's Garbage Collector: http://blog.mozilla.org/research/2014/08/26/javascript-servos-only-garbage-collector/  &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vankam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=92111</id>
		<title>CSC/ECE 517 Fall 2014/final design doc M1450 navr</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=92111"/>
		<updated>2014-11-18T02:33:20Z</updated>

		<summary type="html">&lt;p&gt;Vankam: /* UML Diagrams */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Implement Window.sessionStorage ==&lt;br /&gt;
&lt;br /&gt;
This is the design document for the task &amp;lt;code&amp;gt;[http://github.com/servo/servo/wiki/Storage-student-project Implement Window.sessionStorage]&amp;lt;/code&amp;gt; for the [http://www.mozilla.org/ Mozilla] research project [http://github.com/servo/servo/wiki/Design Servo].&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== [http://www.rust-lang.org/ Rust]===&lt;br /&gt;
&lt;br /&gt;
Rust is a modern systems programming language focusing on safety and speed to build reliable and efficient systems &amp;lt;ref&amp;gt; http://doc.rust-lang.org/nightly/intro.html &amp;lt;/ref&amp;gt;. It accomplishes the goals of memory safe without using garbage collection and it supports concurrency and parallelism in building platforms. &lt;br /&gt;
&lt;br /&gt;
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. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [http://github.com/servo/servo/wiki/Design Servo] ===&lt;br /&gt;
&lt;br /&gt;
Mozilla Research team is currently working on an experimental project to develop a new Web browser engine &amp;quot;Servo&amp;quot;, 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.&amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The main objectives of this experimentation project is improving the layout to graphics rendering - to optimize for power efficiency and maximize parallelism. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
&lt;br /&gt;
=== [http://html.spec.whatwg.org/multipage/webstorage.html#webstorage Web Storage] ===&lt;br /&gt;
The web storage specification defines the means by which a web application can store string key/value pairs in a browser and later retrieve them for use.&amp;lt;ref&amp;gt;https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Storage&amp;lt;/ref&amp;gt; It supports persistent data storage, similar to [http://en.wikipedia.org/wiki/HTTP_cookie cookies] but with a greatly enhanced capacity and no information stored in the [http://en.wikipedia.org/wiki/List_of_HTTP_headers HTTP request header].&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Web_storage&amp;lt;/ref&amp;gt; There are two types of web storage: [http://html.spec.whatwg.org/multipage/webstorage.html#dom-localstorage local storage] and [http://html.spec.whatwg.org/multipage/webstorage.html#dom-sessionstorage session storage].&lt;br /&gt;
&lt;br /&gt;
Browsers that support web storage have the global variables 'sessionStorage' and 'localStorage' declared at the [http://developer.mozilla.org/en-US/docs/Web/API/Window?redirectlocale=en-US&amp;amp;redirectslug=DOM%2Fwindow window] level. The following JavaScript code gives an example of how to use web storage:&lt;br /&gt;
&lt;br /&gt;
'''sessionStorage'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Store value on browser for duration of the session&lt;br /&gt;
sessionStorage.setItem('key', 'value');&lt;br /&gt;
 &lt;br /&gt;
// Retrieve value (gets deleted when browser is closed and re-opened)&lt;br /&gt;
alert(sessionStorage.getItem('key'));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''localStorage'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Store value on the browser beyond the duration of the session&lt;br /&gt;
localStorage.setItem('key', 'value');&lt;br /&gt;
 &lt;br /&gt;
// Retrieve value (persists even after closing and re-opening the browser)&lt;br /&gt;
alert(localStorage.getItem('key'));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
&lt;br /&gt;
As part of our [http://github.com/servo/servo/wiki/Storage-student-project project], we have to implement the web storage specification in the Servo browser. 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. &amp;lt;ref&amp;gt; https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Requirement Analysis &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
In order to introduce the support for session storage and local storage in the Servo Broswer, we have to create the Storage structure and allow web pages to store data in the Servo memory space.&lt;br /&gt;
&lt;br /&gt;
Below is a high level overview of the various steps that have been planned for this project:&lt;br /&gt;
&lt;br /&gt;
* Create the Storage interface and its stub implementation.&lt;br /&gt;
* Create the WindowSessionStorage interface making it return a Storage instance.&lt;br /&gt;
* Create a Storage Task which will be used to contain all stored data.&lt;br /&gt;
* Define a message-passing interface for reading and writing stored data for a particular browser tab.&lt;br /&gt;
* Use the Storage task in the implementation of Storage.&lt;br /&gt;
* When the value of a stored data is changed, notify its respective browser tab.&lt;br /&gt;
* Pass as many [http://github.com/servo/web-platform-tests/tree/servo/webstorage tests] as possible.&lt;br /&gt;
* Implement the WindowLocalStorage interface which behaves slightly different from the WindowSessionStorage interface.&lt;br /&gt;
&lt;br /&gt;
== Architecture &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Design&amp;lt;/ref&amp;gt;==&lt;br /&gt;
&lt;br /&gt;
[[File:task.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Architecture Explained ===&lt;br /&gt;
*Each box represents a Rust task.&lt;br /&gt;
*Blue boxes represent the primary tasks in the browser pipeline.&lt;br /&gt;
*Gray boxes represent tasks auxiliary to the browser pipeline.&lt;br /&gt;
*White boxes represent worker tasks. Each such box represents several tasks, the precise number of which will vary with the workload.&lt;br /&gt;
*Dashed lines indicate supervisor relationships.&lt;br /&gt;
*Solid lines indicate communication channels.&lt;br /&gt;
&lt;br /&gt;
== Component Design ==&lt;br /&gt;
[[File:servo.jpg]]&lt;br /&gt;
&lt;br /&gt;
There will be 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.&lt;br /&gt;
&lt;br /&gt;
=== Task &amp;lt;ref&amp;gt;http://doc.rust-lang.org/guide-tasks.html&amp;lt;/ref&amp;gt;===&lt;br /&gt;
Rust provides safe concurrent abstractions through a number of core library primitives. This guide will describe the concurrency model in Rust, how it relates to the Rust type system, and introduce the fundamental library abstractions for constructing concurrent programs.&lt;br /&gt;
&lt;br /&gt;
Tasks provide failure isolation and recovery. When a fatal error occurs in Rust code as a result of an explicit call to panic!(), an assertion failure, or another invalid operation, the runtime system destroys the entire task. Unlike in languages such as Java and C++, there is no way to catch an exception. Instead, tasks may monitor each other to see if they panic.&lt;br /&gt;
&lt;br /&gt;
Tasks use Rust's type system to provide strong memory safety guarantees. In particular, the type system guarantees that tasks cannot induce a data race from shared mutable state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Generate some state locally&lt;br /&gt;
let child_task_number = generate_task_number();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    // Capture it in the remote task&lt;br /&gt;
    println!(&amp;quot;I am child number {}&amp;quot;, child_task_number);&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Channel &amp;lt;ref&amp;gt;http://doc.rust-lang.org/guide-tasks.html&amp;lt;/ref&amp;gt;===&lt;br /&gt;
Now that we have spawned a new task, it would be nice if we could communicate with it. For this, we use channels. A channel is simply a pair of endpoints: one for sending messages and another for receiving messages.&lt;br /&gt;
&lt;br /&gt;
The simplest way to create a channel is to use the channel function to create a (Sender, Receiver) pair. In Rust parlance, a sender is a sending endpoint of a channel, and a receiver is the receiving endpoint. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
let (tx, rx): (Sender&amp;lt;int&amp;gt;, Receiver&amp;lt;int&amp;gt;) = channel();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    let result = some_expensive_computation();&lt;br /&gt;
    tx.send(result);&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
some_other_expensive_computation();&lt;br /&gt;
let result = rx.recv();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Data Design ==&lt;br /&gt;
&lt;br /&gt;
===  Data Description ===&lt;br /&gt;
&lt;br /&gt;
''The following are the data structures that will be used.''&lt;br /&gt;
&lt;br /&gt;
'''Storage''' | TreeMap&amp;lt;String,String&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''UrlMap''' | TreeMap&amp;lt;String,TreeMap&amp;lt;String,String&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design Pattern ==&lt;br /&gt;
&lt;br /&gt;
We will be using &amp;quot;Delegation Pattern&amp;quot; in our project. The Storage interface is used by web applications to access the web storage provided by the browser. However, the actual data is stored somewhere else(Servo Memory Space). So, it makes sense to create another class which will maintain the actual stored data. The Storage class can then delegate the task of storing/retrieving data to this class. We will create a class &amp;quot;WebStorageTask&amp;quot; for this purpose.&lt;br /&gt;
&lt;br /&gt;
== UML Diagrams ==&lt;br /&gt;
&lt;br /&gt;
Flow Chart&lt;br /&gt;
[[File:Flow_Chart_Storage.png|left]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Use Case&lt;br /&gt;
[[File:Use_Case_Storage.jpg|right]]&lt;br /&gt;
&lt;br /&gt;
== Proposed Test Cases ==&lt;br /&gt;
&lt;br /&gt;
Some of the test cases which will be used to validate our changes are as follows:&lt;br /&gt;
&lt;br /&gt;
* Allow a web page to clear its session storage&lt;br /&gt;
* Allow a web page to store an item in its session storage&lt;br /&gt;
* Allow a web page to retrieve stored items from its session storage&lt;br /&gt;
* Do not allow a web page to retrieve stored items from the session storage of a web page in another domain&lt;br /&gt;
* Check the number of items stored in session storage&lt;br /&gt;
* On removing an item from storage, it should be inaccessible&lt;br /&gt;
* Should return null as value for a key not present in the session storage&lt;br /&gt;
* Should give an error on exceeding the space limit of session storage&lt;br /&gt;
&lt;br /&gt;
The complete list of test cases can be found [http://github.com/servo/web-platform-tests/tree/servo/webstorage here].&lt;br /&gt;
&lt;br /&gt;
== Further Readings ==&lt;br /&gt;
&lt;br /&gt;
Learning Rust by Examples: http://rustbyexample.com/ &amp;lt;br/&amp;gt;&lt;br /&gt;
Javascript as Servo's Garbage Collector: http://blog.mozilla.org/research/2014/08/26/javascript-servos-only-garbage-collector/  &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vankam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=92110</id>
		<title>CSC/ECE 517 Fall 2014/final design doc M1450 navr</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=92110"/>
		<updated>2014-11-18T02:31:55Z</updated>

		<summary type="html">&lt;p&gt;Vankam: /* Requirement Analysis https://github.com/servo/servo/wiki/Storage-student-project */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Implement Window.sessionStorage ==&lt;br /&gt;
&lt;br /&gt;
This is the design document for the task &amp;lt;code&amp;gt;[http://github.com/servo/servo/wiki/Storage-student-project Implement Window.sessionStorage]&amp;lt;/code&amp;gt; for the [http://www.mozilla.org/ Mozilla] research project [http://github.com/servo/servo/wiki/Design Servo].&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== [http://www.rust-lang.org/ Rust]===&lt;br /&gt;
&lt;br /&gt;
Rust is a modern systems programming language focusing on safety and speed to build reliable and efficient systems &amp;lt;ref&amp;gt; http://doc.rust-lang.org/nightly/intro.html &amp;lt;/ref&amp;gt;. It accomplishes the goals of memory safe without using garbage collection and it supports concurrency and parallelism in building platforms. &lt;br /&gt;
&lt;br /&gt;
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. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [http://github.com/servo/servo/wiki/Design Servo] ===&lt;br /&gt;
&lt;br /&gt;
Mozilla Research team is currently working on an experimental project to develop a new Web browser engine &amp;quot;Servo&amp;quot;, 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.&amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The main objectives of this experimentation project is improving the layout to graphics rendering - to optimize for power efficiency and maximize parallelism. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
&lt;br /&gt;
=== [http://html.spec.whatwg.org/multipage/webstorage.html#webstorage Web Storage] ===&lt;br /&gt;
The web storage specification defines the means by which a web application can store string key/value pairs in a browser and later retrieve them for use.&amp;lt;ref&amp;gt;https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Storage&amp;lt;/ref&amp;gt; It supports persistent data storage, similar to [http://en.wikipedia.org/wiki/HTTP_cookie cookies] but with a greatly enhanced capacity and no information stored in the [http://en.wikipedia.org/wiki/List_of_HTTP_headers HTTP request header].&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Web_storage&amp;lt;/ref&amp;gt; There are two types of web storage: [http://html.spec.whatwg.org/multipage/webstorage.html#dom-localstorage local storage] and [http://html.spec.whatwg.org/multipage/webstorage.html#dom-sessionstorage session storage].&lt;br /&gt;
&lt;br /&gt;
Browsers that support web storage have the global variables 'sessionStorage' and 'localStorage' declared at the [http://developer.mozilla.org/en-US/docs/Web/API/Window?redirectlocale=en-US&amp;amp;redirectslug=DOM%2Fwindow window] level. The following JavaScript code gives an example of how to use web storage:&lt;br /&gt;
&lt;br /&gt;
'''sessionStorage'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Store value on browser for duration of the session&lt;br /&gt;
sessionStorage.setItem('key', 'value');&lt;br /&gt;
 &lt;br /&gt;
// Retrieve value (gets deleted when browser is closed and re-opened)&lt;br /&gt;
alert(sessionStorage.getItem('key'));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''localStorage'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Store value on the browser beyond the duration of the session&lt;br /&gt;
localStorage.setItem('key', 'value');&lt;br /&gt;
 &lt;br /&gt;
// Retrieve value (persists even after closing and re-opening the browser)&lt;br /&gt;
alert(localStorage.getItem('key'));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
&lt;br /&gt;
As part of our [http://github.com/servo/servo/wiki/Storage-student-project project], we have to implement the web storage specification in the Servo browser. 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. &amp;lt;ref&amp;gt; https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Requirement Analysis &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
In order to introduce the support for session storage and local storage in the Servo Broswer, we have to create the Storage structure and allow web pages to store data in the Servo memory space.&lt;br /&gt;
&lt;br /&gt;
Below is a high level overview of the various steps that have been planned for this project:&lt;br /&gt;
&lt;br /&gt;
* Create the Storage interface and its stub implementation.&lt;br /&gt;
* Create the WindowSessionStorage interface making it return a Storage instance.&lt;br /&gt;
* Create a Storage Task which will be used to contain all stored data.&lt;br /&gt;
* Define a message-passing interface for reading and writing stored data for a particular browser tab.&lt;br /&gt;
* Use the Storage task in the implementation of Storage.&lt;br /&gt;
* When the value of a stored data is changed, notify its respective browser tab.&lt;br /&gt;
* Pass as many [http://github.com/servo/web-platform-tests/tree/servo/webstorage tests] as possible.&lt;br /&gt;
* Implement the WindowLocalStorage interface which behaves slightly different from the WindowSessionStorage interface.&lt;br /&gt;
&lt;br /&gt;
== Architecture &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Design&amp;lt;/ref&amp;gt;==&lt;br /&gt;
&lt;br /&gt;
[[File:task.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Architecture Explained ===&lt;br /&gt;
*Each box represents a Rust task.&lt;br /&gt;
*Blue boxes represent the primary tasks in the browser pipeline.&lt;br /&gt;
*Gray boxes represent tasks auxiliary to the browser pipeline.&lt;br /&gt;
*White boxes represent worker tasks. Each such box represents several tasks, the precise number of which will vary with the workload.&lt;br /&gt;
*Dashed lines indicate supervisor relationships.&lt;br /&gt;
*Solid lines indicate communication channels.&lt;br /&gt;
&lt;br /&gt;
== Component Design ==&lt;br /&gt;
[[File:servo.jpg]]&lt;br /&gt;
&lt;br /&gt;
There will be 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.&lt;br /&gt;
&lt;br /&gt;
=== Task &amp;lt;ref&amp;gt;http://doc.rust-lang.org/guide-tasks.html&amp;lt;/ref&amp;gt;===&lt;br /&gt;
Rust provides safe concurrent abstractions through a number of core library primitives. This guide will describe the concurrency model in Rust, how it relates to the Rust type system, and introduce the fundamental library abstractions for constructing concurrent programs.&lt;br /&gt;
&lt;br /&gt;
Tasks provide failure isolation and recovery. When a fatal error occurs in Rust code as a result of an explicit call to panic!(), an assertion failure, or another invalid operation, the runtime system destroys the entire task. Unlike in languages such as Java and C++, there is no way to catch an exception. Instead, tasks may monitor each other to see if they panic.&lt;br /&gt;
&lt;br /&gt;
Tasks use Rust's type system to provide strong memory safety guarantees. In particular, the type system guarantees that tasks cannot induce a data race from shared mutable state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Generate some state locally&lt;br /&gt;
let child_task_number = generate_task_number();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    // Capture it in the remote task&lt;br /&gt;
    println!(&amp;quot;I am child number {}&amp;quot;, child_task_number);&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Channel &amp;lt;ref&amp;gt;http://doc.rust-lang.org/guide-tasks.html&amp;lt;/ref&amp;gt;===&lt;br /&gt;
Now that we have spawned a new task, it would be nice if we could communicate with it. For this, we use channels. A channel is simply a pair of endpoints: one for sending messages and another for receiving messages.&lt;br /&gt;
&lt;br /&gt;
The simplest way to create a channel is to use the channel function to create a (Sender, Receiver) pair. In Rust parlance, a sender is a sending endpoint of a channel, and a receiver is the receiving endpoint. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
let (tx, rx): (Sender&amp;lt;int&amp;gt;, Receiver&amp;lt;int&amp;gt;) = channel();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    let result = some_expensive_computation();&lt;br /&gt;
    tx.send(result);&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
some_other_expensive_computation();&lt;br /&gt;
let result = rx.recv();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Data Design ==&lt;br /&gt;
&lt;br /&gt;
===  Data Description ===&lt;br /&gt;
&lt;br /&gt;
''The following are the data structures that will be used.''&lt;br /&gt;
&lt;br /&gt;
'''Storage''' | TreeMap&amp;lt;String,String&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''UrlMap''' | TreeMap&amp;lt;String,TreeMap&amp;lt;String,String&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design Pattern ==&lt;br /&gt;
&lt;br /&gt;
We will be using &amp;quot;Delegation Pattern&amp;quot; in our project. The Storage interface is used by web applications to access the web storage provided by the browser. However, the actual data is stored somewhere else(Servo Memory Space). So, it makes sense to create another class which will maintain the actual stored data. The Storage class can then delegate the task of storing/retrieving data to this class. We will create a class &amp;quot;WebStorageTask&amp;quot; for this purpose.&lt;br /&gt;
&lt;br /&gt;
== UML Diagrams ==&lt;br /&gt;
&lt;br /&gt;
[[File:Flow_Chart_Storage.png]][[File:Use_Case_Storage.jpg|right]]&lt;br /&gt;
&lt;br /&gt;
== Proposed Test Cases ==&lt;br /&gt;
&lt;br /&gt;
Some of the test cases which will be used to validate our changes are as follows:&lt;br /&gt;
&lt;br /&gt;
* Allow a web page to clear its session storage&lt;br /&gt;
* Allow a web page to store an item in its session storage&lt;br /&gt;
* Allow a web page to retrieve stored items from its session storage&lt;br /&gt;
* Do not allow a web page to retrieve stored items from the session storage of a web page in another domain&lt;br /&gt;
* Check the number of items stored in session storage&lt;br /&gt;
* On removing an item from storage, it should be inaccessible&lt;br /&gt;
* Should return null as value for a key not present in the session storage&lt;br /&gt;
* Should give an error on exceeding the space limit of session storage&lt;br /&gt;
&lt;br /&gt;
The complete list of test cases can be found [http://github.com/servo/web-platform-tests/tree/servo/webstorage here].&lt;br /&gt;
&lt;br /&gt;
== Further Readings ==&lt;br /&gt;
&lt;br /&gt;
Learning Rust by Examples: http://rustbyexample.com/ &amp;lt;br/&amp;gt;&lt;br /&gt;
Javascript as Servo's Garbage Collector: http://blog.mozilla.org/research/2014/08/26/javascript-servos-only-garbage-collector/  &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vankam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=91804</id>
		<title>CSC/ECE 517 Fall 2014/final design doc M1450 navr</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=91804"/>
		<updated>2014-11-11T23:14:56Z</updated>

		<summary type="html">&lt;p&gt;Vankam: /* UML diagrams (Eg use case diagram, class diagrams) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== [http://www.rust-lang.org/ Rust]===&lt;br /&gt;
&lt;br /&gt;
Rust is a modern systems programming language focusing on safety and speed to build reliable and efficient systems &amp;lt;ref&amp;gt; http://doc.rust-lang.org/nightly/intro.html &amp;lt;/ref&amp;gt;. It accomplishes the goals of memory safe without using garbage collection and it supports concurrency and parallelism in building platforms. &lt;br /&gt;
&lt;br /&gt;
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. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [http://github.com/servo/servo/wiki/Design Servo] ===&lt;br /&gt;
&lt;br /&gt;
Mozilla Research team is currently working on an experimental project to develop a new Web browser engine &amp;quot;Servo&amp;quot;, 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.&amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The main objectives of this experimentation project is improving the layout to graphics rendering - to optimize for power efficiency and maximize parallelism. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Purpose ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Background ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Architecture ==&lt;br /&gt;
&lt;br /&gt;
[[File:task.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Architecture Explained ===&lt;br /&gt;
*Each box represents a Rust task.&lt;br /&gt;
*Blue boxes represent the primary tasks in the browser pipeline.&lt;br /&gt;
*Gray boxes represent tasks auxiliary to the browser pipeline.&lt;br /&gt;
*White boxes represent worker tasks. Each such box represents several tasks, the precise number of which will vary with the workload.&lt;br /&gt;
*Dashed lines indicate supervisor relationships.&lt;br /&gt;
*Solid lines indicate communication channels.&lt;br /&gt;
&lt;br /&gt;
== Requirement Analysis &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
As part of our [http://github.com/servo/servo/wiki/Storage-student-project project], we have to implement the [http://html.spec.whatwg.org/multipage/webstorage.html#webstorage Web Storage] specification in Servo. 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. &amp;lt;ref&amp;gt; https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Below is a high level overview of the various steps that need to be carried out to achieve this:&lt;br /&gt;
&lt;br /&gt;
* Create the Storage interface and its stub implementation.&lt;br /&gt;
* Create the WindowSessionStorage interface making it return a Storage instance.&lt;br /&gt;
* Create a Storage Task which will be used to contain all stored data.&lt;br /&gt;
* Define a message-passing interface for reading and writing stored data for a particular browser tab.&lt;br /&gt;
* Use the Storage task in the implementation of Storage.&lt;br /&gt;
* When the value of a stored data is changed, notify its respective browser tab.&lt;br /&gt;
* Pass as many tests as possible.&lt;br /&gt;
* Implement the WindowLocalStorage interface which behaves slightly different from the WindowSessionStorage interface.&lt;br /&gt;
&lt;br /&gt;
== Data Design ==&lt;br /&gt;
&lt;br /&gt;
===  Data Description ===&lt;br /&gt;
&lt;br /&gt;
''The following are the data structures that will be used.''&lt;br /&gt;
&lt;br /&gt;
'''Storage''' | TreeMap&amp;lt;String,String&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''UrlMap''' | TreeMap&amp;lt;String,TreeMap&amp;lt;String,String&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Component Design ==&lt;br /&gt;
[[File:servo.jpg]]&lt;br /&gt;
=== Task ===&lt;br /&gt;
Rust provides safe concurrent abstractions through a number of core library primitives. This guide will describe the concurrency model in Rust, how it relates to the Rust type system, and introduce the fundamental library abstractions for constructing concurrent programs.&lt;br /&gt;
&lt;br /&gt;
Tasks provide failure isolation and recovery. When a fatal error occurs in Rust code as a result of an explicit call to panic!(), an assertion failure, or another invalid operation, the runtime system destroys the entire task. Unlike in languages such as Java and C++, there is no way to catch an exception. Instead, tasks may monitor each other to see if they panic.&lt;br /&gt;
&lt;br /&gt;
Tasks use Rust's type system to provide strong memory safety guarantees. In particular, the type system guarantees that tasks cannot induce a data race from shared mutable state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Generate some state locally&lt;br /&gt;
let child_task_number = generate_task_number();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    // Capture it in the remote task&lt;br /&gt;
    println!(&amp;quot;I am child number {}&amp;quot;, child_task_number);&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Channel ===&lt;br /&gt;
Now that we have spawned a new task, it would be nice if we could communicate with it. For this, we use channels. A channel is simply a pair of endpoints: one for sending messages and another for receiving messages.&lt;br /&gt;
&lt;br /&gt;
The simplest way to create a channel is to use the channel function to create a (Sender, Receiver) pair. In Rust parlance, a sender is a sending endpoint of a channel, and a receiver is the receiving endpoint. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
let (tx, rx): (Sender&amp;lt;int&amp;gt;, Receiver&amp;lt;int&amp;gt;) = channel();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    let result = some_expensive_computation();&lt;br /&gt;
    tx.send(result);&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
some_other_expensive_computation();&lt;br /&gt;
let result = rx.recv();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design patterns ==&lt;br /&gt;
&lt;br /&gt;
We will be using &amp;quot;Delegation Pattern&amp;quot; in our project. The Storage interface is used by web applications to access the Web Storage provided by the browser. However, the actual data is stored somewhere else(Database/FileSystem/Memory). So, it makes sense to create another class which will maintain the actual stored data. The Storage class can then delegate the task of storing/retrieving data to this class. We will create a class &amp;quot;WebStorageTask&amp;quot; for this purpose.&lt;br /&gt;
&lt;br /&gt;
== UML diagrams (Eg use case diagram, class diagrams) ==&lt;br /&gt;
&lt;br /&gt;
[[File:Flow_Chart_Storage.png]][[File:Use_Case_Storage.jpg|right]]&lt;br /&gt;
&lt;br /&gt;
== Proposed Test Cases ==&lt;br /&gt;
&lt;br /&gt;
== Further Readings ==&lt;br /&gt;
&lt;br /&gt;
Learning Rust by Examples: http://rustbyexample.com/ &amp;lt;br/&amp;gt;&lt;br /&gt;
Javascript as Servo's Garbage Collector: http://blog.mozilla.org/research/2014/08/26/javascript-servos-only-garbage-collector/  &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vankam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=91803</id>
		<title>CSC/ECE 517 Fall 2014/final design doc M1450 navr</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=91803"/>
		<updated>2014-11-11T23:14:42Z</updated>

		<summary type="html">&lt;p&gt;Vankam: /* UML diagrams (Eg use case diagram, class diagrams) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== [http://www.rust-lang.org/ Rust]===&lt;br /&gt;
&lt;br /&gt;
Rust is a modern systems programming language focusing on safety and speed to build reliable and efficient systems &amp;lt;ref&amp;gt; http://doc.rust-lang.org/nightly/intro.html &amp;lt;/ref&amp;gt;. It accomplishes the goals of memory safe without using garbage collection and it supports concurrency and parallelism in building platforms. &lt;br /&gt;
&lt;br /&gt;
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. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [http://github.com/servo/servo/wiki/Design Servo] ===&lt;br /&gt;
&lt;br /&gt;
Mozilla Research team is currently working on an experimental project to develop a new Web browser engine &amp;quot;Servo&amp;quot;, 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.&amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The main objectives of this experimentation project is improving the layout to graphics rendering - to optimize for power efficiency and maximize parallelism. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Purpose ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Background ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Architecture ==&lt;br /&gt;
&lt;br /&gt;
[[File:task.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Architecture Explained ===&lt;br /&gt;
*Each box represents a Rust task.&lt;br /&gt;
*Blue boxes represent the primary tasks in the browser pipeline.&lt;br /&gt;
*Gray boxes represent tasks auxiliary to the browser pipeline.&lt;br /&gt;
*White boxes represent worker tasks. Each such box represents several tasks, the precise number of which will vary with the workload.&lt;br /&gt;
*Dashed lines indicate supervisor relationships.&lt;br /&gt;
*Solid lines indicate communication channels.&lt;br /&gt;
&lt;br /&gt;
== Requirement Analysis &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
As part of our [http://github.com/servo/servo/wiki/Storage-student-project project], we have to implement the [http://html.spec.whatwg.org/multipage/webstorage.html#webstorage Web Storage] specification in Servo. 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. &amp;lt;ref&amp;gt; https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Below is a high level overview of the various steps that need to be carried out to achieve this:&lt;br /&gt;
&lt;br /&gt;
* Create the Storage interface and its stub implementation.&lt;br /&gt;
* Create the WindowSessionStorage interface making it return a Storage instance.&lt;br /&gt;
* Create a Storage Task which will be used to contain all stored data.&lt;br /&gt;
* Define a message-passing interface for reading and writing stored data for a particular browser tab.&lt;br /&gt;
* Use the Storage task in the implementation of Storage.&lt;br /&gt;
* When the value of a stored data is changed, notify its respective browser tab.&lt;br /&gt;
* Pass as many tests as possible.&lt;br /&gt;
* Implement the WindowLocalStorage interface which behaves slightly different from the WindowSessionStorage interface.&lt;br /&gt;
&lt;br /&gt;
== Data Design ==&lt;br /&gt;
&lt;br /&gt;
===  Data Description ===&lt;br /&gt;
&lt;br /&gt;
''The following are the data structures that will be used.''&lt;br /&gt;
&lt;br /&gt;
'''Storage''' | TreeMap&amp;lt;String,String&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''UrlMap''' | TreeMap&amp;lt;String,TreeMap&amp;lt;String,String&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Component Design ==&lt;br /&gt;
[[File:servo.jpg]]&lt;br /&gt;
=== Task ===&lt;br /&gt;
Rust provides safe concurrent abstractions through a number of core library primitives. This guide will describe the concurrency model in Rust, how it relates to the Rust type system, and introduce the fundamental library abstractions for constructing concurrent programs.&lt;br /&gt;
&lt;br /&gt;
Tasks provide failure isolation and recovery. When a fatal error occurs in Rust code as a result of an explicit call to panic!(), an assertion failure, or another invalid operation, the runtime system destroys the entire task. Unlike in languages such as Java and C++, there is no way to catch an exception. Instead, tasks may monitor each other to see if they panic.&lt;br /&gt;
&lt;br /&gt;
Tasks use Rust's type system to provide strong memory safety guarantees. In particular, the type system guarantees that tasks cannot induce a data race from shared mutable state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Generate some state locally&lt;br /&gt;
let child_task_number = generate_task_number();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    // Capture it in the remote task&lt;br /&gt;
    println!(&amp;quot;I am child number {}&amp;quot;, child_task_number);&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Channel ===&lt;br /&gt;
Now that we have spawned a new task, it would be nice if we could communicate with it. For this, we use channels. A channel is simply a pair of endpoints: one for sending messages and another for receiving messages.&lt;br /&gt;
&lt;br /&gt;
The simplest way to create a channel is to use the channel function to create a (Sender, Receiver) pair. In Rust parlance, a sender is a sending endpoint of a channel, and a receiver is the receiving endpoint. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
let (tx, rx): (Sender&amp;lt;int&amp;gt;, Receiver&amp;lt;int&amp;gt;) = channel();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    let result = some_expensive_computation();&lt;br /&gt;
    tx.send(result);&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
some_other_expensive_computation();&lt;br /&gt;
let result = rx.recv();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design patterns ==&lt;br /&gt;
&lt;br /&gt;
We will be using &amp;quot;Delegation Pattern&amp;quot; in our project. The Storage interface is used by web applications to access the Web Storage provided by the browser. However, the actual data is stored somewhere else(Database/FileSystem/Memory). So, it makes sense to create another class which will maintain the actual stored data. The Storage class can then delegate the task of storing/retrieving data to this class. We will create a class &amp;quot;WebStorageTask&amp;quot; for this purpose.&lt;br /&gt;
&lt;br /&gt;
== UML diagrams (Eg use case diagram, class diagrams) ==&lt;br /&gt;
&lt;br /&gt;
[[File:Flow_Chart_Storage.png|center]][[File:Use_Case_Storage.jpg|right]]&lt;br /&gt;
&lt;br /&gt;
== Proposed Test Cases ==&lt;br /&gt;
&lt;br /&gt;
== Further Readings ==&lt;br /&gt;
&lt;br /&gt;
Learning Rust by Examples: http://rustbyexample.com/ &amp;lt;br/&amp;gt;&lt;br /&gt;
Javascript as Servo's Garbage Collector: http://blog.mozilla.org/research/2014/08/26/javascript-servos-only-garbage-collector/  &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vankam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=91802</id>
		<title>CSC/ECE 517 Fall 2014/final design doc M1450 navr</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=91802"/>
		<updated>2014-11-11T23:14:04Z</updated>

		<summary type="html">&lt;p&gt;Vankam: /* UML diagrams (Eg use case diagram, class diagrams) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== [http://www.rust-lang.org/ Rust]===&lt;br /&gt;
&lt;br /&gt;
Rust is a modern systems programming language focusing on safety and speed to build reliable and efficient systems &amp;lt;ref&amp;gt; http://doc.rust-lang.org/nightly/intro.html &amp;lt;/ref&amp;gt;. It accomplishes the goals of memory safe without using garbage collection and it supports concurrency and parallelism in building platforms. &lt;br /&gt;
&lt;br /&gt;
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. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [http://github.com/servo/servo/wiki/Design Servo] ===&lt;br /&gt;
&lt;br /&gt;
Mozilla Research team is currently working on an experimental project to develop a new Web browser engine &amp;quot;Servo&amp;quot;, 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.&amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The main objectives of this experimentation project is improving the layout to graphics rendering - to optimize for power efficiency and maximize parallelism. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Purpose ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Background ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Architecture ==&lt;br /&gt;
&lt;br /&gt;
[[File:task.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Architecture Explained ===&lt;br /&gt;
*Each box represents a Rust task.&lt;br /&gt;
*Blue boxes represent the primary tasks in the browser pipeline.&lt;br /&gt;
*Gray boxes represent tasks auxiliary to the browser pipeline.&lt;br /&gt;
*White boxes represent worker tasks. Each such box represents several tasks, the precise number of which will vary with the workload.&lt;br /&gt;
*Dashed lines indicate supervisor relationships.&lt;br /&gt;
*Solid lines indicate communication channels.&lt;br /&gt;
&lt;br /&gt;
== Requirement Analysis &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
As part of our [http://github.com/servo/servo/wiki/Storage-student-project project], we have to implement the [http://html.spec.whatwg.org/multipage/webstorage.html#webstorage Web Storage] specification in Servo. 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. &amp;lt;ref&amp;gt; https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Below is a high level overview of the various steps that need to be carried out to achieve this:&lt;br /&gt;
&lt;br /&gt;
* Create the Storage interface and its stub implementation.&lt;br /&gt;
* Create the WindowSessionStorage interface making it return a Storage instance.&lt;br /&gt;
* Create a Storage Task which will be used to contain all stored data.&lt;br /&gt;
* Define a message-passing interface for reading and writing stored data for a particular browser tab.&lt;br /&gt;
* Use the Storage task in the implementation of Storage.&lt;br /&gt;
* When the value of a stored data is changed, notify its respective browser tab.&lt;br /&gt;
* Pass as many tests as possible.&lt;br /&gt;
* Implement the WindowLocalStorage interface which behaves slightly different from the WindowSessionStorage interface.&lt;br /&gt;
&lt;br /&gt;
== Data Design ==&lt;br /&gt;
&lt;br /&gt;
===  Data Description ===&lt;br /&gt;
&lt;br /&gt;
''The following are the data structures that will be used.''&lt;br /&gt;
&lt;br /&gt;
'''Storage''' | TreeMap&amp;lt;String,String&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''UrlMap''' | TreeMap&amp;lt;String,TreeMap&amp;lt;String,String&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Component Design ==&lt;br /&gt;
[[File:servo.jpg]]&lt;br /&gt;
=== Task ===&lt;br /&gt;
Rust provides safe concurrent abstractions through a number of core library primitives. This guide will describe the concurrency model in Rust, how it relates to the Rust type system, and introduce the fundamental library abstractions for constructing concurrent programs.&lt;br /&gt;
&lt;br /&gt;
Tasks provide failure isolation and recovery. When a fatal error occurs in Rust code as a result of an explicit call to panic!(), an assertion failure, or another invalid operation, the runtime system destroys the entire task. Unlike in languages such as Java and C++, there is no way to catch an exception. Instead, tasks may monitor each other to see if they panic.&lt;br /&gt;
&lt;br /&gt;
Tasks use Rust's type system to provide strong memory safety guarantees. In particular, the type system guarantees that tasks cannot induce a data race from shared mutable state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Generate some state locally&lt;br /&gt;
let child_task_number = generate_task_number();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    // Capture it in the remote task&lt;br /&gt;
    println!(&amp;quot;I am child number {}&amp;quot;, child_task_number);&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Channel ===&lt;br /&gt;
Now that we have spawned a new task, it would be nice if we could communicate with it. For this, we use channels. A channel is simply a pair of endpoints: one for sending messages and another for receiving messages.&lt;br /&gt;
&lt;br /&gt;
The simplest way to create a channel is to use the channel function to create a (Sender, Receiver) pair. In Rust parlance, a sender is a sending endpoint of a channel, and a receiver is the receiving endpoint. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
let (tx, rx): (Sender&amp;lt;int&amp;gt;, Receiver&amp;lt;int&amp;gt;) = channel();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    let result = some_expensive_computation();&lt;br /&gt;
    tx.send(result);&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
some_other_expensive_computation();&lt;br /&gt;
let result = rx.recv();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design patterns ==&lt;br /&gt;
&lt;br /&gt;
We will be using &amp;quot;Delegation Pattern&amp;quot; in our project. The Storage interface is used by web applications to access the Web Storage provided by the browser. However, the actual data is stored somewhere else(Database/FileSystem/Memory). So, it makes sense to create another class which will maintain the actual stored data. The Storage class can then delegate the task of storing/retrieving data to this class. We will create a class &amp;quot;WebStorageTask&amp;quot; for this purpose.&lt;br /&gt;
&lt;br /&gt;
== UML diagrams (Eg use case diagram, class diagrams) ==&lt;br /&gt;
[[File:Flow_Chart_Storage.png]][[File:Use_Case_Storage.jpg|right]]&lt;br /&gt;
&lt;br /&gt;
== Proposed Test Cases ==&lt;br /&gt;
&lt;br /&gt;
== Further Readings ==&lt;br /&gt;
&lt;br /&gt;
Learning Rust by Examples: http://rustbyexample.com/ &amp;lt;br/&amp;gt;&lt;br /&gt;
Javascript as Servo's Garbage Collector: http://blog.mozilla.org/research/2014/08/26/javascript-servos-only-garbage-collector/  &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vankam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=91801</id>
		<title>CSC/ECE 517 Fall 2014/final design doc M1450 navr</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=91801"/>
		<updated>2014-11-11T23:13:30Z</updated>

		<summary type="html">&lt;p&gt;Vankam: /* UML diagrams (Eg use case diagram, class diagrams) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== [http://www.rust-lang.org/ Rust]===&lt;br /&gt;
&lt;br /&gt;
Rust is a modern systems programming language focusing on safety and speed to build reliable and efficient systems &amp;lt;ref&amp;gt; http://doc.rust-lang.org/nightly/intro.html &amp;lt;/ref&amp;gt;. It accomplishes the goals of memory safe without using garbage collection and it supports concurrency and parallelism in building platforms. &lt;br /&gt;
&lt;br /&gt;
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. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [http://github.com/servo/servo/wiki/Design Servo] ===&lt;br /&gt;
&lt;br /&gt;
Mozilla Research team is currently working on an experimental project to develop a new Web browser engine &amp;quot;Servo&amp;quot;, 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.&amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The main objectives of this experimentation project is improving the layout to graphics rendering - to optimize for power efficiency and maximize parallelism. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Purpose ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Background ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Architecture ==&lt;br /&gt;
&lt;br /&gt;
[[File:task.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Architecture Explained ===&lt;br /&gt;
*Each box represents a Rust task.&lt;br /&gt;
*Blue boxes represent the primary tasks in the browser pipeline.&lt;br /&gt;
*Gray boxes represent tasks auxiliary to the browser pipeline.&lt;br /&gt;
*White boxes represent worker tasks. Each such box represents several tasks, the precise number of which will vary with the workload.&lt;br /&gt;
*Dashed lines indicate supervisor relationships.&lt;br /&gt;
*Solid lines indicate communication channels.&lt;br /&gt;
&lt;br /&gt;
== Requirement Analysis &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
As part of our [http://github.com/servo/servo/wiki/Storage-student-project project], we have to implement the [http://html.spec.whatwg.org/multipage/webstorage.html#webstorage Web Storage] specification in Servo. 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. &amp;lt;ref&amp;gt; https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Below is a high level overview of the various steps that need to be carried out to achieve this:&lt;br /&gt;
&lt;br /&gt;
* Create the Storage interface and its stub implementation.&lt;br /&gt;
* Create the WindowSessionStorage interface making it return a Storage instance.&lt;br /&gt;
* Create a Storage Task which will be used to contain all stored data.&lt;br /&gt;
* Define a message-passing interface for reading and writing stored data for a particular browser tab.&lt;br /&gt;
* Use the Storage task in the implementation of Storage.&lt;br /&gt;
* When the value of a stored data is changed, notify its respective browser tab.&lt;br /&gt;
* Pass as many tests as possible.&lt;br /&gt;
* Implement the WindowLocalStorage interface which behaves slightly different from the WindowSessionStorage interface.&lt;br /&gt;
&lt;br /&gt;
== Data Design ==&lt;br /&gt;
&lt;br /&gt;
===  Data Description ===&lt;br /&gt;
&lt;br /&gt;
''The following are the data structures that will be used.''&lt;br /&gt;
&lt;br /&gt;
'''Storage''' | TreeMap&amp;lt;String,String&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''UrlMap''' | TreeMap&amp;lt;String,TreeMap&amp;lt;String,String&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Component Design ==&lt;br /&gt;
[[File:servo.jpg]]&lt;br /&gt;
=== Task ===&lt;br /&gt;
Rust provides safe concurrent abstractions through a number of core library primitives. This guide will describe the concurrency model in Rust, how it relates to the Rust type system, and introduce the fundamental library abstractions for constructing concurrent programs.&lt;br /&gt;
&lt;br /&gt;
Tasks provide failure isolation and recovery. When a fatal error occurs in Rust code as a result of an explicit call to panic!(), an assertion failure, or another invalid operation, the runtime system destroys the entire task. Unlike in languages such as Java and C++, there is no way to catch an exception. Instead, tasks may monitor each other to see if they panic.&lt;br /&gt;
&lt;br /&gt;
Tasks use Rust's type system to provide strong memory safety guarantees. In particular, the type system guarantees that tasks cannot induce a data race from shared mutable state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Generate some state locally&lt;br /&gt;
let child_task_number = generate_task_number();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    // Capture it in the remote task&lt;br /&gt;
    println!(&amp;quot;I am child number {}&amp;quot;, child_task_number);&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Channel ===&lt;br /&gt;
Now that we have spawned a new task, it would be nice if we could communicate with it. For this, we use channels. A channel is simply a pair of endpoints: one for sending messages and another for receiving messages.&lt;br /&gt;
&lt;br /&gt;
The simplest way to create a channel is to use the channel function to create a (Sender, Receiver) pair. In Rust parlance, a sender is a sending endpoint of a channel, and a receiver is the receiving endpoint. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
let (tx, rx): (Sender&amp;lt;int&amp;gt;, Receiver&amp;lt;int&amp;gt;) = channel();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    let result = some_expensive_computation();&lt;br /&gt;
    tx.send(result);&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
some_other_expensive_computation();&lt;br /&gt;
let result = rx.recv();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design patterns ==&lt;br /&gt;
&lt;br /&gt;
We will be using &amp;quot;Delegation Pattern&amp;quot; in our project. The Storage interface is used by web applications to access the Web Storage provided by the browser. However, the actual data is stored somewhere else(Database/FileSystem/Memory). So, it makes sense to create another class which will maintain the actual stored data. The Storage class can then delegate the task of storing/retrieving data to this class. We will create a class &amp;quot;WebStorageTask&amp;quot; for this purpose.&lt;br /&gt;
&lt;br /&gt;
== UML diagrams (Eg use case diagram, class diagrams) ==&lt;br /&gt;
[[File:Flow_Chart_Storage.png]][[File:Use_Case_Storage.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Proposed Test Cases ==&lt;br /&gt;
&lt;br /&gt;
== Further Readings ==&lt;br /&gt;
&lt;br /&gt;
Learning Rust by Examples: http://rustbyexample.com/ &amp;lt;br/&amp;gt;&lt;br /&gt;
Javascript as Servo's Garbage Collector: http://blog.mozilla.org/research/2014/08/26/javascript-servos-only-garbage-collector/  &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vankam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Use_Case_Storage.jpg&amp;diff=91800</id>
		<title>File:Use Case Storage.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Use_Case_Storage.jpg&amp;diff=91800"/>
		<updated>2014-11-11T23:13:03Z</updated>

		<summary type="html">&lt;p&gt;Vankam: uploaded a new version of &amp;amp;quot;File:Use Case Storage.jpg&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Vankam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Use_Case_Storage.jpg&amp;diff=91798</id>
		<title>File:Use Case Storage.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Use_Case_Storage.jpg&amp;diff=91798"/>
		<updated>2014-11-11T23:12:08Z</updated>

		<summary type="html">&lt;p&gt;Vankam: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Vankam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Flow_Chart_Storage.png&amp;diff=91796</id>
		<title>File:Flow Chart Storage.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Flow_Chart_Storage.png&amp;diff=91796"/>
		<updated>2014-11-11T23:11:18Z</updated>

		<summary type="html">&lt;p&gt;Vankam: uploaded a new version of &amp;amp;quot;File:Flow Chart Storage.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Vankam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=91793</id>
		<title>CSC/ECE 517 Fall 2014/final design doc M1450 navr</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=91793"/>
		<updated>2014-11-11T23:09:19Z</updated>

		<summary type="html">&lt;p&gt;Vankam: /* UML diagrams (Eg use case diagram, class diagrams) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== [http://www.rust-lang.org/ Rust]===&lt;br /&gt;
&lt;br /&gt;
Rust is a modern systems programming language focusing on safety and speed to build reliable and efficient systems &amp;lt;ref&amp;gt; http://doc.rust-lang.org/nightly/intro.html &amp;lt;/ref&amp;gt;. It accomplishes the goals of memory safe without using garbage collection and it supports concurrency and parallelism in building platforms. &lt;br /&gt;
&lt;br /&gt;
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. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [http://github.com/servo/servo/wiki/Design Servo] ===&lt;br /&gt;
&lt;br /&gt;
Mozilla Research team is currently working on an experimental project to develop a new Web browser engine &amp;quot;Servo&amp;quot;, 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.&amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The main objectives of this experimentation project is improving the layout to graphics rendering - to optimize for power efficiency and maximize parallelism. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Purpose ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Background ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Architecture ==&lt;br /&gt;
&lt;br /&gt;
[[File:task.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Architecture Explained ===&lt;br /&gt;
*Each box represents a Rust task.&lt;br /&gt;
*Blue boxes represent the primary tasks in the browser pipeline.&lt;br /&gt;
*Gray boxes represent tasks auxiliary to the browser pipeline.&lt;br /&gt;
*White boxes represent worker tasks. Each such box represents several tasks, the precise number of which will vary with the workload.&lt;br /&gt;
*Dashed lines indicate supervisor relationships.&lt;br /&gt;
*Solid lines indicate communication channels.&lt;br /&gt;
&lt;br /&gt;
== Requirement Analysis &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
As part of our [http://github.com/servo/servo/wiki/Storage-student-project project], we have to implement the [http://html.spec.whatwg.org/multipage/webstorage.html#webstorage Web Storage] specification in Servo. 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. &amp;lt;ref&amp;gt; https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Below is a high level overview of the various steps that need to be carried out to achieve this:&lt;br /&gt;
&lt;br /&gt;
* Create the Storage interface and its stub implementation.&lt;br /&gt;
* Create the WindowSessionStorage interface making it return a Storage instance.&lt;br /&gt;
* Create a Storage Task which will be used to contain all stored data.&lt;br /&gt;
* Define a message-passing interface for reading and writing stored data for a particular browser tab.&lt;br /&gt;
* Use the Storage task in the implementation of Storage.&lt;br /&gt;
* When the value of a stored data is changed, notify its respective browser tab.&lt;br /&gt;
* Pass as many tests as possible.&lt;br /&gt;
* Implement the WindowLocalStorage interface which behaves slightly different from the WindowSessionStorage interface.&lt;br /&gt;
&lt;br /&gt;
== Data Design ==&lt;br /&gt;
&lt;br /&gt;
===  Data Description ===&lt;br /&gt;
&lt;br /&gt;
''The following are the data structures that will be used.''&lt;br /&gt;
&lt;br /&gt;
'''Storage''' | TreeMap&amp;lt;String,String&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''UrlMap''' | TreeMap&amp;lt;String,TreeMap&amp;lt;String,String&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Component Design ==&lt;br /&gt;
[[File:servo.jpg]]&lt;br /&gt;
=== Task ===&lt;br /&gt;
Rust provides safe concurrent abstractions through a number of core library primitives. This guide will describe the concurrency model in Rust, how it relates to the Rust type system, and introduce the fundamental library abstractions for constructing concurrent programs.&lt;br /&gt;
&lt;br /&gt;
Tasks provide failure isolation and recovery. When a fatal error occurs in Rust code as a result of an explicit call to panic!(), an assertion failure, or another invalid operation, the runtime system destroys the entire task. Unlike in languages such as Java and C++, there is no way to catch an exception. Instead, tasks may monitor each other to see if they panic.&lt;br /&gt;
&lt;br /&gt;
Tasks use Rust's type system to provide strong memory safety guarantees. In particular, the type system guarantees that tasks cannot induce a data race from shared mutable state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Generate some state locally&lt;br /&gt;
let child_task_number = generate_task_number();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    // Capture it in the remote task&lt;br /&gt;
    println!(&amp;quot;I am child number {}&amp;quot;, child_task_number);&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Channel ===&lt;br /&gt;
Now that we have spawned a new task, it would be nice if we could communicate with it. For this, we use channels. A channel is simply a pair of endpoints: one for sending messages and another for receiving messages.&lt;br /&gt;
&lt;br /&gt;
The simplest way to create a channel is to use the channel function to create a (Sender, Receiver) pair. In Rust parlance, a sender is a sending endpoint of a channel, and a receiver is the receiving endpoint. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
let (tx, rx): (Sender&amp;lt;int&amp;gt;, Receiver&amp;lt;int&amp;gt;) = channel();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    let result = some_expensive_computation();&lt;br /&gt;
    tx.send(result);&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
some_other_expensive_computation();&lt;br /&gt;
let result = rx.recv();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design patterns ==&lt;br /&gt;
&lt;br /&gt;
We will be using &amp;quot;Delegation Pattern&amp;quot; in our project. The Storage interface is used by web applications to access the Web Storage provided by the browser. However, the actual data is stored somewhere else(Database/FileSystem/Memory). So, it makes sense to create another class which will maintain the actual stored data. The Storage class can then delegate the task of storing/retrieving data to this class. We will create a class &amp;quot;WebStorageTask&amp;quot; for this purpose.&lt;br /&gt;
&lt;br /&gt;
== UML diagrams (Eg use case diagram, class diagrams) ==&lt;br /&gt;
[[File:Flow_Chart_Storage.png]]&lt;br /&gt;
&lt;br /&gt;
== Proposed Test Cases ==&lt;br /&gt;
&lt;br /&gt;
== Further Readings ==&lt;br /&gt;
&lt;br /&gt;
Learning Rust by Examples: http://rustbyexample.com/ &amp;lt;br/&amp;gt;&lt;br /&gt;
Javascript as Servo's Garbage Collector: http://blog.mozilla.org/research/2014/08/26/javascript-servos-only-garbage-collector/  &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vankam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Flow_Chart_Storage.png&amp;diff=91792</id>
		<title>File:Flow Chart Storage.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Flow_Chart_Storage.png&amp;diff=91792"/>
		<updated>2014-11-11T23:08:57Z</updated>

		<summary type="html">&lt;p&gt;Vankam: uploaded a new version of &amp;amp;quot;File:Flow Chart Storage.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Vankam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=91790</id>
		<title>CSC/ECE 517 Fall 2014/final design doc M1450 navr</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=91790"/>
		<updated>2014-11-11T23:07:09Z</updated>

		<summary type="html">&lt;p&gt;Vankam: /* UML diagrams (Eg use case diagram, class diagrams) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== [http://www.rust-lang.org/ Rust]===&lt;br /&gt;
&lt;br /&gt;
Rust is a modern systems programming language focusing on safety and speed to build reliable and efficient systems &amp;lt;ref&amp;gt; http://doc.rust-lang.org/nightly/intro.html &amp;lt;/ref&amp;gt;. It accomplishes the goals of memory safe without using garbage collection and it supports concurrency and parallelism in building platforms. &lt;br /&gt;
&lt;br /&gt;
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. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [http://github.com/servo/servo/wiki/Design Servo] ===&lt;br /&gt;
&lt;br /&gt;
Mozilla Research team is currently working on an experimental project to develop a new Web browser engine &amp;quot;Servo&amp;quot;, 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.&amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The main objectives of this experimentation project is improving the layout to graphics rendering - to optimize for power efficiency and maximize parallelism. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Purpose ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Background ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Architecture ==&lt;br /&gt;
&lt;br /&gt;
[[File:task.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Architecture Explained ===&lt;br /&gt;
*Each box represents a Rust task.&lt;br /&gt;
*Blue boxes represent the primary tasks in the browser pipeline.&lt;br /&gt;
*Gray boxes represent tasks auxiliary to the browser pipeline.&lt;br /&gt;
*White boxes represent worker tasks. Each such box represents several tasks, the precise number of which will vary with the workload.&lt;br /&gt;
*Dashed lines indicate supervisor relationships.&lt;br /&gt;
*Solid lines indicate communication channels.&lt;br /&gt;
&lt;br /&gt;
== Requirement Analysis &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
As part of our [http://github.com/servo/servo/wiki/Storage-student-project project], we have to implement the [http://html.spec.whatwg.org/multipage/webstorage.html#webstorage Web Storage] specification in Servo. 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. &amp;lt;ref&amp;gt; https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Below is a high level overview of the various steps that need to be carried out to achieve this:&lt;br /&gt;
&lt;br /&gt;
* Create the Storage interface and its stub implementation.&lt;br /&gt;
* Create the WindowSessionStorage interface making it return a Storage instance.&lt;br /&gt;
* Create a Storage Task which will be used to contain all stored data.&lt;br /&gt;
* Define a message-passing interface for reading and writing stored data for a particular browser tab.&lt;br /&gt;
* Use the Storage task in the implementation of Storage.&lt;br /&gt;
* When the value of a stored data is changed, notify its respective browser tab.&lt;br /&gt;
* Pass as many tests as possible.&lt;br /&gt;
* Implement the WindowLocalStorage interface which behaves slightly different from the WindowSessionStorage interface.&lt;br /&gt;
&lt;br /&gt;
== Data Design ==&lt;br /&gt;
&lt;br /&gt;
===  Data Description ===&lt;br /&gt;
&lt;br /&gt;
''The following are the data structures that will be used.''&lt;br /&gt;
&lt;br /&gt;
'''Storage''' | TreeMap&amp;lt;String,String&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''UrlMap''' | TreeMap&amp;lt;String,TreeMap&amp;lt;String,String&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Component Design ==&lt;br /&gt;
[[File:servo.jpg]]&lt;br /&gt;
=== Task ===&lt;br /&gt;
Rust provides safe concurrent abstractions through a number of core library primitives. This guide will describe the concurrency model in Rust, how it relates to the Rust type system, and introduce the fundamental library abstractions for constructing concurrent programs.&lt;br /&gt;
&lt;br /&gt;
Tasks provide failure isolation and recovery. When a fatal error occurs in Rust code as a result of an explicit call to panic!(), an assertion failure, or another invalid operation, the runtime system destroys the entire task. Unlike in languages such as Java and C++, there is no way to catch an exception. Instead, tasks may monitor each other to see if they panic.&lt;br /&gt;
&lt;br /&gt;
Tasks use Rust's type system to provide strong memory safety guarantees. In particular, the type system guarantees that tasks cannot induce a data race from shared mutable state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Generate some state locally&lt;br /&gt;
let child_task_number = generate_task_number();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    // Capture it in the remote task&lt;br /&gt;
    println!(&amp;quot;I am child number {}&amp;quot;, child_task_number);&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Channel ===&lt;br /&gt;
Now that we have spawned a new task, it would be nice if we could communicate with it. For this, we use channels. A channel is simply a pair of endpoints: one for sending messages and another for receiving messages.&lt;br /&gt;
&lt;br /&gt;
The simplest way to create a channel is to use the channel function to create a (Sender, Receiver) pair. In Rust parlance, a sender is a sending endpoint of a channel, and a receiver is the receiving endpoint. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
let (tx, rx): (Sender&amp;lt;int&amp;gt;, Receiver&amp;lt;int&amp;gt;) = channel();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    let result = some_expensive_computation();&lt;br /&gt;
    tx.send(result);&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
some_other_expensive_computation();&lt;br /&gt;
let result = rx.recv();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design patterns ==&lt;br /&gt;
&lt;br /&gt;
We will be using &amp;quot;Delegation Pattern&amp;quot; in our project. The Storage interface is used by web applications to access the Web Storage provided by the browser. However, the actual data is stored somewhere else(Database/FileSystem/Memory). So, it makes sense to create another class which will maintain the actual stored data. The Storage class can then delegate the task of storing/retrieving data to this class. We will create a class &amp;quot;WebStorageTask&amp;quot; for this purpose.&lt;br /&gt;
&lt;br /&gt;
== UML diagrams (Eg use case diagram, class diagrams) ==&lt;br /&gt;
[[File:Flow_Chart_Storage.png|200px]]&lt;br /&gt;
&lt;br /&gt;
== Proposed Test Cases ==&lt;br /&gt;
&lt;br /&gt;
== Further Readings ==&lt;br /&gt;
&lt;br /&gt;
Learning Rust by Examples: http://rustbyexample.com/ &amp;lt;br/&amp;gt;&lt;br /&gt;
Javascript as Servo's Garbage Collector: http://blog.mozilla.org/research/2014/08/26/javascript-servos-only-garbage-collector/  &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vankam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=91789</id>
		<title>CSC/ECE 517 Fall 2014/final design doc M1450 navr</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=91789"/>
		<updated>2014-11-11T23:06:54Z</updated>

		<summary type="html">&lt;p&gt;Vankam: /* UML diagrams (Eg use case diagram, class diagrams) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== [http://www.rust-lang.org/ Rust]===&lt;br /&gt;
&lt;br /&gt;
Rust is a modern systems programming language focusing on safety and speed to build reliable and efficient systems &amp;lt;ref&amp;gt; http://doc.rust-lang.org/nightly/intro.html &amp;lt;/ref&amp;gt;. It accomplishes the goals of memory safe without using garbage collection and it supports concurrency and parallelism in building platforms. &lt;br /&gt;
&lt;br /&gt;
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. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [http://github.com/servo/servo/wiki/Design Servo] ===&lt;br /&gt;
&lt;br /&gt;
Mozilla Research team is currently working on an experimental project to develop a new Web browser engine &amp;quot;Servo&amp;quot;, 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.&amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The main objectives of this experimentation project is improving the layout to graphics rendering - to optimize for power efficiency and maximize parallelism. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Purpose ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Background ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Architecture ==&lt;br /&gt;
&lt;br /&gt;
[[File:task.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Architecture Explained ===&lt;br /&gt;
*Each box represents a Rust task.&lt;br /&gt;
*Blue boxes represent the primary tasks in the browser pipeline.&lt;br /&gt;
*Gray boxes represent tasks auxiliary to the browser pipeline.&lt;br /&gt;
*White boxes represent worker tasks. Each such box represents several tasks, the precise number of which will vary with the workload.&lt;br /&gt;
*Dashed lines indicate supervisor relationships.&lt;br /&gt;
*Solid lines indicate communication channels.&lt;br /&gt;
&lt;br /&gt;
== Requirement Analysis &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
As part of our [http://github.com/servo/servo/wiki/Storage-student-project project], we have to implement the [http://html.spec.whatwg.org/multipage/webstorage.html#webstorage Web Storage] specification in Servo. 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. &amp;lt;ref&amp;gt; https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Below is a high level overview of the various steps that need to be carried out to achieve this:&lt;br /&gt;
&lt;br /&gt;
* Create the Storage interface and its stub implementation.&lt;br /&gt;
* Create the WindowSessionStorage interface making it return a Storage instance.&lt;br /&gt;
* Create a Storage Task which will be used to contain all stored data.&lt;br /&gt;
* Define a message-passing interface for reading and writing stored data for a particular browser tab.&lt;br /&gt;
* Use the Storage task in the implementation of Storage.&lt;br /&gt;
* When the value of a stored data is changed, notify its respective browser tab.&lt;br /&gt;
* Pass as many tests as possible.&lt;br /&gt;
* Implement the WindowLocalStorage interface which behaves slightly different from the WindowSessionStorage interface.&lt;br /&gt;
&lt;br /&gt;
== Data Design ==&lt;br /&gt;
&lt;br /&gt;
===  Data Description ===&lt;br /&gt;
&lt;br /&gt;
''The following are the data structures that will be used.''&lt;br /&gt;
&lt;br /&gt;
'''Storage''' | TreeMap&amp;lt;String,String&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''UrlMap''' | TreeMap&amp;lt;String,TreeMap&amp;lt;String,String&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Component Design ==&lt;br /&gt;
[[File:servo.jpg]]&lt;br /&gt;
=== Task ===&lt;br /&gt;
Rust provides safe concurrent abstractions through a number of core library primitives. This guide will describe the concurrency model in Rust, how it relates to the Rust type system, and introduce the fundamental library abstractions for constructing concurrent programs.&lt;br /&gt;
&lt;br /&gt;
Tasks provide failure isolation and recovery. When a fatal error occurs in Rust code as a result of an explicit call to panic!(), an assertion failure, or another invalid operation, the runtime system destroys the entire task. Unlike in languages such as Java and C++, there is no way to catch an exception. Instead, tasks may monitor each other to see if they panic.&lt;br /&gt;
&lt;br /&gt;
Tasks use Rust's type system to provide strong memory safety guarantees. In particular, the type system guarantees that tasks cannot induce a data race from shared mutable state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Generate some state locally&lt;br /&gt;
let child_task_number = generate_task_number();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    // Capture it in the remote task&lt;br /&gt;
    println!(&amp;quot;I am child number {}&amp;quot;, child_task_number);&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Channel ===&lt;br /&gt;
Now that we have spawned a new task, it would be nice if we could communicate with it. For this, we use channels. A channel is simply a pair of endpoints: one for sending messages and another for receiving messages.&lt;br /&gt;
&lt;br /&gt;
The simplest way to create a channel is to use the channel function to create a (Sender, Receiver) pair. In Rust parlance, a sender is a sending endpoint of a channel, and a receiver is the receiving endpoint. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
let (tx, rx): (Sender&amp;lt;int&amp;gt;, Receiver&amp;lt;int&amp;gt;) = channel();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    let result = some_expensive_computation();&lt;br /&gt;
    tx.send(result);&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
some_other_expensive_computation();&lt;br /&gt;
let result = rx.recv();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design patterns ==&lt;br /&gt;
&lt;br /&gt;
We will be using &amp;quot;Delegation Pattern&amp;quot; in our project. The Storage interface is used by web applications to access the Web Storage provided by the browser. However, the actual data is stored somewhere else(Database/FileSystem/Memory). So, it makes sense to create another class which will maintain the actual stored data. The Storage class can then delegate the task of storing/retrieving data to this class. We will create a class &amp;quot;WebStorageTask&amp;quot; for this purpose.&lt;br /&gt;
&lt;br /&gt;
== UML diagrams (Eg use case diagram, class diagrams) ==&lt;br /&gt;
[[File:Flow_Chart_Storage.png]]&lt;br /&gt;
&lt;br /&gt;
== Proposed Test Cases ==&lt;br /&gt;
&lt;br /&gt;
== Further Readings ==&lt;br /&gt;
&lt;br /&gt;
Learning Rust by Examples: http://rustbyexample.com/ &amp;lt;br/&amp;gt;&lt;br /&gt;
Javascript as Servo's Garbage Collector: http://blog.mozilla.org/research/2014/08/26/javascript-servos-only-garbage-collector/  &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vankam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Flow_Chart_Storage.png&amp;diff=91788</id>
		<title>File:Flow Chart Storage.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Flow_Chart_Storage.png&amp;diff=91788"/>
		<updated>2014-11-11T23:06:37Z</updated>

		<summary type="html">&lt;p&gt;Vankam: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Vankam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=91787</id>
		<title>CSC/ECE 517 Fall 2014/final design doc M1450 navr</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=91787"/>
		<updated>2014-11-11T23:05:47Z</updated>

		<summary type="html">&lt;p&gt;Vankam: /* UML diagrams (Eg use case diagram, class diagrams) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== [http://www.rust-lang.org/ Rust]===&lt;br /&gt;
&lt;br /&gt;
Rust is a modern systems programming language focusing on safety and speed to build reliable and efficient systems &amp;lt;ref&amp;gt; http://doc.rust-lang.org/nightly/intro.html &amp;lt;/ref&amp;gt;. It accomplishes the goals of memory safe without using garbage collection and it supports concurrency and parallelism in building platforms. &lt;br /&gt;
&lt;br /&gt;
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. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [http://github.com/servo/servo/wiki/Design Servo] ===&lt;br /&gt;
&lt;br /&gt;
Mozilla Research team is currently working on an experimental project to develop a new Web browser engine &amp;quot;Servo&amp;quot;, 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.&amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The main objectives of this experimentation project is improving the layout to graphics rendering - to optimize for power efficiency and maximize parallelism. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Purpose ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Background ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Architecture ==&lt;br /&gt;
&lt;br /&gt;
[[File:task.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Architecture Explained ===&lt;br /&gt;
*Each box represents a Rust task.&lt;br /&gt;
*Blue boxes represent the primary tasks in the browser pipeline.&lt;br /&gt;
*Gray boxes represent tasks auxiliary to the browser pipeline.&lt;br /&gt;
*White boxes represent worker tasks. Each such box represents several tasks, the precise number of which will vary with the workload.&lt;br /&gt;
*Dashed lines indicate supervisor relationships.&lt;br /&gt;
*Solid lines indicate communication channels.&lt;br /&gt;
&lt;br /&gt;
== Requirement Analysis &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
As part of our [http://github.com/servo/servo/wiki/Storage-student-project project], we have to implement the [http://html.spec.whatwg.org/multipage/webstorage.html#webstorage Web Storage] specification in Servo. 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. &amp;lt;ref&amp;gt; https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Below is a high level overview of the various steps that need to be carried out to achieve this:&lt;br /&gt;
&lt;br /&gt;
* Create the Storage interface and its stub implementation.&lt;br /&gt;
* Create the WindowSessionStorage interface making it return a Storage instance.&lt;br /&gt;
* Create a Storage Task which will be used to contain all stored data.&lt;br /&gt;
* Define a message-passing interface for reading and writing stored data for a particular browser tab.&lt;br /&gt;
* Use the Storage task in the implementation of Storage.&lt;br /&gt;
* When the value of a stored data is changed, notify its respective browser tab.&lt;br /&gt;
* Pass as many tests as possible.&lt;br /&gt;
* Implement the WindowLocalStorage interface which behaves slightly different from the WindowSessionStorage interface.&lt;br /&gt;
&lt;br /&gt;
== Data Design ==&lt;br /&gt;
&lt;br /&gt;
===  Data Description ===&lt;br /&gt;
&lt;br /&gt;
''The following are the data structures that will be used.''&lt;br /&gt;
&lt;br /&gt;
'''Storage''' | TreeMap&amp;lt;String,String&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''UrlMap''' | TreeMap&amp;lt;String,TreeMap&amp;lt;String,String&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Component Design ==&lt;br /&gt;
[[File:servo.jpg]]&lt;br /&gt;
=== Task ===&lt;br /&gt;
Rust provides safe concurrent abstractions through a number of core library primitives. This guide will describe the concurrency model in Rust, how it relates to the Rust type system, and introduce the fundamental library abstractions for constructing concurrent programs.&lt;br /&gt;
&lt;br /&gt;
Tasks provide failure isolation and recovery. When a fatal error occurs in Rust code as a result of an explicit call to panic!(), an assertion failure, or another invalid operation, the runtime system destroys the entire task. Unlike in languages such as Java and C++, there is no way to catch an exception. Instead, tasks may monitor each other to see if they panic.&lt;br /&gt;
&lt;br /&gt;
Tasks use Rust's type system to provide strong memory safety guarantees. In particular, the type system guarantees that tasks cannot induce a data race from shared mutable state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Generate some state locally&lt;br /&gt;
let child_task_number = generate_task_number();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    // Capture it in the remote task&lt;br /&gt;
    println!(&amp;quot;I am child number {}&amp;quot;, child_task_number);&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Channel ===&lt;br /&gt;
Now that we have spawned a new task, it would be nice if we could communicate with it. For this, we use channels. A channel is simply a pair of endpoints: one for sending messages and another for receiving messages.&lt;br /&gt;
&lt;br /&gt;
The simplest way to create a channel is to use the channel function to create a (Sender, Receiver) pair. In Rust parlance, a sender is a sending endpoint of a channel, and a receiver is the receiving endpoint. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
let (tx, rx): (Sender&amp;lt;int&amp;gt;, Receiver&amp;lt;int&amp;gt;) = channel();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    let result = some_expensive_computation();&lt;br /&gt;
    tx.send(result);&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
some_other_expensive_computation();&lt;br /&gt;
let result = rx.recv();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design patterns ==&lt;br /&gt;
&lt;br /&gt;
We will be using &amp;quot;Delegation Pattern&amp;quot; in our project. The Storage interface is used by web applications to access the Web Storage provided by the browser. However, the actual data is stored somewhere else(Database/FileSystem/Memory). So, it makes sense to create another class which will maintain the actual stored data. The Storage class can then delegate the task of storing/retrieving data to this class. We will create a class &amp;quot;WebStorageTask&amp;quot; for this purpose.&lt;br /&gt;
&lt;br /&gt;
== UML diagrams (Eg use case diagram, class diagrams) ==&lt;br /&gt;
[[File:Flow_Chart_Storage.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Proposed Test Cases ==&lt;br /&gt;
&lt;br /&gt;
== Further Readings ==&lt;br /&gt;
&lt;br /&gt;
Learning Rust by Examples: http://rustbyexample.com/ &amp;lt;br/&amp;gt;&lt;br /&gt;
Javascript as Servo's Garbage Collector: http://blog.mozilla.org/research/2014/08/26/javascript-servos-only-garbage-collector/  &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vankam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=91786</id>
		<title>CSC/ECE 517 Fall 2014/final design doc M1450 navr</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=91786"/>
		<updated>2014-11-11T23:05:21Z</updated>

		<summary type="html">&lt;p&gt;Vankam: /* UML diagrams (Eg use case diagram, class diagrams) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== [http://www.rust-lang.org/ Rust]===&lt;br /&gt;
&lt;br /&gt;
Rust is a modern systems programming language focusing on safety and speed to build reliable and efficient systems &amp;lt;ref&amp;gt; http://doc.rust-lang.org/nightly/intro.html &amp;lt;/ref&amp;gt;. It accomplishes the goals of memory safe without using garbage collection and it supports concurrency and parallelism in building platforms. &lt;br /&gt;
&lt;br /&gt;
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. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [http://github.com/servo/servo/wiki/Design Servo] ===&lt;br /&gt;
&lt;br /&gt;
Mozilla Research team is currently working on an experimental project to develop a new Web browser engine &amp;quot;Servo&amp;quot;, 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.&amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The main objectives of this experimentation project is improving the layout to graphics rendering - to optimize for power efficiency and maximize parallelism. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Purpose ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Background ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Architecture ==&lt;br /&gt;
&lt;br /&gt;
[[File:task.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Architecture Explained ===&lt;br /&gt;
*Each box represents a Rust task.&lt;br /&gt;
*Blue boxes represent the primary tasks in the browser pipeline.&lt;br /&gt;
*Gray boxes represent tasks auxiliary to the browser pipeline.&lt;br /&gt;
*White boxes represent worker tasks. Each such box represents several tasks, the precise number of which will vary with the workload.&lt;br /&gt;
*Dashed lines indicate supervisor relationships.&lt;br /&gt;
*Solid lines indicate communication channels.&lt;br /&gt;
&lt;br /&gt;
== Requirement Analysis &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
As part of our [http://github.com/servo/servo/wiki/Storage-student-project project], we have to implement the [http://html.spec.whatwg.org/multipage/webstorage.html#webstorage Web Storage] specification in Servo. 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. &amp;lt;ref&amp;gt; https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Below is a high level overview of the various steps that need to be carried out to achieve this:&lt;br /&gt;
&lt;br /&gt;
* Create the Storage interface and its stub implementation.&lt;br /&gt;
* Create the WindowSessionStorage interface making it return a Storage instance.&lt;br /&gt;
* Create a Storage Task which will be used to contain all stored data.&lt;br /&gt;
* Define a message-passing interface for reading and writing stored data for a particular browser tab.&lt;br /&gt;
* Use the Storage task in the implementation of Storage.&lt;br /&gt;
* When the value of a stored data is changed, notify its respective browser tab.&lt;br /&gt;
* Pass as many tests as possible.&lt;br /&gt;
* Implement the WindowLocalStorage interface which behaves slightly different from the WindowSessionStorage interface.&lt;br /&gt;
&lt;br /&gt;
== Data Design ==&lt;br /&gt;
&lt;br /&gt;
===  Data Description ===&lt;br /&gt;
&lt;br /&gt;
''The following are the data structures that will be used.''&lt;br /&gt;
&lt;br /&gt;
'''Storage''' | TreeMap&amp;lt;String,String&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''UrlMap''' | TreeMap&amp;lt;String,TreeMap&amp;lt;String,String&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Component Design ==&lt;br /&gt;
[[File:servo.jpg]]&lt;br /&gt;
=== Task ===&lt;br /&gt;
Rust provides safe concurrent abstractions through a number of core library primitives. This guide will describe the concurrency model in Rust, how it relates to the Rust type system, and introduce the fundamental library abstractions for constructing concurrent programs.&lt;br /&gt;
&lt;br /&gt;
Tasks provide failure isolation and recovery. When a fatal error occurs in Rust code as a result of an explicit call to panic!(), an assertion failure, or another invalid operation, the runtime system destroys the entire task. Unlike in languages such as Java and C++, there is no way to catch an exception. Instead, tasks may monitor each other to see if they panic.&lt;br /&gt;
&lt;br /&gt;
Tasks use Rust's type system to provide strong memory safety guarantees. In particular, the type system guarantees that tasks cannot induce a data race from shared mutable state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Generate some state locally&lt;br /&gt;
let child_task_number = generate_task_number();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    // Capture it in the remote task&lt;br /&gt;
    println!(&amp;quot;I am child number {}&amp;quot;, child_task_number);&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Channel ===&lt;br /&gt;
Now that we have spawned a new task, it would be nice if we could communicate with it. For this, we use channels. A channel is simply a pair of endpoints: one for sending messages and another for receiving messages.&lt;br /&gt;
&lt;br /&gt;
The simplest way to create a channel is to use the channel function to create a (Sender, Receiver) pair. In Rust parlance, a sender is a sending endpoint of a channel, and a receiver is the receiving endpoint. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
let (tx, rx): (Sender&amp;lt;int&amp;gt;, Receiver&amp;lt;int&amp;gt;) = channel();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    let result = some_expensive_computation();&lt;br /&gt;
    tx.send(result);&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
some_other_expensive_computation();&lt;br /&gt;
let result = rx.recv();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design patterns ==&lt;br /&gt;
&lt;br /&gt;
We will be using &amp;quot;Delegation Pattern&amp;quot; in our project. The Storage interface is used by web applications to access the Web Storage provided by the browser. However, the actual data is stored somewhere else(Database/FileSystem/Memory). So, it makes sense to create another class which will maintain the actual stored data. The Storage class can then delegate the task of storing/retrieving data to this class. We will create a class &amp;quot;WebStorageTask&amp;quot; for this purpose.&lt;br /&gt;
&lt;br /&gt;
== UML diagrams (Eg use case diagram, class diagrams) ==&lt;br /&gt;
[[File:Flow_Chart_Storage.jpg|200px]]&lt;br /&gt;
&lt;br /&gt;
== Proposed Test Cases ==&lt;br /&gt;
&lt;br /&gt;
== Further Readings ==&lt;br /&gt;
&lt;br /&gt;
Learning Rust by Examples: http://rustbyexample.com/ &amp;lt;br/&amp;gt;&lt;br /&gt;
Javascript as Servo's Garbage Collector: http://blog.mozilla.org/research/2014/08/26/javascript-servos-only-garbage-collector/  &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vankam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=91785</id>
		<title>CSC/ECE 517 Fall 2014/final design doc M1450 navr</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=91785"/>
		<updated>2014-11-11T23:04:54Z</updated>

		<summary type="html">&lt;p&gt;Vankam: /* UML diagrams (Eg use case diagram, class diagrams) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== [http://www.rust-lang.org/ Rust]===&lt;br /&gt;
&lt;br /&gt;
Rust is a modern systems programming language focusing on safety and speed to build reliable and efficient systems &amp;lt;ref&amp;gt; http://doc.rust-lang.org/nightly/intro.html &amp;lt;/ref&amp;gt;. It accomplishes the goals of memory safe without using garbage collection and it supports concurrency and parallelism in building platforms. &lt;br /&gt;
&lt;br /&gt;
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. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [http://github.com/servo/servo/wiki/Design Servo] ===&lt;br /&gt;
&lt;br /&gt;
Mozilla Research team is currently working on an experimental project to develop a new Web browser engine &amp;quot;Servo&amp;quot;, 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.&amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The main objectives of this experimentation project is improving the layout to graphics rendering - to optimize for power efficiency and maximize parallelism. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Purpose ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Background ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Architecture ==&lt;br /&gt;
&lt;br /&gt;
[[File:task.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Architecture Explained ===&lt;br /&gt;
*Each box represents a Rust task.&lt;br /&gt;
*Blue boxes represent the primary tasks in the browser pipeline.&lt;br /&gt;
*Gray boxes represent tasks auxiliary to the browser pipeline.&lt;br /&gt;
*White boxes represent worker tasks. Each such box represents several tasks, the precise number of which will vary with the workload.&lt;br /&gt;
*Dashed lines indicate supervisor relationships.&lt;br /&gt;
*Solid lines indicate communication channels.&lt;br /&gt;
&lt;br /&gt;
== Requirement Analysis &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
As part of our [http://github.com/servo/servo/wiki/Storage-student-project project], we have to implement the [http://html.spec.whatwg.org/multipage/webstorage.html#webstorage Web Storage] specification in Servo. 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. &amp;lt;ref&amp;gt; https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Below is a high level overview of the various steps that need to be carried out to achieve this:&lt;br /&gt;
&lt;br /&gt;
* Create the Storage interface and its stub implementation.&lt;br /&gt;
* Create the WindowSessionStorage interface making it return a Storage instance.&lt;br /&gt;
* Create a Storage Task which will be used to contain all stored data.&lt;br /&gt;
* Define a message-passing interface for reading and writing stored data for a particular browser tab.&lt;br /&gt;
* Use the Storage task in the implementation of Storage.&lt;br /&gt;
* When the value of a stored data is changed, notify its respective browser tab.&lt;br /&gt;
* Pass as many tests as possible.&lt;br /&gt;
* Implement the WindowLocalStorage interface which behaves slightly different from the WindowSessionStorage interface.&lt;br /&gt;
&lt;br /&gt;
== Data Design ==&lt;br /&gt;
&lt;br /&gt;
===  Data Description ===&lt;br /&gt;
&lt;br /&gt;
''The following are the data structures that will be used.''&lt;br /&gt;
&lt;br /&gt;
'''Storage''' | TreeMap&amp;lt;String,String&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''UrlMap''' | TreeMap&amp;lt;String,TreeMap&amp;lt;String,String&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Component Design ==&lt;br /&gt;
[[File:servo.jpg]]&lt;br /&gt;
=== Task ===&lt;br /&gt;
Rust provides safe concurrent abstractions through a number of core library primitives. This guide will describe the concurrency model in Rust, how it relates to the Rust type system, and introduce the fundamental library abstractions for constructing concurrent programs.&lt;br /&gt;
&lt;br /&gt;
Tasks provide failure isolation and recovery. When a fatal error occurs in Rust code as a result of an explicit call to panic!(), an assertion failure, or another invalid operation, the runtime system destroys the entire task. Unlike in languages such as Java and C++, there is no way to catch an exception. Instead, tasks may monitor each other to see if they panic.&lt;br /&gt;
&lt;br /&gt;
Tasks use Rust's type system to provide strong memory safety guarantees. In particular, the type system guarantees that tasks cannot induce a data race from shared mutable state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Generate some state locally&lt;br /&gt;
let child_task_number = generate_task_number();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    // Capture it in the remote task&lt;br /&gt;
    println!(&amp;quot;I am child number {}&amp;quot;, child_task_number);&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Channel ===&lt;br /&gt;
Now that we have spawned a new task, it would be nice if we could communicate with it. For this, we use channels. A channel is simply a pair of endpoints: one for sending messages and another for receiving messages.&lt;br /&gt;
&lt;br /&gt;
The simplest way to create a channel is to use the channel function to create a (Sender, Receiver) pair. In Rust parlance, a sender is a sending endpoint of a channel, and a receiver is the receiving endpoint. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
let (tx, rx): (Sender&amp;lt;int&amp;gt;, Receiver&amp;lt;int&amp;gt;) = channel();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    let result = some_expensive_computation();&lt;br /&gt;
    tx.send(result);&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
some_other_expensive_computation();&lt;br /&gt;
let result = rx.recv();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design patterns ==&lt;br /&gt;
&lt;br /&gt;
We will be using &amp;quot;Delegation Pattern&amp;quot; in our project. The Storage interface is used by web applications to access the Web Storage provided by the browser. However, the actual data is stored somewhere else(Database/FileSystem/Memory). So, it makes sense to create another class which will maintain the actual stored data. The Storage class can then delegate the task of storing/retrieving data to this class. We will create a class &amp;quot;WebStorageTask&amp;quot; for this purpose.&lt;br /&gt;
&lt;br /&gt;
== UML diagrams (Eg use case diagram, class diagrams) ==&lt;br /&gt;
[[File:File.png|200px]]&lt;br /&gt;
&lt;br /&gt;
== Proposed Test Cases ==&lt;br /&gt;
&lt;br /&gt;
== Further Readings ==&lt;br /&gt;
&lt;br /&gt;
Learning Rust by Examples: http://rustbyexample.com/ &amp;lt;br/&amp;gt;&lt;br /&gt;
Javascript as Servo's Garbage Collector: http://blog.mozilla.org/research/2014/08/26/javascript-servos-only-garbage-collector/  &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vankam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=91784</id>
		<title>CSC/ECE 517 Fall 2014/final design doc M1450 navr</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/final_design_doc_M1450_navr&amp;diff=91784"/>
		<updated>2014-11-11T23:04:40Z</updated>

		<summary type="html">&lt;p&gt;Vankam: /* UML diagrams (Eg use case diagram, class diagrams) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== [http://www.rust-lang.org/ Rust]===&lt;br /&gt;
&lt;br /&gt;
Rust is a modern systems programming language focusing on safety and speed to build reliable and efficient systems &amp;lt;ref&amp;gt; http://doc.rust-lang.org/nightly/intro.html &amp;lt;/ref&amp;gt;. It accomplishes the goals of memory safe without using garbage collection and it supports concurrency and parallelism in building platforms. &lt;br /&gt;
&lt;br /&gt;
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. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [http://github.com/servo/servo/wiki/Design Servo] ===&lt;br /&gt;
&lt;br /&gt;
Mozilla Research team is currently working on an experimental project to develop a new Web browser engine &amp;quot;Servo&amp;quot;, 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.&amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The main objectives of this experimentation project is improving the layout to graphics rendering - to optimize for power efficiency and maximize parallelism. &amp;lt;ref&amp;gt; https://www.mozilla.org/en-US/research/projects/ &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Purpose ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Background ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Architecture ==&lt;br /&gt;
&lt;br /&gt;
[[File:task.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Architecture Explained ===&lt;br /&gt;
*Each box represents a Rust task.&lt;br /&gt;
*Blue boxes represent the primary tasks in the browser pipeline.&lt;br /&gt;
*Gray boxes represent tasks auxiliary to the browser pipeline.&lt;br /&gt;
*White boxes represent worker tasks. Each such box represents several tasks, the precise number of which will vary with the workload.&lt;br /&gt;
*Dashed lines indicate supervisor relationships.&lt;br /&gt;
*Solid lines indicate communication channels.&lt;br /&gt;
&lt;br /&gt;
== Requirement Analysis &amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
As part of our [http://github.com/servo/servo/wiki/Storage-student-project project], we have to implement the [http://html.spec.whatwg.org/multipage/webstorage.html#webstorage Web Storage] specification in Servo. 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. &amp;lt;ref&amp;gt; https://github.com/servo/servo/wiki/Storage-student-project&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Below is a high level overview of the various steps that need to be carried out to achieve this:&lt;br /&gt;
&lt;br /&gt;
* Create the Storage interface and its stub implementation.&lt;br /&gt;
* Create the WindowSessionStorage interface making it return a Storage instance.&lt;br /&gt;
* Create a Storage Task which will be used to contain all stored data.&lt;br /&gt;
* Define a message-passing interface for reading and writing stored data for a particular browser tab.&lt;br /&gt;
* Use the Storage task in the implementation of Storage.&lt;br /&gt;
* When the value of a stored data is changed, notify its respective browser tab.&lt;br /&gt;
* Pass as many tests as possible.&lt;br /&gt;
* Implement the WindowLocalStorage interface which behaves slightly different from the WindowSessionStorage interface.&lt;br /&gt;
&lt;br /&gt;
== Data Design ==&lt;br /&gt;
&lt;br /&gt;
===  Data Description ===&lt;br /&gt;
&lt;br /&gt;
''The following are the data structures that will be used.''&lt;br /&gt;
&lt;br /&gt;
'''Storage''' | TreeMap&amp;lt;String,String&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''UrlMap''' | TreeMap&amp;lt;String,TreeMap&amp;lt;String,String&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Component Design ==&lt;br /&gt;
[[File:servo.jpg]]&lt;br /&gt;
=== Task ===&lt;br /&gt;
Rust provides safe concurrent abstractions through a number of core library primitives. This guide will describe the concurrency model in Rust, how it relates to the Rust type system, and introduce the fundamental library abstractions for constructing concurrent programs.&lt;br /&gt;
&lt;br /&gt;
Tasks provide failure isolation and recovery. When a fatal error occurs in Rust code as a result of an explicit call to panic!(), an assertion failure, or another invalid operation, the runtime system destroys the entire task. Unlike in languages such as Java and C++, there is no way to catch an exception. Instead, tasks may monitor each other to see if they panic.&lt;br /&gt;
&lt;br /&gt;
Tasks use Rust's type system to provide strong memory safety guarantees. In particular, the type system guarantees that tasks cannot induce a data race from shared mutable state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Generate some state locally&lt;br /&gt;
let child_task_number = generate_task_number();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    // Capture it in the remote task&lt;br /&gt;
    println!(&amp;quot;I am child number {}&amp;quot;, child_task_number);&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Channel ===&lt;br /&gt;
Now that we have spawned a new task, it would be nice if we could communicate with it. For this, we use channels. A channel is simply a pair of endpoints: one for sending messages and another for receiving messages.&lt;br /&gt;
&lt;br /&gt;
The simplest way to create a channel is to use the channel function to create a (Sender, Receiver) pair. In Rust parlance, a sender is a sending endpoint of a channel, and a receiver is the receiving endpoint. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
let (tx, rx): (Sender&amp;lt;int&amp;gt;, Receiver&amp;lt;int&amp;gt;) = channel();&lt;br /&gt;
&lt;br /&gt;
spawn(proc() {&lt;br /&gt;
    let result = some_expensive_computation();&lt;br /&gt;
    tx.send(result);&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
some_other_expensive_computation();&lt;br /&gt;
let result = rx.recv();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design patterns ==&lt;br /&gt;
&lt;br /&gt;
We will be using &amp;quot;Delegation Pattern&amp;quot; in our project. The Storage interface is used by web applications to access the Web Storage provided by the browser. However, the actual data is stored somewhere else(Database/FileSystem/Memory). So, it makes sense to create another class which will maintain the actual stored data. The Storage class can then delegate the task of storing/retrieving data to this class. We will create a class &amp;quot;WebStorageTask&amp;quot; for this purpose.&lt;br /&gt;
&lt;br /&gt;
== UML diagrams (Eg use case diagram, class diagrams) ==&lt;br /&gt;
[[File:File.png|200px|thumb|left|alt text]]&lt;br /&gt;
&lt;br /&gt;
== Proposed Test Cases ==&lt;br /&gt;
&lt;br /&gt;
== Further Readings ==&lt;br /&gt;
&lt;br /&gt;
Learning Rust by Examples: http://rustbyexample.com/ &amp;lt;br/&amp;gt;&lt;br /&gt;
Javascript as Servo's Garbage Collector: http://blog.mozilla.org/research/2014/08/26/javascript-servos-only-garbage-collector/  &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vankam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Flow_Chart_Storage.jpg&amp;diff=91783</id>
		<title>File:Flow Chart Storage.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Flow_Chart_Storage.jpg&amp;diff=91783"/>
		<updated>2014-11-11T23:04:05Z</updated>

		<summary type="html">&lt;p&gt;Vankam: uploaded a new version of &amp;amp;quot;File:Flow Chart Storage.jpg&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Vankam</name></author>
	</entry>
</feed>