<?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=Wpgallih</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=Wpgallih"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Wpgallih"/>
	<updated>2026-06-30T11:03:20Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_M1502_WSRA&amp;diff=97109</id>
		<title>CSC/ECE 517 Spring 2015 M1502 WSRA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_M1502_WSRA&amp;diff=97109"/>
		<updated>2015-05-05T07:06:52Z</updated>

		<summary type="html">&lt;p&gt;Wpgallih: /* Test Cases */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Implement Rust Websocket==&lt;br /&gt;
This project concentrates on implementing Rust WebSocket API for Mozilla's web browser engine, Servo&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
Servo&amp;lt;ref&amp;gt; https://github.com/servo/servo &amp;lt;/ref&amp;gt; is a Web Browser engine written in [https://github.com/rust-lang/rust Rust]. It is an experimental project build that targets new generation of hardware: mobile devices, multi-core processors and high-performance GPUs to obtain power efficiency and maximum parallelism. Implementing WebSocket API for the Servo engine would allow a persistent single TCP socket connection to be established between the client and server that will provide bi-directional, full duplex, messages to be instantly exchanged with little overhead resulting in a very low latency connection and supporting interactive, dynamic applications.&lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
Rust &amp;lt;ref&amp;gt; https://github.com/rust-lang/rust &amp;lt;/ref&amp;gt; is a Systems programming language built in Rust itself that is fast, memory safe and multithreaded, but does not employ a garbage collector or otherwise impose significant runtime overhead. Rust is able to provide both control over hardware and safety which is not the case with other programming languages like C, C++, Python that provide only either control or safety but not both. &lt;br /&gt;
&lt;br /&gt;
===WebSocket===&lt;br /&gt;
WebSockets is a protocol that provides [http://en.wikipedia.org/wiki/Duplex_(telecommunications)#FULL-DUPLEX full-duplex] channel for a TCP connection and makes it possible to open an interactive communication session between the user's browser and a server. With WebSockets, you can send messages to a server and receive event-driven responses without having to request the server for a reply. The [http://dev.w3.org/html5/websockets/ WebSocket] specification defines an API to establish a &amp;quot;socket&amp;quot; connection between a web browser and a server. This establishment involves a handshake following which there is a persistent connection between the client and the server and both parties can start sending data asynchronously.&lt;br /&gt;
&lt;br /&gt;
===Cargo and Crate===&lt;br /&gt;
Cargo &amp;lt;ref&amp;gt;http://doc.crates.io/guide.html&amp;lt;/ref&amp;gt; is a application level package manager that allows Rust projects to declare their various dependencies. Cargo resembles the Bundler in Rails that is used to run Rails app, install required Gems mentioned in the Gemfile. Gemfile correspond to &amp;lt;code&amp;gt; Cargo.toml &amp;lt;/code&amp;gt; file and Gem correspond to &amp;lt;code&amp;gt; Crates &amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cargo introduces two metadata files with various bits of project information, fetches and builds project's dependencies, invokes rustc or another build tool with the correct parameters to build the project.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
&lt;br /&gt;
The goal of this project is to implement WebSocket functionality in to Servo using the Rust WebSocket project. Once this is completed, tests following the HTML spec [https://html.spec.whatwg.org/multipage/comms.html#network] for websockets should pass, as the same spec will be driving development. The project will be completed when the following conditions are true, and all tests have passed. &lt;br /&gt;
* The client can establish a websocket connection&lt;br /&gt;
* The client can send objects to the server through the websocket&lt;br /&gt;
* The client can receive objects from the server through the websocket&lt;br /&gt;
* The client can successfully close the Websocket&lt;br /&gt;
&lt;br /&gt;
If Servo, as the client, is able to successfully perform all of these tasks, then our project will be completed.&lt;br /&gt;
&lt;br /&gt;
==Requirement Analysis==&lt;br /&gt;
The requirements for the implementation is well detailed in the HTML spec shown here [https://html.spec.whatwg.org/multipage/comms.html#feedback-from-the-protocol]. The majority of the requirements have to do with the feedback for the protocol. The entire reading can be seen there. &lt;br /&gt;
&lt;br /&gt;
Outside of the HTML spec, a couple other requirements are necessary. First, Servo must successfully compile with the websocket components included. There are a number of warnings currently with compiling Servo not related to Websocket, but no new ones should be introduced. &lt;br /&gt;
&lt;br /&gt;
Second, we should pass a set of tests already included in Servo's tests/wpt/web-platform-tests/websockets directory. These tests determine if the current websocket implementation fulfills all the requirements for Servo's use. &lt;br /&gt;
&lt;br /&gt;
Finally, we should successfully issue pull requests for each feature as it is completed.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
The full implementation specs are outlined here: https://github.com/servo/servo/wiki/WebSocket-student-project&lt;br /&gt;
&lt;br /&gt;
In general the websocket has 3 functions:&lt;br /&gt;
*Open() - Initiates and connects the websocket to the server. Once the connection is open, hands receives.&lt;br /&gt;
*Send() - Sends application data to the server&lt;br /&gt;
*Close() - Closes the websocket connection&lt;br /&gt;
&lt;br /&gt;
In addition the websocket has the following attributes:&lt;br /&gt;
*readyState - indicates the current state of the websocket. The websocket can be in one of the five states below:&lt;br /&gt;
**Connecting - an initial connection handshake has been started but the server has not responded to the handshake yet&lt;br /&gt;
**Open - the connection has been established (server has responded to the initial connection handshake)&lt;br /&gt;
**Closing - an initial close connection handshake has been started but the server has not responded to the handshake yet&lt;br /&gt;
**Closed - the connection has been closed (server has acknowledged the closing handshake and responded)&lt;br /&gt;
*Extensions - Extensions are being used by the websocket (see full specs link above)&lt;br /&gt;
*Protocol - Protocols being used by the websocket (see full specs link above)&lt;br /&gt;
*bufferedAmount - returns how many bytes of application data has been buffered in the websocket thus far (unsent data)&lt;br /&gt;
&lt;br /&gt;
==Design Patterns==&lt;br /&gt;
&amp;lt;b&amp;gt;[http://en.wikipedia.org/wiki/Factory_%28object-oriented_programming%29 Factory Pattern]&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
For every web application application running on the web browser that requires a websocket for communicating with the server, a new thread needs to be spawned that creates a client end of the socket associated with the web app. Spawning this thread can be considered to be similar to instantiating an object for which Factory Pattern can be employed. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;[http://en.wikipedia.org/wiki/Thread_pool_pattern Thread Pool Pattern]&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Servo's primary objective was to provide concurrency. This concurrency can be attained by scheduling tasks which can be run in parallel. Threads help execute these tasks in parallel. Thread Pool Pattern helps manage these thread. For example, one thread could be to accept new requests for websockets, as a result of which new thread would be spawned (client side of websocket) for that application.&lt;br /&gt;
&lt;br /&gt;
==Test Cases==&lt;br /&gt;
&lt;br /&gt;
The test cases for WebSocket are already implemented and included in Servo. Servo uses a testing system which allows skipping of features not included, or passed. Therefore, when the WebSocket tests are included, it is not only necessary to know how to run them, it is important to be able to use the tools that automatically update the tests passed as well. &lt;br /&gt;
&lt;br /&gt;
First, to include the websocket tests, add the following lines in the tests/wpt/include.ini file:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[websockets]&amp;lt;br&amp;gt;&lt;br /&gt;
skip: false&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, you will need to run the tests, and update the test expectations from the results. To run the tests, do the following command:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
./mach test-wpt --log-raw /tmp/servo.log&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The servo.log will be used to update the test expectations. Once the tests have finished, update the test expectations using the following command:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
./mach update-wpt /tmp/servo.log&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Further reading on updating the test harness for Servo can be found here [http://mxr.mozilla.org/servo/source/tests/wpt/README.md#71]&lt;br /&gt;
&lt;br /&gt;
In addition to the test cases provided by Servo, we included a test websocket page which used all of the expected interface for a websocket. This was more a design to interface, where each stage of including a function could be seen on progress on our test page. This test page came from her: [http://www.websocket.org/echo.html] and is stored in tests/html/test-websocket.html. To run this test, use the following command:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
./mach run tests/html/test-websocket.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This code will open a websocket, print connected, send a message, then print a received message before closing. As stated before, this is more a test to interface tool, instead of testing the conformance to spec and robustness of the code created.&lt;br /&gt;
&lt;br /&gt;
==Further Readings==&lt;br /&gt;
&amp;lt;b&amp;gt;[https://html.spec.whatwg.org/multipage/comms.html#network HTML Spec for WebSockets]&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;[https://github.com/servo/servo/wiki/WebSocket-student-project Mozilla Websocket Project Page]&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;[https://github.com/servo/servo Servo github]&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;[http://cyderize.github.io/rust-websocket/ Rust Websocket]&amp;lt;/b&amp;gt;&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>Wpgallih</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_M1502_WSRA&amp;diff=97108</id>
		<title>CSC/ECE 517 Spring 2015 M1502 WSRA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_M1502_WSRA&amp;diff=97108"/>
		<updated>2015-05-05T07:03:21Z</updated>

		<summary type="html">&lt;p&gt;Wpgallih: /* Test Cases */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Implement Rust Websocket==&lt;br /&gt;
This project concentrates on implementing Rust WebSocket API for Mozilla's web browser engine, Servo&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
Servo&amp;lt;ref&amp;gt; https://github.com/servo/servo &amp;lt;/ref&amp;gt; is a Web Browser engine written in [https://github.com/rust-lang/rust Rust]. It is an experimental project build that targets new generation of hardware: mobile devices, multi-core processors and high-performance GPUs to obtain power efficiency and maximum parallelism. Implementing WebSocket API for the Servo engine would allow a persistent single TCP socket connection to be established between the client and server that will provide bi-directional, full duplex, messages to be instantly exchanged with little overhead resulting in a very low latency connection and supporting interactive, dynamic applications.&lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
Rust &amp;lt;ref&amp;gt; https://github.com/rust-lang/rust &amp;lt;/ref&amp;gt; is a Systems programming language built in Rust itself that is fast, memory safe and multithreaded, but does not employ a garbage collector or otherwise impose significant runtime overhead. Rust is able to provide both control over hardware and safety which is not the case with other programming languages like C, C++, Python that provide only either control or safety but not both. &lt;br /&gt;
&lt;br /&gt;
===WebSocket===&lt;br /&gt;
WebSockets is a protocol that provides [http://en.wikipedia.org/wiki/Duplex_(telecommunications)#FULL-DUPLEX full-duplex] channel for a TCP connection and makes it possible to open an interactive communication session between the user's browser and a server. With WebSockets, you can send messages to a server and receive event-driven responses without having to request the server for a reply. The [http://dev.w3.org/html5/websockets/ WebSocket] specification defines an API to establish a &amp;quot;socket&amp;quot; connection between a web browser and a server. This establishment involves a handshake following which there is a persistent connection between the client and the server and both parties can start sending data asynchronously.&lt;br /&gt;
&lt;br /&gt;
===Cargo and Crate===&lt;br /&gt;
Cargo &amp;lt;ref&amp;gt;http://doc.crates.io/guide.html&amp;lt;/ref&amp;gt; is a application level package manager that allows Rust projects to declare their various dependencies. Cargo resembles the Bundler in Rails that is used to run Rails app, install required Gems mentioned in the Gemfile. Gemfile correspond to &amp;lt;code&amp;gt; Cargo.toml &amp;lt;/code&amp;gt; file and Gem correspond to &amp;lt;code&amp;gt; Crates &amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cargo introduces two metadata files with various bits of project information, fetches and builds project's dependencies, invokes rustc or another build tool with the correct parameters to build the project.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
&lt;br /&gt;
The goal of this project is to implement WebSocket functionality in to Servo using the Rust WebSocket project. Once this is completed, tests following the HTML spec [https://html.spec.whatwg.org/multipage/comms.html#network] for websockets should pass, as the same spec will be driving development. The project will be completed when the following conditions are true, and all tests have passed. &lt;br /&gt;
* The client can establish a websocket connection&lt;br /&gt;
* The client can send objects to the server through the websocket&lt;br /&gt;
* The client can receive objects from the server through the websocket&lt;br /&gt;
* The client can successfully close the Websocket&lt;br /&gt;
&lt;br /&gt;
If Servo, as the client, is able to successfully perform all of these tasks, then our project will be completed.&lt;br /&gt;
&lt;br /&gt;
==Requirement Analysis==&lt;br /&gt;
The requirements for the implementation is well detailed in the HTML spec shown here [https://html.spec.whatwg.org/multipage/comms.html#feedback-from-the-protocol]. The majority of the requirements have to do with the feedback for the protocol. The entire reading can be seen there. &lt;br /&gt;
&lt;br /&gt;
Outside of the HTML spec, a couple other requirements are necessary. First, Servo must successfully compile with the websocket components included. There are a number of warnings currently with compiling Servo not related to Websocket, but no new ones should be introduced. &lt;br /&gt;
&lt;br /&gt;
Second, we should pass a set of tests already included in Servo's tests/wpt/web-platform-tests/websockets directory. These tests determine if the current websocket implementation fulfills all the requirements for Servo's use. &lt;br /&gt;
&lt;br /&gt;
Finally, we should successfully issue pull requests for each feature as it is completed.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
The full implementation specs are outlined here: https://github.com/servo/servo/wiki/WebSocket-student-project&lt;br /&gt;
&lt;br /&gt;
In general the websocket has 3 functions:&lt;br /&gt;
*Open() - Initiates and connects the websocket to the server. Once the connection is open, hands receives.&lt;br /&gt;
*Send() - Sends application data to the server&lt;br /&gt;
*Close() - Closes the websocket connection&lt;br /&gt;
&lt;br /&gt;
In addition the websocket has the following attributes:&lt;br /&gt;
*readyState - indicates the current state of the websocket. The websocket can be in one of the five states below:&lt;br /&gt;
**Connecting - an initial connection handshake has been started but the server has not responded to the handshake yet&lt;br /&gt;
**Open - the connection has been established (server has responded to the initial connection handshake)&lt;br /&gt;
**Closing - an initial close connection handshake has been started but the server has not responded to the handshake yet&lt;br /&gt;
**Closed - the connection has been closed (server has acknowledged the closing handshake and responded)&lt;br /&gt;
*Extensions - Extensions are being used by the websocket (see full specs link above)&lt;br /&gt;
*Protocol - Protocols being used by the websocket (see full specs link above)&lt;br /&gt;
*bufferedAmount - returns how many bytes of application data has been buffered in the websocket thus far (unsent data)&lt;br /&gt;
&lt;br /&gt;
==Design Patterns==&lt;br /&gt;
&amp;lt;b&amp;gt;[http://en.wikipedia.org/wiki/Factory_%28object-oriented_programming%29 Factory Pattern]&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
For every web application application running on the web browser that requires a websocket for communicating with the server, a new thread needs to be spawned that creates a client end of the socket associated with the web app. Spawning this thread can be considered to be similar to instantiating an object for which Factory Pattern can be employed. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;[http://en.wikipedia.org/wiki/Thread_pool_pattern Thread Pool Pattern]&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Servo's primary objective was to provide concurrency. This concurrency can be attained by scheduling tasks which can be run in parallel. Threads help execute these tasks in parallel. Thread Pool Pattern helps manage these thread. For example, one thread could be to accept new requests for websockets, as a result of which new thread would be spawned (client side of websocket) for that application.&lt;br /&gt;
&lt;br /&gt;
==Test Cases==&lt;br /&gt;
&lt;br /&gt;
The test cases for WebSocket are already implemented and included in Servo. Servo uses a testing system which allows skipping of features not included, or passed. Therefore, when the WebSocket tests are included, it is not only necessary to know how to run them, it is important to be able to use the tools that automatically update the tests passed as well. &lt;br /&gt;
&lt;br /&gt;
First, to include the websocket tests, add the following lines in the tests/wpt/include.ini file:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[websockets]&amp;lt;br&amp;gt;&lt;br /&gt;
skip: false&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, you will need to run the tests, and update the test expectations from the results. To run the tests, do the following command:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
./mach test-wpt --log-raw /tmp/servo.log&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The servo.log will be used to update the test expectations. Once the tests have finished, update the test expectations using the following command:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
./mach update-wpt /tmp/servo.log&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Further reading on updating the test harness for Servo can be found here [http://mxr.mozilla.org/servo/source/tests/wpt/README.md#71]&lt;br /&gt;
&lt;br /&gt;
In addition to the test cases provided by Servo, we included a test websocket page which used all of the expected interface for a websocket. This was more a design to interface, where each stage of including a function could be seen on progress on our test page. This test page came from her: [http://www.websocket.org/echo.html] and is stored in tests/html/test-websocket.html. To run this test, use the following command:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
./mach run tests/html/test-websocket.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Further Readings==&lt;br /&gt;
&amp;lt;b&amp;gt;[https://html.spec.whatwg.org/multipage/comms.html#network HTML Spec for WebSockets]&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;[https://github.com/servo/servo/wiki/WebSocket-student-project Mozilla Websocket Project Page]&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;[https://github.com/servo/servo Servo github]&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;[http://cyderize.github.io/rust-websocket/ Rust Websocket]&amp;lt;/b&amp;gt;&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>Wpgallih</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_M1502_WSRA&amp;diff=97107</id>
		<title>CSC/ECE 517 Spring 2015 M1502 WSRA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_M1502_WSRA&amp;diff=97107"/>
		<updated>2015-05-05T06:54:40Z</updated>

		<summary type="html">&lt;p&gt;Wpgallih: /* Test Cases */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Implement Rust Websocket==&lt;br /&gt;
This project concentrates on implementing Rust WebSocket API for Mozilla's web browser engine, Servo&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
Servo&amp;lt;ref&amp;gt; https://github.com/servo/servo &amp;lt;/ref&amp;gt; is a Web Browser engine written in [https://github.com/rust-lang/rust Rust]. It is an experimental project build that targets new generation of hardware: mobile devices, multi-core processors and high-performance GPUs to obtain power efficiency and maximum parallelism. Implementing WebSocket API for the Servo engine would allow a persistent single TCP socket connection to be established between the client and server that will provide bi-directional, full duplex, messages to be instantly exchanged with little overhead resulting in a very low latency connection and supporting interactive, dynamic applications.&lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
Rust &amp;lt;ref&amp;gt; https://github.com/rust-lang/rust &amp;lt;/ref&amp;gt; is a Systems programming language built in Rust itself that is fast, memory safe and multithreaded, but does not employ a garbage collector or otherwise impose significant runtime overhead. Rust is able to provide both control over hardware and safety which is not the case with other programming languages like C, C++, Python that provide only either control or safety but not both. &lt;br /&gt;
&lt;br /&gt;
===WebSocket===&lt;br /&gt;
WebSockets is a protocol that provides [http://en.wikipedia.org/wiki/Duplex_(telecommunications)#FULL-DUPLEX full-duplex] channel for a TCP connection and makes it possible to open an interactive communication session between the user's browser and a server. With WebSockets, you can send messages to a server and receive event-driven responses without having to request the server for a reply. The [http://dev.w3.org/html5/websockets/ WebSocket] specification defines an API to establish a &amp;quot;socket&amp;quot; connection between a web browser and a server. This establishment involves a handshake following which there is a persistent connection between the client and the server and both parties can start sending data asynchronously.&lt;br /&gt;
&lt;br /&gt;
===Cargo and Crate===&lt;br /&gt;
Cargo &amp;lt;ref&amp;gt;http://doc.crates.io/guide.html&amp;lt;/ref&amp;gt; is a application level package manager that allows Rust projects to declare their various dependencies. Cargo resembles the Bundler in Rails that is used to run Rails app, install required Gems mentioned in the Gemfile. Gemfile correspond to &amp;lt;code&amp;gt; Cargo.toml &amp;lt;/code&amp;gt; file and Gem correspond to &amp;lt;code&amp;gt; Crates &amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cargo introduces two metadata files with various bits of project information, fetches and builds project's dependencies, invokes rustc or another build tool with the correct parameters to build the project.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
&lt;br /&gt;
The goal of this project is to implement WebSocket functionality in to Servo using the Rust WebSocket project. Once this is completed, tests following the HTML spec [https://html.spec.whatwg.org/multipage/comms.html#network] for websockets should pass, as the same spec will be driving development. The project will be completed when the following conditions are true, and all tests have passed. &lt;br /&gt;
* The client can establish a websocket connection&lt;br /&gt;
* The client can send objects to the server through the websocket&lt;br /&gt;
* The client can receive objects from the server through the websocket&lt;br /&gt;
* The client can successfully close the Websocket&lt;br /&gt;
&lt;br /&gt;
If Servo, as the client, is able to successfully perform all of these tasks, then our project will be completed.&lt;br /&gt;
&lt;br /&gt;
==Requirement Analysis==&lt;br /&gt;
The requirements for the implementation is well detailed in the HTML spec shown here [https://html.spec.whatwg.org/multipage/comms.html#feedback-from-the-protocol]. The majority of the requirements have to do with the feedback for the protocol. The entire reading can be seen there. &lt;br /&gt;
&lt;br /&gt;
Outside of the HTML spec, a couple other requirements are necessary. First, Servo must successfully compile with the websocket components included. There are a number of warnings currently with compiling Servo not related to Websocket, but no new ones should be introduced. &lt;br /&gt;
&lt;br /&gt;
Second, we should pass a set of tests already included in Servo's tests/wpt/web-platform-tests/websockets directory. These tests determine if the current websocket implementation fulfills all the requirements for Servo's use. &lt;br /&gt;
&lt;br /&gt;
Finally, we should successfully issue pull requests for each feature as it is completed.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
The full implementation specs are outlined here: https://github.com/servo/servo/wiki/WebSocket-student-project&lt;br /&gt;
&lt;br /&gt;
In general the websocket has 3 functions:&lt;br /&gt;
*Open() - Initiates and connects the websocket to the server. Once the connection is open, hands receives.&lt;br /&gt;
*Send() - Sends application data to the server&lt;br /&gt;
*Close() - Closes the websocket connection&lt;br /&gt;
&lt;br /&gt;
In addition the websocket has the following attributes:&lt;br /&gt;
*readyState - indicates the current state of the websocket. The websocket can be in one of the five states below:&lt;br /&gt;
**Connecting - an initial connection handshake has been started but the server has not responded to the handshake yet&lt;br /&gt;
**Open - the connection has been established (server has responded to the initial connection handshake)&lt;br /&gt;
**Closing - an initial close connection handshake has been started but the server has not responded to the handshake yet&lt;br /&gt;
**Closed - the connection has been closed (server has acknowledged the closing handshake and responded)&lt;br /&gt;
*Extensions - Extensions are being used by the websocket (see full specs link above)&lt;br /&gt;
*Protocol - Protocols being used by the websocket (see full specs link above)&lt;br /&gt;
*bufferedAmount - returns how many bytes of application data has been buffered in the websocket thus far (unsent data)&lt;br /&gt;
&lt;br /&gt;
==Design Patterns==&lt;br /&gt;
&amp;lt;b&amp;gt;[http://en.wikipedia.org/wiki/Factory_%28object-oriented_programming%29 Factory Pattern]&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
For every web application application running on the web browser that requires a websocket for communicating with the server, a new thread needs to be spawned that creates a client end of the socket associated with the web app. Spawning this thread can be considered to be similar to instantiating an object for which Factory Pattern can be employed. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;[http://en.wikipedia.org/wiki/Thread_pool_pattern Thread Pool Pattern]&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Servo's primary objective was to provide concurrency. This concurrency can be attained by scheduling tasks which can be run in parallel. Threads help execute these tasks in parallel. Thread Pool Pattern helps manage these thread. For example, one thread could be to accept new requests for websockets, as a result of which new thread would be spawned (client side of websocket) for that application.&lt;br /&gt;
&lt;br /&gt;
==Test Cases==&lt;br /&gt;
&lt;br /&gt;
The test cases for WebSocket are already implemented and included in Servo. Servo uses a testing system which allows skipping of features not included, or passed. Therefore, when the WebSocket tests are included, it is not only necessary to know how to run them, it is important to be able to use the tools that automatically update the tests passed as well. &lt;br /&gt;
&lt;br /&gt;
First, to include the websocket tests, add the following lines in the tests/wpt/include.ini file:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[websockets]&amp;lt;br&amp;gt;&lt;br /&gt;
skip: false&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Further Readings==&lt;br /&gt;
&amp;lt;b&amp;gt;[https://html.spec.whatwg.org/multipage/comms.html#network HTML Spec for WebSockets]&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;[https://github.com/servo/servo/wiki/WebSocket-student-project Mozilla Websocket Project Page]&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;[https://github.com/servo/servo Servo github]&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;[http://cyderize.github.io/rust-websocket/ Rust Websocket]&amp;lt;/b&amp;gt;&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>Wpgallih</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_M1502_WSRA&amp;diff=97106</id>
		<title>CSC/ECE 517 Spring 2015 M1502 WSRA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_M1502_WSRA&amp;diff=97106"/>
		<updated>2015-05-05T06:53:52Z</updated>

		<summary type="html">&lt;p&gt;Wpgallih: /* Proposed Test Cases */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Implement Rust Websocket==&lt;br /&gt;
This project concentrates on implementing Rust WebSocket API for Mozilla's web browser engine, Servo&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
Servo&amp;lt;ref&amp;gt; https://github.com/servo/servo &amp;lt;/ref&amp;gt; is a Web Browser engine written in [https://github.com/rust-lang/rust Rust]. It is an experimental project build that targets new generation of hardware: mobile devices, multi-core processors and high-performance GPUs to obtain power efficiency and maximum parallelism. Implementing WebSocket API for the Servo engine would allow a persistent single TCP socket connection to be established between the client and server that will provide bi-directional, full duplex, messages to be instantly exchanged with little overhead resulting in a very low latency connection and supporting interactive, dynamic applications.&lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
Rust &amp;lt;ref&amp;gt; https://github.com/rust-lang/rust &amp;lt;/ref&amp;gt; is a Systems programming language built in Rust itself that is fast, memory safe and multithreaded, but does not employ a garbage collector or otherwise impose significant runtime overhead. Rust is able to provide both control over hardware and safety which is not the case with other programming languages like C, C++, Python that provide only either control or safety but not both. &lt;br /&gt;
&lt;br /&gt;
===WebSocket===&lt;br /&gt;
WebSockets is a protocol that provides [http://en.wikipedia.org/wiki/Duplex_(telecommunications)#FULL-DUPLEX full-duplex] channel for a TCP connection and makes it possible to open an interactive communication session between the user's browser and a server. With WebSockets, you can send messages to a server and receive event-driven responses without having to request the server for a reply. The [http://dev.w3.org/html5/websockets/ WebSocket] specification defines an API to establish a &amp;quot;socket&amp;quot; connection between a web browser and a server. This establishment involves a handshake following which there is a persistent connection between the client and the server and both parties can start sending data asynchronously.&lt;br /&gt;
&lt;br /&gt;
===Cargo and Crate===&lt;br /&gt;
Cargo &amp;lt;ref&amp;gt;http://doc.crates.io/guide.html&amp;lt;/ref&amp;gt; is a application level package manager that allows Rust projects to declare their various dependencies. Cargo resembles the Bundler in Rails that is used to run Rails app, install required Gems mentioned in the Gemfile. Gemfile correspond to &amp;lt;code&amp;gt; Cargo.toml &amp;lt;/code&amp;gt; file and Gem correspond to &amp;lt;code&amp;gt; Crates &amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cargo introduces two metadata files with various bits of project information, fetches and builds project's dependencies, invokes rustc or another build tool with the correct parameters to build the project.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
&lt;br /&gt;
The goal of this project is to implement WebSocket functionality in to Servo using the Rust WebSocket project. Once this is completed, tests following the HTML spec [https://html.spec.whatwg.org/multipage/comms.html#network] for websockets should pass, as the same spec will be driving development. The project will be completed when the following conditions are true, and all tests have passed. &lt;br /&gt;
* The client can establish a websocket connection&lt;br /&gt;
* The client can send objects to the server through the websocket&lt;br /&gt;
* The client can receive objects from the server through the websocket&lt;br /&gt;
* The client can successfully close the Websocket&lt;br /&gt;
&lt;br /&gt;
If Servo, as the client, is able to successfully perform all of these tasks, then our project will be completed.&lt;br /&gt;
&lt;br /&gt;
==Requirement Analysis==&lt;br /&gt;
The requirements for the implementation is well detailed in the HTML spec shown here [https://html.spec.whatwg.org/multipage/comms.html#feedback-from-the-protocol]. The majority of the requirements have to do with the feedback for the protocol. The entire reading can be seen there. &lt;br /&gt;
&lt;br /&gt;
Outside of the HTML spec, a couple other requirements are necessary. First, Servo must successfully compile with the websocket components included. There are a number of warnings currently with compiling Servo not related to Websocket, but no new ones should be introduced. &lt;br /&gt;
&lt;br /&gt;
Second, we should pass a set of tests already included in Servo's tests/wpt/web-platform-tests/websockets directory. These tests determine if the current websocket implementation fulfills all the requirements for Servo's use. &lt;br /&gt;
&lt;br /&gt;
Finally, we should successfully issue pull requests for each feature as it is completed.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
The full implementation specs are outlined here: https://github.com/servo/servo/wiki/WebSocket-student-project&lt;br /&gt;
&lt;br /&gt;
In general the websocket has 3 functions:&lt;br /&gt;
*Open() - Initiates and connects the websocket to the server. Once the connection is open, hands receives.&lt;br /&gt;
*Send() - Sends application data to the server&lt;br /&gt;
*Close() - Closes the websocket connection&lt;br /&gt;
&lt;br /&gt;
In addition the websocket has the following attributes:&lt;br /&gt;
*readyState - indicates the current state of the websocket. The websocket can be in one of the five states below:&lt;br /&gt;
**Connecting - an initial connection handshake has been started but the server has not responded to the handshake yet&lt;br /&gt;
**Open - the connection has been established (server has responded to the initial connection handshake)&lt;br /&gt;
**Closing - an initial close connection handshake has been started but the server has not responded to the handshake yet&lt;br /&gt;
**Closed - the connection has been closed (server has acknowledged the closing handshake and responded)&lt;br /&gt;
*Extensions - Extensions are being used by the websocket (see full specs link above)&lt;br /&gt;
*Protocol - Protocols being used by the websocket (see full specs link above)&lt;br /&gt;
*bufferedAmount - returns how many bytes of application data has been buffered in the websocket thus far (unsent data)&lt;br /&gt;
&lt;br /&gt;
==Design Patterns==&lt;br /&gt;
&amp;lt;b&amp;gt;[http://en.wikipedia.org/wiki/Factory_%28object-oriented_programming%29 Factory Pattern]&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
For every web application application running on the web browser that requires a websocket for communicating with the server, a new thread needs to be spawned that creates a client end of the socket associated with the web app. Spawning this thread can be considered to be similar to instantiating an object for which Factory Pattern can be employed. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;[http://en.wikipedia.org/wiki/Thread_pool_pattern Thread Pool Pattern]&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Servo's primary objective was to provide concurrency. This concurrency can be attained by scheduling tasks which can be run in parallel. Threads help execute these tasks in parallel. Thread Pool Pattern helps manage these thread. For example, one thread could be to accept new requests for websockets, as a result of which new thread would be spawned (client side of websocket) for that application.&lt;br /&gt;
&lt;br /&gt;
==Test Cases==&lt;br /&gt;
&lt;br /&gt;
The test cases for WebSocket are already implemented and included in Servo. Servo uses a testing system which allows skipping of features not included, or passed. Therefore, when the WebSocket tests are included, it is not only necessary to know how to run them, it is important to be able to use the tools that automatically update the tests passed as well. &lt;br /&gt;
&lt;br /&gt;
First, to include the websocket tests, add the following lines in the tests/wpt/include.ini file:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
[websockets]&lt;br /&gt;
skip: false&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Further Readings==&lt;br /&gt;
&amp;lt;b&amp;gt;[https://html.spec.whatwg.org/multipage/comms.html#network HTML Spec for WebSockets]&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;[https://github.com/servo/servo/wiki/WebSocket-student-project Mozilla Websocket Project Page]&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;[https://github.com/servo/servo Servo github]&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;[http://cyderize.github.io/rust-websocket/ Rust Websocket]&amp;lt;/b&amp;gt;&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>Wpgallih</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_M1502_WSRA&amp;diff=96473</id>
		<title>CSC/ECE 517 Spring 2015 M1502 WSRA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_M1502_WSRA&amp;diff=96473"/>
		<updated>2015-04-02T01:56:30Z</updated>

		<summary type="html">&lt;p&gt;Wpgallih: /* Further Readings */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Implement Rust Websocket==&lt;br /&gt;
This project concentrates on implementing Rust WebSocket API for Mozilla's web browser engine, Servo&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
Servo&amp;lt;ref&amp;gt; https://github.com/servo/servo &amp;lt;/ref&amp;gt; is a Web Browser engine written in [https://github.com/rust-lang/rust Rust]. It is an experimental project build that targets new generation of hardware: mobile devices, multi-core processors and high-performance GPUs to obtain power efficiency and maximum parallelism. Implementing WebSocket API for the Servo engine would allow a persistent single TCP socket connection to be established between the client and server that will provide bi-directional, full duplex, messages to be instantly exchanged with little overhead resulting in a very low latency connection and supporting interactive, dynamic applications.&lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
Rust &amp;lt;ref&amp;gt; https://github.com/rust-lang/rust &amp;lt;/ref&amp;gt; is a Systems programming language built in Rust itself that is fast, memory safe and multithreaded, but does not employ a garbage collector or otherwise impose significant runtime overhead. Rust is able to provide both control over hardware and safety which is not the case with other programming languages like C, C++, Python that provide only either control or safety but not both. &lt;br /&gt;
&lt;br /&gt;
===WebSocket===&lt;br /&gt;
WebSockets is a protocol that provides [http://en.wikipedia.org/wiki/Duplex_(telecommunications)#FULL-DUPLEX full-duplex] channel for a TCP connection and makes it possible to open an interactive communication session between the user's browser and a server. With WebSockets, you can send messages to a server and receive event-driven responses without having to request the server for a reply. The [http://dev.w3.org/html5/websockets/ WebSocket] specification defines an API to establish a &amp;quot;socket&amp;quot; connection between a web browser and a server. This establishment involves a handshake following which there is a persistent connection between the client and the server and both parties can start sending data asynchronously.&lt;br /&gt;
&lt;br /&gt;
===Cargo and Crate===&lt;br /&gt;
Cargo &amp;lt;ref&amp;gt;http://doc.crates.io/guide.html&amp;lt;/ref&amp;gt; is a application level package manager that allows Rust projects to declare their various dependencies. Cargo resembles the Bundler in Rails that is used to run Rails app, install required Gems mentioned in the Gemfile. Gemfile correspond to &amp;lt;code&amp;gt; Cargo.toml &amp;lt;/code&amp;gt; file and Gem correspond to &amp;lt;code&amp;gt; Crates &amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cargo introduces two metadata files with various bits of project information, fetches and builds project's dependencies, invokes rustc or another build tool with the correct parameters to build the project.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
&lt;br /&gt;
The goal of this project is to implement WebSocket functionality in to Servo using the Rust WebSocket project. Once this is completed, tests following the HTML spec [https://html.spec.whatwg.org/multipage/comms.html#network] for websockets should pass, as the same spec will be driving development. The project will be completed when the following conditions are true, and all tests have passed. &lt;br /&gt;
* The client can establish a websocket connection&lt;br /&gt;
* The client can send objects to the server through the websocket&lt;br /&gt;
* The client can receive objects from the server through the websocket&lt;br /&gt;
* The client can successfully close the Websocket&lt;br /&gt;
&lt;br /&gt;
If Servo, as the client, is able to successfully perform all of these tasks, then our project will be completed.&lt;br /&gt;
&lt;br /&gt;
==Requirement Analysis==&lt;br /&gt;
The requirements for the implementation is well detailed in the HTML spec shown here [https://html.spec.whatwg.org/multipage/comms.html#feedback-from-the-protocol]. The majority of the requirements have to do with the feedback for the protocol. The entire reading can be seen there. &lt;br /&gt;
&lt;br /&gt;
Outside of the HTML spec, a couple other requirements are necessary. First, Servo must successfully compile with the websocket components included. There are a number of warnings currently with compiling Servo not related to Websocket, but no new ones should be introduced. &lt;br /&gt;
&lt;br /&gt;
Second, we should pass a set of tests already included in Servo's tests/wpt/web-platform-tests/websockets directory. These tests determine if the current websocket implementation fulfills all the requirements for Servo's use. &lt;br /&gt;
&lt;br /&gt;
Finally, we should successfully issue pull requests for each feature as it is completed.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
'''When the WebSocket connection is established, the user agent must queue a task to run these steps:'''&lt;br /&gt;
*If the WebSocket object's client-specified protocols was not an empty list, but the subprotocol in use is the null value, then fail the WebSocket connection, set the readyState attribute's value to CLOSING, and abort these steps.&lt;br /&gt;
*Change the readyState attribute's value to OPEN.&lt;br /&gt;
*Change the extensions attribute's value to the extensions in use, if is not the null value.&lt;br /&gt;
*Change the protocol attribute's value to the subprotocol in use, if is not the null value.&lt;br /&gt;
*Act as if the user agent had received a set-cookie-string consisting of the cookies set during the server's opening handshake, for the URL url given to the WebSocket() constructor.&lt;br /&gt;
*Fire a simple event named open at the WebSocket object.&lt;br /&gt;
&lt;br /&gt;
'''When a WebSocket message has been received with type type and data data, the user agent must queue a task to follow these steps:'''&lt;br /&gt;
*If the readyState attribute's value is not OPEN, then abort these steps.&lt;br /&gt;
*Let event be a newly created trusted event that uses the MessageEvent interface, with the event type message, which does not bubble, is not cancelable, and has no default action.&lt;br /&gt;
*Initialise event's origin attribute to the Unicode serialisation of the origin of the URL that was passed to the WebSocket object's constructor.&lt;br /&gt;
*If type indicates that the data is Text, then initialise event's data attribute to data.&lt;br /&gt;
*If type indicates that the data is Binary, and binaryType is set to &amp;quot;blob&amp;quot;, then initialise event's data attribute to a new Blob object that represents data as its raw data.&lt;br /&gt;
*If type indicates that the data is Binary, and binaryType is set to &amp;quot;arraybuffer&amp;quot;, then initialise event's data attribute to a new ArrayBuffer object whose contents are data.&lt;br /&gt;
*Dispatch event at the WebSocket object.&lt;br /&gt;
&lt;br /&gt;
==Design Patterns==&lt;br /&gt;
&amp;lt;b&amp;gt;[http://en.wikipedia.org/wiki/Factory_%28object-oriented_programming%29 Factory Pattern]&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
For every web application application running on the web browser that requires a websocket for communicating with the server, a new thread needs to be spawned that creates a client end of the socket associated with the web app. Spawning this thread can be considered to be similar to instantiating an object for which Factory Pattern can be employed. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;[http://en.wikipedia.org/wiki/Thread_pool_pattern Thread Pool Pattern]&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Servo's primary objective was to provide concurrency. This concurrency can be attained by scheduling tasks which can be run in parallel. Threads help execute these tasks in parallel. Thread Pool Pattern helps manage these thread. For example, one thread could be to accept new requests for websockets, as a result of which new thread would be spawned (client side of websocket) for that application.&lt;br /&gt;
&lt;br /&gt;
==Proposed Test Cases==&lt;br /&gt;
&lt;br /&gt;
The test cases for websocket are already included in servo, under the Servo directory tests/wpt/web-platform-tests/websockets. To break down how each should be tested, here are the proposed scenarios:&lt;br /&gt;
* The send function should send some object, then wait for confirmation of sending.&lt;br /&gt;
* The constructor should make a websocket connection to the URL and either open the connection or close it based on the response coming in. &lt;br /&gt;
* The receive function should trigger on receiving an object, then send confirmation. &lt;br /&gt;
&lt;br /&gt;
All of these are tested thoroughly in the directory given at the beginning of this section.&lt;br /&gt;
&lt;br /&gt;
==Further Readings==&lt;br /&gt;
&amp;lt;b&amp;gt;[https://html.spec.whatwg.org/multipage/comms.html#network HTML Spec for WebSockets]&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;[https://github.com/servo/servo/wiki/WebSocket-student-project Mozilla Websocket Project Page]&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;[https://github.com/servo/servo Servo github]&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;[http://cyderize.github.io/rust-websocket/ Rust Websocket]&amp;lt;/b&amp;gt;&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>Wpgallih</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_M1502_WSRA&amp;diff=96472</id>
		<title>CSC/ECE 517 Spring 2015 M1502 WSRA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_M1502_WSRA&amp;diff=96472"/>
		<updated>2015-04-02T01:56:02Z</updated>

		<summary type="html">&lt;p&gt;Wpgallih: /* Further Readings */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Implement Rust Websocket==&lt;br /&gt;
This project concentrates on implementing Rust WebSocket API for Mozilla's web browser engine, Servo&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
Servo&amp;lt;ref&amp;gt; https://github.com/servo/servo &amp;lt;/ref&amp;gt; is a Web Browser engine written in [https://github.com/rust-lang/rust Rust]. It is an experimental project build that targets new generation of hardware: mobile devices, multi-core processors and high-performance GPUs to obtain power efficiency and maximum parallelism. Implementing WebSocket API for the Servo engine would allow a persistent single TCP socket connection to be established between the client and server that will provide bi-directional, full duplex, messages to be instantly exchanged with little overhead resulting in a very low latency connection and supporting interactive, dynamic applications.&lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
Rust &amp;lt;ref&amp;gt; https://github.com/rust-lang/rust &amp;lt;/ref&amp;gt; is a Systems programming language built in Rust itself that is fast, memory safe and multithreaded, but does not employ a garbage collector or otherwise impose significant runtime overhead. Rust is able to provide both control over hardware and safety which is not the case with other programming languages like C, C++, Python that provide only either control or safety but not both. &lt;br /&gt;
&lt;br /&gt;
===WebSocket===&lt;br /&gt;
WebSockets is a protocol that provides [http://en.wikipedia.org/wiki/Duplex_(telecommunications)#FULL-DUPLEX full-duplex] channel for a TCP connection and makes it possible to open an interactive communication session between the user's browser and a server. With WebSockets, you can send messages to a server and receive event-driven responses without having to request the server for a reply. The [http://dev.w3.org/html5/websockets/ WebSocket] specification defines an API to establish a &amp;quot;socket&amp;quot; connection between a web browser and a server. This establishment involves a handshake following which there is a persistent connection between the client and the server and both parties can start sending data asynchronously.&lt;br /&gt;
&lt;br /&gt;
===Cargo and Crate===&lt;br /&gt;
Cargo &amp;lt;ref&amp;gt;http://doc.crates.io/guide.html&amp;lt;/ref&amp;gt; is a application level package manager that allows Rust projects to declare their various dependencies. Cargo resembles the Bundler in Rails that is used to run Rails app, install required Gems mentioned in the Gemfile. Gemfile correspond to &amp;lt;code&amp;gt; Cargo.toml &amp;lt;/code&amp;gt; file and Gem correspond to &amp;lt;code&amp;gt; Crates &amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cargo introduces two metadata files with various bits of project information, fetches and builds project's dependencies, invokes rustc or another build tool with the correct parameters to build the project.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
&lt;br /&gt;
The goal of this project is to implement WebSocket functionality in to Servo using the Rust WebSocket project. Once this is completed, tests following the HTML spec [https://html.spec.whatwg.org/multipage/comms.html#network] for websockets should pass, as the same spec will be driving development. The project will be completed when the following conditions are true, and all tests have passed. &lt;br /&gt;
* The client can establish a websocket connection&lt;br /&gt;
* The client can send objects to the server through the websocket&lt;br /&gt;
* The client can receive objects from the server through the websocket&lt;br /&gt;
* The client can successfully close the Websocket&lt;br /&gt;
&lt;br /&gt;
If Servo, as the client, is able to successfully perform all of these tasks, then our project will be completed.&lt;br /&gt;
&lt;br /&gt;
==Requirement Analysis==&lt;br /&gt;
The requirements for the implementation is well detailed in the HTML spec shown here [https://html.spec.whatwg.org/multipage/comms.html#feedback-from-the-protocol]. The majority of the requirements have to do with the feedback for the protocol. The entire reading can be seen there. &lt;br /&gt;
&lt;br /&gt;
Outside of the HTML spec, a couple other requirements are necessary. First, Servo must successfully compile with the websocket components included. There are a number of warnings currently with compiling Servo not related to Websocket, but no new ones should be introduced. &lt;br /&gt;
&lt;br /&gt;
Second, we should pass a set of tests already included in Servo's tests/wpt/web-platform-tests/websockets directory. These tests determine if the current websocket implementation fulfills all the requirements for Servo's use. &lt;br /&gt;
&lt;br /&gt;
Finally, we should successfully issue pull requests for each feature as it is completed.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
'''When the WebSocket connection is established, the user agent must queue a task to run these steps:'''&lt;br /&gt;
*If the WebSocket object's client-specified protocols was not an empty list, but the subprotocol in use is the null value, then fail the WebSocket connection, set the readyState attribute's value to CLOSING, and abort these steps.&lt;br /&gt;
*Change the readyState attribute's value to OPEN.&lt;br /&gt;
*Change the extensions attribute's value to the extensions in use, if is not the null value.&lt;br /&gt;
*Change the protocol attribute's value to the subprotocol in use, if is not the null value.&lt;br /&gt;
*Act as if the user agent had received a set-cookie-string consisting of the cookies set during the server's opening handshake, for the URL url given to the WebSocket() constructor.&lt;br /&gt;
*Fire a simple event named open at the WebSocket object.&lt;br /&gt;
&lt;br /&gt;
'''When a WebSocket message has been received with type type and data data, the user agent must queue a task to follow these steps:'''&lt;br /&gt;
*If the readyState attribute's value is not OPEN, then abort these steps.&lt;br /&gt;
*Let event be a newly created trusted event that uses the MessageEvent interface, with the event type message, which does not bubble, is not cancelable, and has no default action.&lt;br /&gt;
*Initialise event's origin attribute to the Unicode serialisation of the origin of the URL that was passed to the WebSocket object's constructor.&lt;br /&gt;
*If type indicates that the data is Text, then initialise event's data attribute to data.&lt;br /&gt;
*If type indicates that the data is Binary, and binaryType is set to &amp;quot;blob&amp;quot;, then initialise event's data attribute to a new Blob object that represents data as its raw data.&lt;br /&gt;
*If type indicates that the data is Binary, and binaryType is set to &amp;quot;arraybuffer&amp;quot;, then initialise event's data attribute to a new ArrayBuffer object whose contents are data.&lt;br /&gt;
*Dispatch event at the WebSocket object.&lt;br /&gt;
&lt;br /&gt;
==Design Patterns==&lt;br /&gt;
&amp;lt;b&amp;gt;[http://en.wikipedia.org/wiki/Factory_%28object-oriented_programming%29 Factory Pattern]&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
For every web application application running on the web browser that requires a websocket for communicating with the server, a new thread needs to be spawned that creates a client end of the socket associated with the web app. Spawning this thread can be considered to be similar to instantiating an object for which Factory Pattern can be employed. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;[http://en.wikipedia.org/wiki/Thread_pool_pattern Thread Pool Pattern]&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Servo's primary objective was to provide concurrency. This concurrency can be attained by scheduling tasks which can be run in parallel. Threads help execute these tasks in parallel. Thread Pool Pattern helps manage these thread. For example, one thread could be to accept new requests for websockets, as a result of which new thread would be spawned (client side of websocket) for that application.&lt;br /&gt;
&lt;br /&gt;
==Proposed Test Cases==&lt;br /&gt;
&lt;br /&gt;
The test cases for websocket are already included in servo, under the Servo directory tests/wpt/web-platform-tests/websockets. To break down how each should be tested, here are the proposed scenarios:&lt;br /&gt;
* The send function should send some object, then wait for confirmation of sending.&lt;br /&gt;
* The constructor should make a websocket connection to the URL and either open the connection or close it based on the response coming in. &lt;br /&gt;
* The receive function should trigger on receiving an object, then send confirmation. &lt;br /&gt;
&lt;br /&gt;
All of these are tested thoroughly in the directory given at the beginning of this section.&lt;br /&gt;
&lt;br /&gt;
==Further Readings==&lt;br /&gt;
&amp;lt;b&amp;gt;[https://html.spec.whatwg.org/multipage/comms.html#network HTML Spec for WebSockets]&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;[https://github.com/servo/servo/wiki/WebSocket-student-project Mozilla Websocket Project Page]&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;[https://github.com/servo/servo Servo github]&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;[http://cyderize.github.io/rust-websocket/ Rust Websocket]&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Wpgallih</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_M1502_WSRA&amp;diff=96471</id>
		<title>CSC/ECE 517 Spring 2015 M1502 WSRA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_M1502_WSRA&amp;diff=96471"/>
		<updated>2015-04-02T01:55:26Z</updated>

		<summary type="html">&lt;p&gt;Wpgallih: /* Further Readings */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Implement Rust Websocket==&lt;br /&gt;
This project concentrates on implementing Rust WebSocket API for Mozilla's web browser engine, Servo&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
Servo&amp;lt;ref&amp;gt; https://github.com/servo/servo &amp;lt;/ref&amp;gt; is a Web Browser engine written in [https://github.com/rust-lang/rust Rust]. It is an experimental project build that targets new generation of hardware: mobile devices, multi-core processors and high-performance GPUs to obtain power efficiency and maximum parallelism. Implementing WebSocket API for the Servo engine would allow a persistent single TCP socket connection to be established between the client and server that will provide bi-directional, full duplex, messages to be instantly exchanged with little overhead resulting in a very low latency connection and supporting interactive, dynamic applications.&lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
Rust &amp;lt;ref&amp;gt; https://github.com/rust-lang/rust &amp;lt;/ref&amp;gt; is a Systems programming language built in Rust itself that is fast, memory safe and multithreaded, but does not employ a garbage collector or otherwise impose significant runtime overhead. Rust is able to provide both control over hardware and safety which is not the case with other programming languages like C, C++, Python that provide only either control or safety but not both. &lt;br /&gt;
&lt;br /&gt;
===WebSocket===&lt;br /&gt;
WebSockets is a protocol that provides [http://en.wikipedia.org/wiki/Duplex_(telecommunications)#FULL-DUPLEX full-duplex] channel for a TCP connection and makes it possible to open an interactive communication session between the user's browser and a server. With WebSockets, you can send messages to a server and receive event-driven responses without having to request the server for a reply. The [http://dev.w3.org/html5/websockets/ WebSocket] specification defines an API to establish a &amp;quot;socket&amp;quot; connection between a web browser and a server. This establishment involves a handshake following which there is a persistent connection between the client and the server and both parties can start sending data asynchronously.&lt;br /&gt;
&lt;br /&gt;
===Cargo and Crate===&lt;br /&gt;
Cargo &amp;lt;ref&amp;gt;http://doc.crates.io/guide.html&amp;lt;/ref&amp;gt; is a application level package manager that allows Rust projects to declare their various dependencies. Cargo resembles the Bundler in Rails that is used to run Rails app, install required Gems mentioned in the Gemfile. Gemfile correspond to &amp;lt;code&amp;gt; Cargo.toml &amp;lt;/code&amp;gt; file and Gem correspond to &amp;lt;code&amp;gt; Crates &amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cargo introduces two metadata files with various bits of project information, fetches and builds project's dependencies, invokes rustc or another build tool with the correct parameters to build the project.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
&lt;br /&gt;
The goal of this project is to implement WebSocket functionality in to Servo using the Rust WebSocket project. Once this is completed, tests following the HTML spec [https://html.spec.whatwg.org/multipage/comms.html#network] for websockets should pass, as the same spec will be driving development. The project will be completed when the following conditions are true, and all tests have passed. &lt;br /&gt;
* The client can establish a websocket connection&lt;br /&gt;
* The client can send objects to the server through the websocket&lt;br /&gt;
* The client can receive objects from the server through the websocket&lt;br /&gt;
* The client can successfully close the Websocket&lt;br /&gt;
&lt;br /&gt;
If Servo, as the client, is able to successfully perform all of these tasks, then our project will be completed.&lt;br /&gt;
&lt;br /&gt;
==Requirement Analysis==&lt;br /&gt;
The requirements for the implementation is well detailed in the HTML spec shown here [https://html.spec.whatwg.org/multipage/comms.html#feedback-from-the-protocol]. The majority of the requirements have to do with the feedback for the protocol. The entire reading can be seen there. &lt;br /&gt;
&lt;br /&gt;
Outside of the HTML spec, a couple other requirements are necessary. First, Servo must successfully compile with the websocket components included. There are a number of warnings currently with compiling Servo not related to Websocket, but no new ones should be introduced. &lt;br /&gt;
&lt;br /&gt;
Second, we should pass a set of tests already included in Servo's tests/wpt/web-platform-tests/websockets directory. These tests determine if the current websocket implementation fulfills all the requirements for Servo's use. &lt;br /&gt;
&lt;br /&gt;
Finally, we should successfully issue pull requests for each feature as it is completed.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
'''When the WebSocket connection is established, the user agent must queue a task to run these steps:'''&lt;br /&gt;
*If the WebSocket object's client-specified protocols was not an empty list, but the subprotocol in use is the null value, then fail the WebSocket connection, set the readyState attribute's value to CLOSING, and abort these steps.&lt;br /&gt;
*Change the readyState attribute's value to OPEN.&lt;br /&gt;
*Change the extensions attribute's value to the extensions in use, if is not the null value.&lt;br /&gt;
*Change the protocol attribute's value to the subprotocol in use, if is not the null value.&lt;br /&gt;
*Act as if the user agent had received a set-cookie-string consisting of the cookies set during the server's opening handshake, for the URL url given to the WebSocket() constructor.&lt;br /&gt;
*Fire a simple event named open at the WebSocket object.&lt;br /&gt;
&lt;br /&gt;
'''When a WebSocket message has been received with type type and data data, the user agent must queue a task to follow these steps:'''&lt;br /&gt;
*If the readyState attribute's value is not OPEN, then abort these steps.&lt;br /&gt;
*Let event be a newly created trusted event that uses the MessageEvent interface, with the event type message, which does not bubble, is not cancelable, and has no default action.&lt;br /&gt;
*Initialise event's origin attribute to the Unicode serialisation of the origin of the URL that was passed to the WebSocket object's constructor.&lt;br /&gt;
*If type indicates that the data is Text, then initialise event's data attribute to data.&lt;br /&gt;
*If type indicates that the data is Binary, and binaryType is set to &amp;quot;blob&amp;quot;, then initialise event's data attribute to a new Blob object that represents data as its raw data.&lt;br /&gt;
*If type indicates that the data is Binary, and binaryType is set to &amp;quot;arraybuffer&amp;quot;, then initialise event's data attribute to a new ArrayBuffer object whose contents are data.&lt;br /&gt;
*Dispatch event at the WebSocket object.&lt;br /&gt;
&lt;br /&gt;
==Design Patterns==&lt;br /&gt;
&amp;lt;b&amp;gt;[http://en.wikipedia.org/wiki/Factory_%28object-oriented_programming%29 Factory Pattern]&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
For every web application application running on the web browser that requires a websocket for communicating with the server, a new thread needs to be spawned that creates a client end of the socket associated with the web app. Spawning this thread can be considered to be similar to instantiating an object for which Factory Pattern can be employed. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;[http://en.wikipedia.org/wiki/Thread_pool_pattern Thread Pool Pattern]&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Servo's primary objective was to provide concurrency. This concurrency can be attained by scheduling tasks which can be run in parallel. Threads help execute these tasks in parallel. Thread Pool Pattern helps manage these thread. For example, one thread could be to accept new requests for websockets, as a result of which new thread would be spawned (client side of websocket) for that application.&lt;br /&gt;
&lt;br /&gt;
==Proposed Test Cases==&lt;br /&gt;
&lt;br /&gt;
The test cases for websocket are already included in servo, under the Servo directory tests/wpt/web-platform-tests/websockets. To break down how each should be tested, here are the proposed scenarios:&lt;br /&gt;
* The send function should send some object, then wait for confirmation of sending.&lt;br /&gt;
* The constructor should make a websocket connection to the URL and either open the connection or close it based on the response coming in. &lt;br /&gt;
* The receive function should trigger on receiving an object, then send confirmation. &lt;br /&gt;
&lt;br /&gt;
All of these are tested thoroughly in the directory given at the beginning of this section.&lt;br /&gt;
&lt;br /&gt;
==Further Readings==&lt;br /&gt;
[https://html.spec.whatwg.org/multipage/comms.html#network HTML Spec for WebSockets]&lt;br /&gt;
[https://github.com/servo/servo/wiki/WebSocket-student-project Mozilla Websocket Project Page]&lt;br /&gt;
[https://github.com/servo/servo Servo github]&lt;br /&gt;
[http://cyderize.github.io/rust-websocket/ Rust Websocket]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Wpgallih</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_M1502_WSRA&amp;diff=96469</id>
		<title>CSC/ECE 517 Spring 2015 M1502 WSRA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_M1502_WSRA&amp;diff=96469"/>
		<updated>2015-04-02T01:53:04Z</updated>

		<summary type="html">&lt;p&gt;Wpgallih: /* Proposed Test Cases */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Implement Rust Websocket==&lt;br /&gt;
This project concentrates on implementing Rust WebSocket API for Mozilla's web browser engine, Servo&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
Servo&amp;lt;ref&amp;gt; https://github.com/servo/servo &amp;lt;/ref&amp;gt; is a Web Browser engine written in [https://github.com/rust-lang/rust Rust]. It is an experimental project build that targets new generation of hardware: mobile devices, multi-core processors and high-performance GPUs to obtain power efficiency and maximum parallelism. Implementing WebSocket API for the Servo engine would allow a persistent single TCP socket connection to be established between the client and server that will provide bi-directional, full duplex, messages to be instantly exchanged with little overhead resulting in a very low latency connection and supporting interactive, dynamic applications.&lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
Rust &amp;lt;ref&amp;gt; https://github.com/rust-lang/rust &amp;lt;/ref&amp;gt; is a Systems programming language built in Rust itself that is fast, memory safe and multithreaded, but does not employ a garbage collector or otherwise impose significant runtime overhead. Rust is able to provide both control over hardware and safety which is not the case with other programming languages like C, C++, Python that provide only either control or safety but not both. &lt;br /&gt;
&lt;br /&gt;
===WebSocket===&lt;br /&gt;
WebSockets is a protocol that provides [http://en.wikipedia.org/wiki/Duplex_(telecommunications)#FULL-DUPLEX full-duplex] channel for a TCP connection and makes it possible to open an interactive communication session between the user's browser and a server. With WebSockets, you can send messages to a server and receive event-driven responses without having to request the server for a reply. The [http://dev.w3.org/html5/websockets/ WebSocket] specification defines an API to establish a &amp;quot;socket&amp;quot; connection between a web browser and a server. This establishment involves a handshake following which there is a persistent connection between the client and the server and both parties can start sending data asynchronously.&lt;br /&gt;
&lt;br /&gt;
===Cargo and Crate===&lt;br /&gt;
Cargo &amp;lt;ref&amp;gt;http://doc.crates.io/guide.html&amp;lt;/ref&amp;gt; is a application level package manager that allows Rust projects to declare their various dependencies. Cargo resembles the Bundler in Rails that is used to run Rails app, install required Gems mentioned in the Gemfile. Gemfile correspond to &amp;lt;code&amp;gt; Cargo.toml &amp;lt;/code&amp;gt; file and Gem correspond to &amp;lt;code&amp;gt; Crates &amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cargo introduces two metadata files with various bits of project information, fetches and builds project's dependencies, invokes rustc or another build tool with the correct parameters to build the project.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
&lt;br /&gt;
The goal of this project is to implement WebSocket functionality in to Servo using the Rust WebSocket project. Once this is completed, tests following the HTML spec [https://html.spec.whatwg.org/multipage/comms.html#network] for websockets should pass, as the same spec will be driving development. The project will be completed when the following conditions are true, and all tests have passed. &lt;br /&gt;
* The client can establish a websocket connection&lt;br /&gt;
* The client can send objects to the server through the websocket&lt;br /&gt;
* The client can receive objects from the server through the websocket&lt;br /&gt;
* The client can successfully close the Websocket&lt;br /&gt;
&lt;br /&gt;
If Servo, as the client, is able to successfully perform all of these tasks, then our project will be completed.&lt;br /&gt;
&lt;br /&gt;
==Requirement Analysis==&lt;br /&gt;
The requirements for the implementation is well detailed in the HTML spec shown here [https://html.spec.whatwg.org/multipage/comms.html#feedback-from-the-protocol]. The majority of the requirements have to do with the feedback for the protocol. The entire reading can be seen there. &lt;br /&gt;
&lt;br /&gt;
Outside of the HTML spec, a couple other requirements are necessary. First, Servo must successfully compile with the websocket components included. There are a number of warnings currently with compiling Servo not related to Websocket, but no new ones should be introduced. &lt;br /&gt;
&lt;br /&gt;
Second, we should pass a set of tests already included in Servo's tests/wpt/web-platform-tests/websockets directory. These tests determine if the current websocket implementation fulfills all the requirements for Servo's use. &lt;br /&gt;
&lt;br /&gt;
Finally, we should successfully issue pull requests for each feature as it is completed.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
'''When the WebSocket connection is established, the user agent must queue a task to run these steps:'''&lt;br /&gt;
*If the WebSocket object's client-specified protocols was not an empty list, but the subprotocol in use is the null value, then fail the WebSocket connection, set the readyState attribute's value to CLOSING, and abort these steps.&lt;br /&gt;
*Change the readyState attribute's value to OPEN.&lt;br /&gt;
*Change the extensions attribute's value to the extensions in use, if is not the null value.&lt;br /&gt;
*Change the protocol attribute's value to the subprotocol in use, if is not the null value.&lt;br /&gt;
*Act as if the user agent had received a set-cookie-string consisting of the cookies set during the server's opening handshake, for the URL url given to the WebSocket() constructor.&lt;br /&gt;
*Fire a simple event named open at the WebSocket object.&lt;br /&gt;
&lt;br /&gt;
'''When a WebSocket message has been received with type type and data data, the user agent must queue a task to follow these steps:'''&lt;br /&gt;
*If the readyState attribute's value is not OPEN, then abort these steps.&lt;br /&gt;
*Let event be a newly created trusted event that uses the MessageEvent interface, with the event type message, which does not bubble, is not cancelable, and has no default action.&lt;br /&gt;
*Initialise event's origin attribute to the Unicode serialisation of the origin of the URL that was passed to the WebSocket object's constructor.&lt;br /&gt;
*If type indicates that the data is Text, then initialise event's data attribute to data.&lt;br /&gt;
*If type indicates that the data is Binary, and binaryType is set to &amp;quot;blob&amp;quot;, then initialise event's data attribute to a new Blob object that represents data as its raw data.&lt;br /&gt;
*If type indicates that the data is Binary, and binaryType is set to &amp;quot;arraybuffer&amp;quot;, then initialise event's data attribute to a new ArrayBuffer object whose contents are data.&lt;br /&gt;
*Dispatch event at the WebSocket object.&lt;br /&gt;
&lt;br /&gt;
==Design Patterns==&lt;br /&gt;
&amp;lt;b&amp;gt;[http://en.wikipedia.org/wiki/Factory_%28object-oriented_programming%29 Factory Pattern]&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
For every web application application running on the web browser that requires a websocket for communicating with the server, a new thread needs to be spawned that creates a client end of the socket associated with the web app. Spawning this thread can be considered to be similar to instantiating an object for which Factory Pattern can be employed. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;[http://en.wikipedia.org/wiki/Thread_pool_pattern Thread Pool Pattern]&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Servo's primary objective was to provide concurrency. This concurrency can be attained by scheduling tasks which can be run in parallel. Threads help execute these tasks in parallel. Thread Pool Pattern helps manage these thread. For example, one thread could be to accept new requests for websockets, as a result of which new thread would be spawned (client side of websocket) for that application.&lt;br /&gt;
&lt;br /&gt;
==Proposed Test Cases==&lt;br /&gt;
&lt;br /&gt;
The test cases for websocket are already included in servo, under the Servo directory tests/wpt/web-platform-tests/websockets. To break down how each should be tested, here are the proposed scenarios:&lt;br /&gt;
* The send function should send some object, then wait for confirmation of sending.&lt;br /&gt;
* The constructor should make a websocket connection to the URL and either open the connection or close it based on the response coming in. &lt;br /&gt;
* The receive function should trigger on receiving an object, then send confirmation. &lt;br /&gt;
&lt;br /&gt;
All of these are tested thoroughly in the directory given at the beginning of this section.&lt;br /&gt;
&lt;br /&gt;
==Further Readings==&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Wpgallih</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_M1502_WSRA&amp;diff=96468</id>
		<title>CSC/ECE 517 Spring 2015 M1502 WSRA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_M1502_WSRA&amp;diff=96468"/>
		<updated>2015-04-02T01:43:37Z</updated>

		<summary type="html">&lt;p&gt;Wpgallih: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Implement Rust Websocket==&lt;br /&gt;
This project concentrates on implementing Rust WebSocket API for Mozilla's web browser engine, Servo&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
Servo&amp;lt;ref&amp;gt; https://github.com/servo/servo &amp;lt;/ref&amp;gt; is a Web Browser engine written in [https://github.com/rust-lang/rust Rust]. It is an experimental project build that targets new generation of hardware: mobile devices, multi-core processors and high-performance GPUs to obtain power efficiency and maximum parallelism. Implementing WebSocket API for the Servo engine would allow a persistent single TCP socket connection to be established between the client and server that will provide bi-directional, full duplex, messages to be instantly exchanged with little overhead resulting in a very low latency connection and supporting interactive, dynamic applications.&lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
Rust &amp;lt;ref&amp;gt; https://github.com/rust-lang/rust &amp;lt;/ref&amp;gt; is a Systems programming language built in Rust itself that is fast, memory safe and multithreaded, but does not employ a garbage collector or otherwise impose significant runtime overhead. Rust is able to provide both control over hardware and safety which is not the case with other programming languages like C, C++, Python that provide only either control or safety but not both. &lt;br /&gt;
&lt;br /&gt;
===WebSocket===&lt;br /&gt;
WebSockets is a protocol that provides [http://en.wikipedia.org/wiki/Duplex_(telecommunications)#FULL-DUPLEX full-duplex] channel for a TCP connection and makes it possible to open an interactive communication session between the user's browser and a server. With WebSockets, you can send messages to a server and receive event-driven responses without having to request the server for a reply. The [http://dev.w3.org/html5/websockets/ WebSocket] specification defines an API to establish a &amp;quot;socket&amp;quot; connection between a web browser and a server. This establishment involves a handshake following which there is a persistent connection between the client and the server and both parties can start sending data asynchronously.&lt;br /&gt;
&lt;br /&gt;
===Cargo and Crate===&lt;br /&gt;
Cargo &amp;lt;ref&amp;gt;http://doc.crates.io/guide.html&amp;lt;/ref&amp;gt; is a application level package manager that allows Rust projects to declare their various dependencies. Cargo resembles the Bundler in Rails that is used to run Rails app, install required Gems mentioned in the Gemfile. Gemfile correspond to &amp;lt;code&amp;gt; Cargo.toml &amp;lt;/code&amp;gt; file and Gem correspond to &amp;lt;code&amp;gt; Crates &amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cargo introduces two metadata files with various bits of project information, fetches and builds project's dependencies, invokes rustc or another build tool with the correct parameters to build the project.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
&lt;br /&gt;
The goal of this project is to implement WebSocket functionality in to Servo using the Rust WebSocket project. Once this is completed, tests following the HTML spec [https://html.spec.whatwg.org/multipage/comms.html#network] for websockets should pass, as the same spec will be driving development. The project will be completed when the following conditions are true, and all tests have passed. &lt;br /&gt;
* The client can establish a websocket connection&lt;br /&gt;
* The client can send objects to the server through the websocket&lt;br /&gt;
* The client can receive objects from the server through the websocket&lt;br /&gt;
* The client can successfully close the Websocket&lt;br /&gt;
&lt;br /&gt;
If Servo, as the client, is able to successfully perform all of these tasks, then our project will be completed.&lt;br /&gt;
&lt;br /&gt;
==Requirement Analysis==&lt;br /&gt;
The requirements for the implementation is well detailed in the HTML spec shown here [https://html.spec.whatwg.org/multipage/comms.html#feedback-from-the-protocol]. The majority of the requirements have to do with the feedback for the protocol. The entire reading can be seen there. &lt;br /&gt;
&lt;br /&gt;
Outside of the HTML spec, a couple other requirements are necessary. First, Servo must successfully compile with the websocket components included. There are a number of warnings currently with compiling Servo not related to Websocket, but no new ones should be introduced. &lt;br /&gt;
&lt;br /&gt;
Second, we should pass a set of tests already included in Servo's tests/wpt/web-platform-tests/websockets directory. These tests determine if the current websocket implementation fulfills all the requirements for Servo's use. &lt;br /&gt;
&lt;br /&gt;
Finally, we should successfully issue pull requests for each feature as it is completed.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
'''When the WebSocket connection is established, the user agent must queue a task to run these steps:'''&lt;br /&gt;
*If the WebSocket object's client-specified protocols was not an empty list, but the subprotocol in use is the null value, then fail the WebSocket connection, set the readyState attribute's value to CLOSING, and abort these steps.&lt;br /&gt;
*Change the readyState attribute's value to OPEN.&lt;br /&gt;
*Change the extensions attribute's value to the extensions in use, if is not the null value.&lt;br /&gt;
*Change the protocol attribute's value to the subprotocol in use, if is not the null value.&lt;br /&gt;
*Act as if the user agent had received a set-cookie-string consisting of the cookies set during the server's opening handshake, for the URL url given to the WebSocket() constructor.&lt;br /&gt;
*Fire a simple event named open at the WebSocket object.&lt;br /&gt;
&lt;br /&gt;
'''When a WebSocket message has been received with type type and data data, the user agent must queue a task to follow these steps:'''&lt;br /&gt;
*If the readyState attribute's value is not OPEN, then abort these steps.&lt;br /&gt;
*Let event be a newly created trusted event that uses the MessageEvent interface, with the event type message, which does not bubble, is not cancelable, and has no default action.&lt;br /&gt;
*Initialise event's origin attribute to the Unicode serialisation of the origin of the URL that was passed to the WebSocket object's constructor.&lt;br /&gt;
*If type indicates that the data is Text, then initialise event's data attribute to data.&lt;br /&gt;
*If type indicates that the data is Binary, and binaryType is set to &amp;quot;blob&amp;quot;, then initialise event's data attribute to a new Blob object that represents data as its raw data.&lt;br /&gt;
*If type indicates that the data is Binary, and binaryType is set to &amp;quot;arraybuffer&amp;quot;, then initialise event's data attribute to a new ArrayBuffer object whose contents are data.&lt;br /&gt;
*Dispatch event at the WebSocket object.&lt;br /&gt;
&lt;br /&gt;
==Design Patterns==&lt;br /&gt;
&amp;lt;b&amp;gt;[http://en.wikipedia.org/wiki/Factory_%28object-oriented_programming%29 Factory Pattern]&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
For every web application application running on the web browser that requires a websocket for communicating with the server, a new thread needs to be spawned that creates a client end of the socket associated with the web app. Spawning this thread can be considered to be similar to instantiating an object for which Factory Pattern can be employed. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;[http://en.wikipedia.org/wiki/Thread_pool_pattern Thread Pool Pattern]&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Servo's primary objective was to provide concurrency. This concurrency can be attained by scheduling tasks which can be run in parallel. Threads help execute these tasks in parallel. Thread Pool Pattern helps manage these thread. For example, one thread could be to accept new requests for websockets, as a result of which new thread would be spawned (client side of websocket) for that application.&lt;br /&gt;
&lt;br /&gt;
==Proposed Test Cases==&lt;br /&gt;
==Further Readings==&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Wpgallih</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_M1502_WSRA&amp;diff=96467</id>
		<title>CSC/ECE 517 Spring 2015 M1502 WSRA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_M1502_WSRA&amp;diff=96467"/>
		<updated>2015-04-02T01:43:16Z</updated>

		<summary type="html">&lt;p&gt;Wpgallih: /* Requirement Analysis */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Implement Rust Websocket==&lt;br /&gt;
This project concentrates on implementing Rust WebSocket API for Mozilla's web browser engine, Servo&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
Servo&amp;lt;ref&amp;gt; https://github.com/servo/servo &amp;lt;/ref&amp;gt; is a Web Browser engine written in [https://github.com/rust-lang/rust Rust]. It is an experimental project build that targets new generation of hardware: mobile devices, multi-core processors and high-performance GPUs to obtain power efficiency and maximum parallelism. Implementing WebSocket API for the Servo engine would allow a persistent single TCP socket connection to be established between the client and server that will provide bi-directional, full duplex, messages to be instantly exchanged with little overhead resulting in a very low latency connection and supporting interactive, dynamic applications.&lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
Rust &amp;lt;ref&amp;gt; https://github.com/rust-lang/rust &amp;lt;/ref&amp;gt; is a Systems programming language built in Rust itself that is fast, memory safe and multithreaded, but does not employ a garbage collector or otherwise impose significant runtime overhead. Rust is able to provide both control over hardware and safety which is not the case with other programming languages like C, C++, Python that provide only either control or safety but not both. &lt;br /&gt;
&lt;br /&gt;
===WebSocket===&lt;br /&gt;
WebSockets is a protocol that provides [http://en.wikipedia.org/wiki/Duplex_(telecommunications)#FULL-DUPLEX full-duplex] channel for a TCP connection and makes it possible to open an interactive communication session between the user's browser and a server. With WebSockets, you can send messages to a server and receive event-driven responses without having to request the server for a reply. The [http://dev.w3.org/html5/websockets/ WebSocket] specification defines an API to establish a &amp;quot;socket&amp;quot; connection between a web browser and a server. This establishment involves a handshake following which there is a persistent connection between the client and the server and both parties can start sending data asynchronously.&lt;br /&gt;
&lt;br /&gt;
===Cargo and Crate===&lt;br /&gt;
Cargo &amp;lt;ref&amp;gt;http://doc.crates.io/guide.html&amp;lt;/ref&amp;gt; is a application level package manager that allows Rust projects to declare their various dependencies. Cargo resembles the Bundler in Rails that is used to run Rails app, install required Gems mentioned in the Gemfile. Gemfile correspond to &amp;lt;code&amp;gt; Cargo.toml &amp;lt;/code&amp;gt; file and Gem correspond to &amp;lt;code&amp;gt; Crates &amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cargo introduces two metadata files with various bits of project information, fetches and builds project's dependencies, invokes rustc or another build tool with the correct parameters to build the project.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
&lt;br /&gt;
The goal of this project is to implement WebSocket functionality in to Servo using the Rust WebSocket project. Once this is completed, tests following the HTML spec [https://html.spec.whatwg.org/multipage/comms.html#network] for websockets should pass, as the same spec will be driving development. The project will be completed when the following conditions are true, and all tests have passed. &lt;br /&gt;
* The client can establish a websocket connection&lt;br /&gt;
* The client can send objects to the server through the websocket&lt;br /&gt;
* The client can receive objects from the server through the websocket&lt;br /&gt;
* The client can successfully close the Websocket&lt;br /&gt;
&lt;br /&gt;
If Servo, as the client, is able to successfully perform all of these tasks, then our project will be completed.&lt;br /&gt;
&lt;br /&gt;
==Requirement Analysis==&lt;br /&gt;
The requirements for the implementation is well detailed in the HTML spec shown here [https://html.spec.whatwg.org/multipage/comms.html#feedback-from-the-protocol]. The majority of the requirements have to do with the feedback for the protocol. The entire reading can be seen there. &lt;br /&gt;
&lt;br /&gt;
Outside of the HTML spec, a couple other requirements are necessary. First, Servo must successfully compile with the websocket components included. There are a number of warnings currently with compiling Servo not related to Websocket, but no new ones should be introduced. &lt;br /&gt;
&lt;br /&gt;
Second, we should pass a set of tests already included in Servo's tests/wpt/web-platform-tests/websockets directory. These tests determine if the current websocket implementation fulfills all the requirements for Servo's use. &lt;br /&gt;
&lt;br /&gt;
Finally, we should successfully issue pull requests for each feature as it is completed.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
'''When the WebSocket connection is established, the user agent must queue a task to run these steps:'''&lt;br /&gt;
*If the WebSocket object's client-specified protocols was not an empty list, but the subprotocol in use is the null value, then fail the WebSocket connection, set the readyState attribute's value to CLOSING, and abort these steps.&lt;br /&gt;
*Change the readyState attribute's value to OPEN.&lt;br /&gt;
*Change the extensions attribute's value to the extensions in use, if is not the null value.&lt;br /&gt;
*Change the protocol attribute's value to the subprotocol in use, if is not the null value.&lt;br /&gt;
*Act as if the user agent had received a set-cookie-string consisting of the cookies set during the server's opening handshake, for the URL url given to the WebSocket() constructor.&lt;br /&gt;
*Fire a simple event named open at the WebSocket object.&lt;br /&gt;
&lt;br /&gt;
'''When a WebSocket message has been received with type type and data data, the user agent must queue a task to follow these steps:'''&lt;br /&gt;
*If the readyState attribute's value is not OPEN, then abort these steps.&lt;br /&gt;
*Let event be a newly created trusted event that uses the MessageEvent interface, with the event type message, which does not bubble, is not cancelable, and has no default action.&lt;br /&gt;
*Initialise event's origin attribute to the Unicode serialisation of the origin of the URL that was passed to the WebSocket object's constructor.&lt;br /&gt;
*If type indicates that the data is Text, then initialise event's data attribute to data.&lt;br /&gt;
*If type indicates that the data is Binary, and binaryType is set to &amp;quot;blob&amp;quot;, then initialise event's data attribute to a new Blob object that represents data as its raw data.&lt;br /&gt;
*If type indicates that the data is Binary, and binaryType is set to &amp;quot;arraybuffer&amp;quot;, then initialise event's data attribute to a new ArrayBuffer object whose contents are data.&lt;br /&gt;
*Dispatch event at the WebSocket object.&lt;br /&gt;
&lt;br /&gt;
==Architecture==&lt;br /&gt;
==Component Design==&lt;br /&gt;
==Data Design==&lt;br /&gt;
==Design Patterns==&lt;br /&gt;
&amp;lt;b&amp;gt;[http://en.wikipedia.org/wiki/Factory_%28object-oriented_programming%29 Factory Pattern]&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
For every web application application running on the web browser that requires a websocket for communicating with the server, a new thread needs to be spawned that creates a client end of the socket associated with the web app. Spawning this thread can be considered to be similar to instantiating an object for which Factory Pattern can be employed. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;[http://en.wikipedia.org/wiki/Thread_pool_pattern Thread Pool Pattern]&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Servo's primary objective was to provide concurrency. This concurrency can be attained by scheduling tasks which can be run in parallel. Threads help execute these tasks in parallel. Thread Pool Pattern helps manage these thread. For example, one thread could be to accept new requests for websockets, as a result of which new thread would be spawned (client side of websocket) for that application.&lt;br /&gt;
&lt;br /&gt;
==Proposed Test Cases==&lt;br /&gt;
==Further Readings==&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Wpgallih</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_M1502_WSRA&amp;diff=96458</id>
		<title>CSC/ECE 517 Spring 2015 M1502 WSRA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_M1502_WSRA&amp;diff=96458"/>
		<updated>2015-04-02T01:13:55Z</updated>

		<summary type="html">&lt;p&gt;Wpgallih: /* Project Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Implement Rust Websocket==&lt;br /&gt;
This project concentrates on implementing Rust WebSocket API for Mozilla's web browser engine, Servo&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
Servo&amp;lt;ref&amp;gt; https://github.com/servo/servo &amp;lt;/ref&amp;gt; is a Web Browser engine written in [https://github.com/rust-lang/rust Rust]. It is an experimental project build that targets new generation of hardware: mobile devices, multi-core processors and high-performance GPUs to obtain power efficiency and maximum parallelism. Implementing WebSocket API for the Servo engine would allow a persistent single TCP socket connection to be established between the client and server that will provide bi-directional, full duplex, messages to be instantly exchanged with little overhead resulting in a very low latency connection and supporting interactive, dynamic applications.&lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
Rust &amp;lt;ref&amp;gt; https://github.com/rust-lang/rust &amp;lt;/ref&amp;gt; is a Systems programming language built in Rust itself that is fast, memory safe and multithreaded, but does not employ a garbage collector or otherwise impose significant runtime overhead. Rust is able to provide both control over hardware and safety which is not the case with other programming languages like C, C++, Python that provide only either control or safety but not both. &lt;br /&gt;
&lt;br /&gt;
===WebSocket===&lt;br /&gt;
WebSockets is a protocol that provides [http://en.wikipedia.org/wiki/Duplex_(telecommunications)#FULL-DUPLEX full-duplex] channel for a TCP connection and makes it possible to open an interactive communication session between the user's browser and a server. With WebSockets, you can send messages to a server and receive event-driven responses without having to request the server for a reply. The [http://dev.w3.org/html5/websockets/ WebSocket] specification defines an API to establish a &amp;quot;socket&amp;quot; connection between a web browser and a server. This establishment involves a handshake following which there is a persistent connection between the client and the server and both parties can start sending data asynchronously.&lt;br /&gt;
&lt;br /&gt;
===Cargo and Crate===&lt;br /&gt;
Cargo &amp;lt;ref&amp;gt;http://doc.crates.io/guide.html&amp;lt;/ref&amp;gt; is a application level package manager that allows Rust projects to declare their various dependencies. Cargo resembles the Bundler in Rails that is used to run Rails app, install required Gems mentioned in the Gemfile. Gemfile correspond to &amp;lt;code&amp;gt; Cargo.toml &amp;lt;/code&amp;gt; file and Gem correspond to &amp;lt;code&amp;gt; Crates &amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cargo introduces two metadata files with various bits of project information, fetches and builds project's dependencies, invokes rustc or another build tool with the correct parameters to build the project.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
&lt;br /&gt;
The goal of this project is to implement WebSocket functionality in to Servo using the Rust WebSocket project. Once this is completed, tests following the HTML spec [https://html.spec.whatwg.org/multipage/comms.html#network] for websockets should pass, as the same spec will be driving development. The project will be completed when the following conditions are true, and all tests have passed. &lt;br /&gt;
* The client can establish a websocket connection&lt;br /&gt;
* The client can send objects to the server through the websocket&lt;br /&gt;
* The client can receive objects from the server through the websocket&lt;br /&gt;
* The client can successfully close the Websocket&lt;br /&gt;
&lt;br /&gt;
If Servo, as the client, is able to successfully perform all of these tasks, then our project will be completed.&lt;br /&gt;
&lt;br /&gt;
==Requirement Analysis==&lt;br /&gt;
==Implementation==&lt;br /&gt;
'''When the WebSocket connection is established, the user agent must queue a task to run these steps:'''&lt;br /&gt;
*If the WebSocket object's client-specified protocols was not an empty list, but the subprotocol in use is the null value, then fail the WebSocket connection, set the readyState attribute's value to CLOSING, and abort these steps.&lt;br /&gt;
*Change the readyState attribute's value to OPEN.&lt;br /&gt;
*Change the extensions attribute's value to the extensions in use, if is not the null value.&lt;br /&gt;
*Change the protocol attribute's value to the subprotocol in use, if is not the null value.&lt;br /&gt;
*Act as if the user agent had received a set-cookie-string consisting of the cookies set during the server's opening handshake, for the URL url given to the WebSocket() constructor.&lt;br /&gt;
*Fire a simple event named open at the WebSocket object.&lt;br /&gt;
&lt;br /&gt;
'''When a WebSocket message has been received with type type and data data, the user agent must queue a task to follow these steps:'''&lt;br /&gt;
*If the readyState attribute's value is not OPEN, then abort these steps.&lt;br /&gt;
*Let event be a newly created trusted event that uses the MessageEvent interface, with the event type message, which does not bubble, is not cancelable, and has no default action.&lt;br /&gt;
*Initialise event's origin attribute to the Unicode serialisation of the origin of the URL that was passed to the WebSocket object's constructor.&lt;br /&gt;
*If type indicates that the data is Text, then initialise event's data attribute to data.&lt;br /&gt;
*If type indicates that the data is Binary, and binaryType is set to &amp;quot;blob&amp;quot;, then initialise event's data attribute to a new Blob object that represents data as its raw data.&lt;br /&gt;
*If type indicates that the data is Binary, and binaryType is set to &amp;quot;arraybuffer&amp;quot;, then initialise event's data attribute to a new ArrayBuffer object whose contents are data.&lt;br /&gt;
*Dispatch event at the WebSocket object.&lt;br /&gt;
&lt;br /&gt;
==Architecture==&lt;br /&gt;
==Component Design==&lt;br /&gt;
==Data Design==&lt;br /&gt;
==Design Patterns==&lt;br /&gt;
&amp;lt;b&amp;gt;[http://en.wikipedia.org/wiki/Factory_%28object-oriented_programming%29 Factory Pattern]&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
For every web application application running on the web browser that requires a websocket for communicating with the server, a new thread needs to be spawned that creates a client end of the socket associated with the web app. Spawning this thread can be considered to be similar to instantiating an object for which Factory Pattern can be employed. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;[http://en.wikipedia.org/wiki/Thread_pool_pattern Thread Pool Pattern]&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Servo's primary objective was to provide concurrency. This concurrency can be attained by scheduling tasks which can be run in parallel. Threads help execute these tasks in parallel. Thread Pool Pattern helps manage these thread. For example, one thread could be to accept new requests for websockets, as a result of which new thread would be spawned (client side of websocket) for that application.&lt;br /&gt;
&lt;br /&gt;
==Proposed Test Cases==&lt;br /&gt;
==Further Readings==&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Wpgallih</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_M1502_WSRA&amp;diff=96398</id>
		<title>CSC/ECE 517 Spring 2015 M1502 WSRA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_M1502_WSRA&amp;diff=96398"/>
		<updated>2015-04-01T06:07:55Z</updated>

		<summary type="html">&lt;p&gt;Wpgallih: Created page with &amp;quot;==Implement Rust Websocket== ==Introduction== ==Background== ==Project Description== ==Requirement Analysis== ==Implementation== ==Architecture== ==Component Design== ==Data Desi...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Implement Rust Websocket==&lt;br /&gt;
==Introduction==&lt;br /&gt;
==Background==&lt;br /&gt;
==Project Description==&lt;br /&gt;
==Requirement Analysis==&lt;br /&gt;
==Implementation==&lt;br /&gt;
==Architecture==&lt;br /&gt;
==Component Design==&lt;br /&gt;
==Data Design==&lt;br /&gt;
==Design Patterns==&lt;br /&gt;
==Proposed Test Cases==&lt;br /&gt;
==Further Readings==&lt;br /&gt;
==References==&lt;/div&gt;</summary>
		<author><name>Wpgallih</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_M1502_GVJ&amp;diff=95784</id>
		<title>CSC/ECE 517 Spring 2015/oss M1502 GVJ</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_M1502_GVJ&amp;diff=95784"/>
		<updated>2015-03-23T20:31:21Z</updated>

		<summary type="html">&lt;p&gt;Wpgallih: /* Including Rust Websocket in Servo */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
Implementing the WebSocket API&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This project concentrates on implementing Rust WebSocket API for Mozilla's web browser engine, Servo. The project work involved making the Servo's script depend on WebSocket crate.   &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==Introduction to Mozilla Servo==&lt;br /&gt;
Servo is a Web Browser engine written in [https://github.com/rust-lang/rust Rust]. Servo is an experimental project build that targets new generation of hardware: mobile devices, multi-core processors and high-performance GPUs to obtain power efficiency and maximum parallelism. &lt;br /&gt;
&lt;br /&gt;
==Rust==&lt;br /&gt;
Rust &amp;lt;ref&amp;gt; https://github.com/rust-lang/rust &amp;lt;/ref&amp;gt; is a Systems programming language built in Rust itself that is fast, memory safe and multithreaded, but does not employ a garbage collector or otherwise impose significant runtime overhead. Rust is able to provide both control over hardware and safety which is not the case with other programming languages like C, C++, Python that provide only either control or safety but not both. &lt;br /&gt;
&lt;br /&gt;
==WebSocket==&lt;br /&gt;
WebSockets is a protocol that provides [http://en.wikipedia.org/wiki/Duplex_(telecommunications)#FULL-DUPLEX full-duplex] channel for a TCP connection and makes it possible to open an interactive communication session between the user's browser and a server. With WebSockets, you can send messages to a server and receive event-driven responses without having to request the server for a reply. The [http://dev.w3.org/html5/websockets/ WebSocket] specification defines an API to establish a &amp;quot;socket&amp;quot; connection between a web browser and a server. This establishment involves a handshake following which there is a persistent connection between the client and the server and both parties can start sending data asynchron3ously.&lt;br /&gt;
&lt;br /&gt;
==Cargo and Crate==&lt;br /&gt;
Cargo &amp;lt;ref&amp;gt;http://doc.crates.io/guide.html&amp;lt;/ref&amp;gt; is a application level package manager that allows Rust projects to declare their various dependencies. Cargo resembles the Bundler in Rails that is used to run Rails app, install required Gems mentioned in the Gemfile. Gemfile correspond to &amp;lt;code&amp;gt; Cargo.toml &amp;lt;/code&amp;gt; file and Gem correspond to &amp;lt;code&amp;gt; Crates &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
The goal of this project was to incorporate the websocket crate in to servo, using the up to date rust websocket crate instructions. To do that, Rust's crate manager and how it interacted with servo's Mach tool was explored.  &lt;br /&gt;
&lt;br /&gt;
===The Crate Manager===&lt;br /&gt;
To incorporate new crates in to a project in rust, two main tasks are needed. First, depending on the crate that is used, a dependency needs to be added to the relevant Cargo.toml. For servo and websocket, that Cargo.toml is related to the script component, found in servo's components/script folder. To add a dependency to the Cargo.toml file, a couple different methods are available, both with separate advantages. &lt;br /&gt;
&lt;br /&gt;
The first method is the simplest, and allows specification of crate versions through a method similar to Ruby gemfiles. Simply navigate to the &amp;lt;code&amp;gt;[dependencies]&amp;lt;/code&amp;gt; section of the Cargo.toml, and add the crate and the version, like this example with websocket: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[dependencies]&lt;br /&gt;
...&lt;br /&gt;
websocket = &amp;quot;0.11.0&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can vary this with other options, like ~, as in Ruby, to specify that the latest crate should be loaded or an exact version. &lt;br /&gt;
&lt;br /&gt;
The second method of adding a dependency allows for far more flexibility. A crate's git repository can be added directly to the Cargo.toml, as well as many options to use particular branches, versions, and revisions. &lt;br /&gt;
The syntax for these dependencies is shown below. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[dependency.crate_name]&lt;br /&gt;
git = &amp;quot;path_to_crate_git&amp;quot;&lt;br /&gt;
//other options&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Other options that are particularly useful include the ability to choose branches and revisions. Each of these options are shown below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
branch = &amp;quot;name_of_branch&amp;quot;&lt;br /&gt;
rev = &amp;quot;hash_of_commit&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The next step for adding a crate to a servo project requires modifying the main.rs or lib.rs, depending on which is being used for the project. Normally, the main.rs is used for the primary package, where other parts of a project may only use a lib.rs. To add a crate in either of these files, use the code shown below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
extern crate crate_name&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Further uses of Cargo and other syntax beyond what is discussed in this article can be found [http://doc.crates.io/guide.html here].&lt;br /&gt;
&lt;br /&gt;
===Including Rust Websocket in Servo===&lt;br /&gt;
&lt;br /&gt;
To include the Rust Websocket crate in to Servo, an earlier version of the crate needs to be used. This is because of hyper crate dependencies. In hyper 0.3.2, method accesses were modified. Servo runs on a precompiled version of rust, one that supports hyper 0.3.0. Because of the changes in hyper 0.3.2, an earlier version of Rust Websocket that relies on hyper 0.3.0 needed to be used. &lt;br /&gt;
&lt;br /&gt;
The files for implementing the websocket functions can be found in the webidl folder inside of components/script directory. To allow these files to be used, our project needed to make changes to servo to allow the websocket crate to be compiled. The first file change that is necessary lies in components/script/Cargo.toml. The websocket dependency of the correct version needs to be added here. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[dependencies]&lt;br /&gt;
websocket = &amp;quot;0.11.0&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second file, as described above for adding the websocket crate, is also in components/script. For this section, since the servo component is the main component, the file that needs editing is lib.rs instead of main.rs. The file is modified by adding this line with the other &amp;lt;code&amp;gt; extern &amp;lt;/code&amp;gt; lines. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
extern ...&lt;br /&gt;
extern crate websocket;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once these files have been modified, return to the base servo directory, and run &amp;lt;code&amp;gt;./mach build&amp;lt;/code&amp;gt; to compile the websocket library in to Servo.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Wpgallih</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_M1502_GVJ&amp;diff=95775</id>
		<title>CSC/ECE 517 Spring 2015/oss M1502 GVJ</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_M1502_GVJ&amp;diff=95775"/>
		<updated>2015-03-23T20:12:55Z</updated>

		<summary type="html">&lt;p&gt;Wpgallih: /* Project Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==M1502: Implementing the WebSocket API==&lt;br /&gt;
This project concentrates on implementing Rust WebSocket API for Mozilla's web browser engine, Servo. The project work involved making the Servo's script depend on WebSocket crate.   &lt;br /&gt;
&lt;br /&gt;
==Introduction to Mozilla Servo==&lt;br /&gt;
Servo is a Web Browser engine written in [https://github.com/rust-lang/rust Rust]. Servo is an experimental project build that targets new generation of hardware: mobile devices, multi-core processors and high-performance GPUs to obtain power efficiency and maximum parallelism. &lt;br /&gt;
&lt;br /&gt;
==Rust==&lt;br /&gt;
[https://github.com/rust-lang/rust Rust] is a Systems programming language built in Rust itself that is fast, memory safe and multithreaded, but does not employ a garbage collector or otherwise impose significant runtime overhead. Rust is able to provide both control over hardware and safety which is not the case with other programming languages like C, C++, Python that provide only either control or safety but not both. &lt;br /&gt;
&lt;br /&gt;
==WebSocket==&lt;br /&gt;
WebSockets is a protocol that provides [http://en.wikipedia.org/wiki/Duplex_(telecommunications)#FULL-DUPLEX full-duplex] channel for a TCP connection and makes it possible to open an interactive communication session between the user's browser and a server. With WebSockets, you can send messages to a server and receive event-driven responses without having to request the server for a reply. The [http://dev.w3.org/html5/websockets/ WebSocket] specification defines an API to establish a &amp;quot;socket&amp;quot; connection between a web browser and a server. This establishment involves a handshake following which there is a persistent connection between the client and the server and both parties can start sending data asynchronously.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
The goal of this project was to incorporate the websocket crate in to servo, using the up to date rust websocket crate instructions. To do that, Rust's crate manager and how it interacted with servo's Mach tool was explored.  &lt;br /&gt;
&lt;br /&gt;
===The Crate Manager===&lt;br /&gt;
To incorporate new crates in to a project in rust, two main tasks are needed. First, depending on the crate that is used, a dependency needs to be added to the relevant Cargo.toml. For servo and websocket, that Cargo.toml is related to the script component, found in servo's components/script folder. To add a dependency to the Cargo.toml file, a couple different methods are available, both with separate advantages. &lt;br /&gt;
&lt;br /&gt;
The first method is the simplest, and allows specification of crate versions through a method similar to Ruby gemfiles. Simply navigate to the &amp;lt;code&amp;gt;[dependencies]&amp;lt;/code&amp;gt; section of the Cargo.toml, and add the crate and the version, like this example with websocket: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[dependencies]&lt;br /&gt;
...&lt;br /&gt;
websocket = &amp;quot;0.11.0&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can vary this with other options, like ~, as in Ruby, to specify that the latest crate should be loaded or an exact version. &lt;br /&gt;
&lt;br /&gt;
The second method of adding a dependency allows for far more flexibility. A crate's git repository can be added directly to the Cargo.toml, as well as many options to use particular branches, versions, and revisions. &lt;br /&gt;
The syntax for these dependencies is shown below. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[dependency.crate_name]&lt;br /&gt;
git = &amp;quot;path_to_crate_git&amp;quot;&lt;br /&gt;
//other options&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Other options that are particularly useful include the ability to choose branches and revisions. Each of these options are shown below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
branch = &amp;quot;name_of_branch&amp;quot;&lt;br /&gt;
rev = &amp;quot;hash_of_commit&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The next step for adding a crate to a servo project requires modifying the main.rs or lib.rs, depending on which is being used for the project. Normally, the main.rs is used for the primary package, where other parts of a project may only use a lib.rs. To add a crate in either of these files, use the code shown below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
extern crate crate_name&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Further uses of Cargo and other syntax beyond what is discussed in this article can be found here: [http://doc.crates.io/guide.html].&lt;br /&gt;
&lt;br /&gt;
===Including Rust Websocket in Servo===&lt;/div&gt;</summary>
		<author><name>Wpgallih</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_M1502_GVJ&amp;diff=95774</id>
		<title>CSC/ECE 517 Spring 2015/oss M1502 GVJ</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_M1502_GVJ&amp;diff=95774"/>
		<updated>2015-03-23T20:11:52Z</updated>

		<summary type="html">&lt;p&gt;Wpgallih: /* The Crate Manager */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==M1502: Implementing the WebSocket API==&lt;br /&gt;
This project concentrates on implementing Rust WebSocket API for Mozilla's web browser engine, Servo. The project work involved making the Servo's script depend on WebSocket crate.   &lt;br /&gt;
&lt;br /&gt;
==Introduction to Mozilla Servo==&lt;br /&gt;
Servo is a Web Browser engine written in [https://github.com/rust-lang/rust Rust]. Servo is an experimental project build that targets new generation of hardware: mobile devices, multi-core processors and high-performance GPUs to obtain power efficiency and maximum parallelism. &lt;br /&gt;
&lt;br /&gt;
==Rust==&lt;br /&gt;
[https://github.com/rust-lang/rust Rust] is a Systems programming language built in Rust itself that is fast, memory safe and multithreaded, but does not employ a garbage collector or otherwise impose significant runtime overhead. Rust is able to provide both control over hardware and safety which is not the case with other programming languages like C, C++, Python that provide only either control or safety but not both. &lt;br /&gt;
&lt;br /&gt;
==WebSocket==&lt;br /&gt;
WebSockets is a protocol that provides [http://en.wikipedia.org/wiki/Duplex_(telecommunications)#FULL-DUPLEX full-duplex] channel for a TCP connection and makes it possible to open an interactive communication session between the user's browser and a server. With WebSockets, you can send messages to a server and receive event-driven responses without having to request the server for a reply. The [http://dev.w3.org/html5/websockets/ WebSocket] specification defines an API to establish a &amp;quot;socket&amp;quot; connection between a web browser and a server. This establishment involves a handshake following which there is a persistent connection between the client and the server and both parties can start sending data asynchronously.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
The goal of this project was to incorporate the websocket crate in to servo, using the up to date rust websocket crate instructions. To do that, Rust's crate manager and how it interacted with servo's Mach tool was explored.  &lt;br /&gt;
&lt;br /&gt;
===The Crate Manager===&lt;br /&gt;
To incorporate new crates in to a project in rust, two main tasks are needed. First, depending on the crate that is used, a dependency needs to be added to the relevant Cargo.toml. For servo and websocket, that Cargo.toml is related to the script component, found in servo's components/script folder. To add a dependency to the Cargo.toml file, a couple different methods are available, both with separate advantages. &lt;br /&gt;
&lt;br /&gt;
The first method is the simplest, and allows specification of crate versions through a method similar to Ruby gemfiles. Simply navigate to the &amp;lt;code&amp;gt;[dependencies]&amp;lt;/code&amp;gt; section of the Cargo.toml, and add the crate and the version, like this example with websocket: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[dependencies]&lt;br /&gt;
...&lt;br /&gt;
websocket = &amp;quot;0.11.0&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can vary this with other options, like ~, as in Ruby, to specify that the latest crate should be loaded or an exact version. &lt;br /&gt;
&lt;br /&gt;
The second method of adding a dependency allows for far more flexibility. A crate's git repository can be added directly to the Cargo.toml, as well as many options to use particular branches, versions, and revisions. &lt;br /&gt;
The syntax for these dependencies is shown below. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[dependency.crate_name]&lt;br /&gt;
git = &amp;quot;path_to_crate_git&amp;quot;&lt;br /&gt;
//other options&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Other options that are particularly useful include the ability to choose branches and revisions. Each of these options are shown below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
branch = &amp;quot;name_of_branch&amp;quot;&lt;br /&gt;
rev = &amp;quot;hash_of_commit&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The next step for adding a crate to a servo project requires modifying the main.rs or lib.rs, depending on which is being used for the project. Normally, the main.rs is used for the primary package, where other parts of a project may only use a lib.rs. To add a crate in either of these files, use the code shown below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
extern crate crate_name&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Further uses of Cargo and other syntax beyond what is discussed in this article can be found here: [http://doc.crates.io/guide.html].&lt;/div&gt;</summary>
		<author><name>Wpgallih</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_M1502_GVJ&amp;diff=95773</id>
		<title>CSC/ECE 517 Spring 2015/oss M1502 GVJ</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_M1502_GVJ&amp;diff=95773"/>
		<updated>2015-03-23T20:11:04Z</updated>

		<summary type="html">&lt;p&gt;Wpgallih: /* The Crate Manager */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==M1502: Implementing the WebSocket API==&lt;br /&gt;
This project concentrates on implementing Rust WebSocket API for Mozilla's web browser engine, Servo. The project work involved making the Servo's script depend on WebSocket crate.   &lt;br /&gt;
&lt;br /&gt;
==Introduction to Mozilla Servo==&lt;br /&gt;
Servo is a Web Browser engine written in [https://github.com/rust-lang/rust Rust]. Servo is an experimental project build that targets new generation of hardware: mobile devices, multi-core processors and high-performance GPUs to obtain power efficiency and maximum parallelism. &lt;br /&gt;
&lt;br /&gt;
==Rust==&lt;br /&gt;
[https://github.com/rust-lang/rust Rust] is a Systems programming language built in Rust itself that is fast, memory safe and multithreaded, but does not employ a garbage collector or otherwise impose significant runtime overhead. Rust is able to provide both control over hardware and safety which is not the case with other programming languages like C, C++, Python that provide only either control or safety but not both. &lt;br /&gt;
&lt;br /&gt;
==WebSocket==&lt;br /&gt;
WebSockets is a protocol that provides [http://en.wikipedia.org/wiki/Duplex_(telecommunications)#FULL-DUPLEX full-duplex] channel for a TCP connection and makes it possible to open an interactive communication session between the user's browser and a server. With WebSockets, you can send messages to a server and receive event-driven responses without having to request the server for a reply. The [http://dev.w3.org/html5/websockets/ WebSocket] specification defines an API to establish a &amp;quot;socket&amp;quot; connection between a web browser and a server. This establishment involves a handshake following which there is a persistent connection between the client and the server and both parties can start sending data asynchronously.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
The goal of this project was to incorporate the websocket crate in to servo, using the up to date rust websocket crate instructions. To do that, Rust's crate manager and how it interacted with servo's Mach tool was explored.  &lt;br /&gt;
&lt;br /&gt;
===The Crate Manager===&lt;br /&gt;
To incorporate new crates in to a project in rust, two main tasks are needed. First, depending on the crate that is used, a dependency needs to be added to the relevant Cargo.toml. For servo and websocket, that Cargo.toml is related to the script component, found in servo's components/script folder. To add a dependency to the Cargo.toml file, a couple different methods are available, both with separate advantages. &lt;br /&gt;
&lt;br /&gt;
The first method is the simplest, and allows specification of crate versions through a method similar to Ruby gemfiles. Simply navigate to the &amp;lt;code&amp;gt;[dependencies]&amp;lt;/code&amp;gt; section of the Cargo.toml, and add the crate and the version, like this example with websocket: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[dependencies]&lt;br /&gt;
...&lt;br /&gt;
websocket = &amp;quot;0.11.0&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can vary this with other options, like ~, as in Ruby, to specify that the latest crate should be loaded or an exact version. &lt;br /&gt;
&lt;br /&gt;
The second method of adding a dependency allows for far more flexibility. A crate's git repository can be added directly to the Cargo.toml, as well as many options to use particular branches, versions, and revisions. &lt;br /&gt;
The syntax for these dependencies is shown below. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
[dependency.crate_name] &amp;lt;br&amp;gt;&lt;br /&gt;
git = &amp;quot;path_to_crate_git&amp;quot; &amp;lt;br&amp;gt;&lt;br /&gt;
//other options &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Other options that are particularly useful include the ability to choose branches and revisions. Each of these options are shown below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
branch = &amp;quot;name_of_branch&amp;quot; &amp;lt;br&amp;gt;&lt;br /&gt;
rev = &amp;quot;hash_of_commit&amp;quot; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The next step for adding a crate to a servo project requires modifying the main.rs or lib.rs, depending on which is being used for the project. Normally, the main.rs is used for the primary package, where other parts of a project may only use a lib.rs. To add a crate in either of these files, use the code shown below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
extern crate crate_name &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Further uses of Cargo and other syntax beyond what is discussed in this article can be found here: [http://doc.crates.io/guide.html].&lt;/div&gt;</summary>
		<author><name>Wpgallih</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_M1502_GVJ&amp;diff=95772</id>
		<title>CSC/ECE 517 Spring 2015/oss M1502 GVJ</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_M1502_GVJ&amp;diff=95772"/>
		<updated>2015-03-23T20:10:40Z</updated>

		<summary type="html">&lt;p&gt;Wpgallih: /* The Crate Manager */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==M1502: Implementing the WebSocket API==&lt;br /&gt;
This project concentrates on implementing Rust WebSocket API for Mozilla's web browser engine, Servo. The project work involved making the Servo's script depend on WebSocket crate.   &lt;br /&gt;
&lt;br /&gt;
==Introduction to Mozilla Servo==&lt;br /&gt;
Servo is a Web Browser engine written in [https://github.com/rust-lang/rust Rust]. Servo is an experimental project build that targets new generation of hardware: mobile devices, multi-core processors and high-performance GPUs to obtain power efficiency and maximum parallelism. &lt;br /&gt;
&lt;br /&gt;
==Rust==&lt;br /&gt;
[https://github.com/rust-lang/rust Rust] is a Systems programming language built in Rust itself that is fast, memory safe and multithreaded, but does not employ a garbage collector or otherwise impose significant runtime overhead. Rust is able to provide both control over hardware and safety which is not the case with other programming languages like C, C++, Python that provide only either control or safety but not both. &lt;br /&gt;
&lt;br /&gt;
==WebSocket==&lt;br /&gt;
WebSockets is a protocol that provides [http://en.wikipedia.org/wiki/Duplex_(telecommunications)#FULL-DUPLEX full-duplex] channel for a TCP connection and makes it possible to open an interactive communication session between the user's browser and a server. With WebSockets, you can send messages to a server and receive event-driven responses without having to request the server for a reply. The [http://dev.w3.org/html5/websockets/ WebSocket] specification defines an API to establish a &amp;quot;socket&amp;quot; connection between a web browser and a server. This establishment involves a handshake following which there is a persistent connection between the client and the server and both parties can start sending data asynchronously.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
The goal of this project was to incorporate the websocket crate in to servo, using the up to date rust websocket crate instructions. To do that, Rust's crate manager and how it interacted with servo's Mach tool was explored.  &lt;br /&gt;
&lt;br /&gt;
===The Crate Manager===&lt;br /&gt;
To incorporate new crates in to a project in rust, two main tasks are needed. First, depending on the crate that is used, a dependency needs to be added to the relevant Cargo.toml. For servo and websocket, that Cargo.toml is related to the script component, found in servo's components/script folder. To add a dependency to the Cargo.toml file, a couple different methods are available, both with separate advantages. &lt;br /&gt;
&lt;br /&gt;
The first method is the simplest, and allows specification of crate versions through a method similar to Ruby gemfiles. Simply navigate to the &amp;lt;code&amp;gt;[dependencies]&amp;lt;/code&amp;gt; section of the Cargo.toml, and add the crate and the version, like this example with websocket: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
[dependencies] &amp;lt;br&amp;gt;&lt;br /&gt;
... &amp;lt;br&amp;gt;&lt;br /&gt;
websocket = &amp;quot;0.11.0&amp;quot; &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can vary this with other options, like ~, as in Ruby, to specify that the latest crate should be loaded or an exact version. &lt;br /&gt;
&lt;br /&gt;
The second method of adding a dependency allows for far more flexibility. A crate's git repository can be added directly to the Cargo.toml, as well as many options to use particular branches, versions, and revisions. &lt;br /&gt;
The syntax for these dependencies is shown below. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
[dependency.crate_name] &amp;lt;br&amp;gt;&lt;br /&gt;
git = &amp;quot;path_to_crate_git&amp;quot; &amp;lt;br&amp;gt;&lt;br /&gt;
//other options &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Other options that are particularly useful include the ability to choose branches and revisions. Each of these options are shown below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
branch = &amp;quot;name_of_branch&amp;quot; &amp;lt;br&amp;gt;&lt;br /&gt;
rev = &amp;quot;hash_of_commit&amp;quot; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The next step for adding a crate to a servo project requires modifying the main.rs or lib.rs, depending on which is being used for the project. Normally, the main.rs is used for the primary package, where other parts of a project may only use a lib.rs. To add a crate in either of these files, use the code shown below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
extern crate crate_name &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Further uses of Cargo and other syntax beyond what is discussed in this article can be found here: [http://doc.crates.io/guide.html].&lt;/div&gt;</summary>
		<author><name>Wpgallih</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_M1502_GVJ&amp;diff=95771</id>
		<title>CSC/ECE 517 Spring 2015/oss M1502 GVJ</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_M1502_GVJ&amp;diff=95771"/>
		<updated>2015-03-23T20:10:21Z</updated>

		<summary type="html">&lt;p&gt;Wpgallih: /* The Crate Manager */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==M1502: Implementing the WebSocket API==&lt;br /&gt;
This project concentrates on implementing Rust WebSocket API for Mozilla's web browser engine, Servo. The project work involved making the Servo's script depend on WebSocket crate.   &lt;br /&gt;
&lt;br /&gt;
==Introduction to Mozilla Servo==&lt;br /&gt;
Servo is a Web Browser engine written in [https://github.com/rust-lang/rust Rust]. Servo is an experimental project build that targets new generation of hardware: mobile devices, multi-core processors and high-performance GPUs to obtain power efficiency and maximum parallelism. &lt;br /&gt;
&lt;br /&gt;
==Rust==&lt;br /&gt;
[https://github.com/rust-lang/rust Rust] is a Systems programming language built in Rust itself that is fast, memory safe and multithreaded, but does not employ a garbage collector or otherwise impose significant runtime overhead. Rust is able to provide both control over hardware and safety which is not the case with other programming languages like C, C++, Python that provide only either control or safety but not both. &lt;br /&gt;
&lt;br /&gt;
==WebSocket==&lt;br /&gt;
WebSockets is a protocol that provides [http://en.wikipedia.org/wiki/Duplex_(telecommunications)#FULL-DUPLEX full-duplex] channel for a TCP connection and makes it possible to open an interactive communication session between the user's browser and a server. With WebSockets, you can send messages to a server and receive event-driven responses without having to request the server for a reply. The [http://dev.w3.org/html5/websockets/ WebSocket] specification defines an API to establish a &amp;quot;socket&amp;quot; connection between a web browser and a server. This establishment involves a handshake following which there is a persistent connection between the client and the server and both parties can start sending data asynchronously.&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
The goal of this project was to incorporate the websocket crate in to servo, using the up to date rust websocket crate instructions. To do that, Rust's crate manager and how it interacted with servo's Mach tool was explored.  &lt;br /&gt;
&lt;br /&gt;
===The Crate Manager===&lt;br /&gt;
To incorporate new crates in to a project in rust, two main tasks are needed. First, depending on the crate that is used, a dependency needs to be added to the relevant Cargo.toml. For servo and websocket, that Cargo.toml is related to the script component, found in servo's components/script folder. To add a dependency to the Cargo.toml file, a couple different methods are available, both with separate advantages. &lt;br /&gt;
&lt;br /&gt;
The first method is the simplest, and allows specification of crate versions through a method similar to Ruby gemfiles. Simply navigate to the &amp;lt;code&amp;gt;[dependencies]&amp;lt;/code&amp;gt; section of the Cargo.toml, and add the crate and the version, like this example with websocket: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
[dependencies] &amp;lt;br&amp;gt;&lt;br /&gt;
... &amp;lt;br&amp;gt;&lt;br /&gt;
websocket = &amp;quot;0.11.0&amp;quot; &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can vary this with other options, like ~, as in Ruby, to specify that the latest crate should be loaded or an exact version. &lt;br /&gt;
&lt;br /&gt;
The second method of adding a dependency allows for far more flexibility. A crate's git repository can be added directly to the Cargo.toml, as well as many options to use particular branches, versions, and revisions. &lt;br /&gt;
The syntax for these dependencies is shown below. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
[dependency.crate_name] &amp;lt;br&amp;gt;&lt;br /&gt;
git = &amp;quot;path_to_crate_git&amp;quot; &amp;lt;br&amp;gt;&lt;br /&gt;
//other options &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Other options that are particularly useful include the ability to choose branches and revisions. Each of these options are shown below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
branch = &amp;quot;name_of_branch&amp;quot; &amp;lt;br&amp;gt;&lt;br /&gt;
rev = &amp;quot;hash_of_commit&amp;quot; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The next step for adding a crate to a servo project requires modifying the main.rs or lib.rs, depending on which is being used for the project. Normally, the main.rs is used for the primary package, where other parts of a project may only use a lib.rs. To add a crate in either of these files, use the code shown below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
extern crate crate_name &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Further uses of Cargo and other syntax beyond what is discussed in this article can be found here: [http://doc.crates.io/guide.html].&lt;/div&gt;</summary>
		<author><name>Wpgallih</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_M1502_GVJ&amp;diff=95767</id>
		<title>CSC/ECE 517 Spring 2015/oss M1502 GVJ</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_M1502_GVJ&amp;diff=95767"/>
		<updated>2015-03-23T19:55:55Z</updated>

		<summary type="html">&lt;p&gt;Wpgallih: /* The Crate Manager */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==M1502: Implementing the WebSocket API==&lt;br /&gt;
This project concentrates on implementing Rust WebSocket API for Mozilla's web browser engine, Servo. The project work involved making the Servo's script depend on WebSocket crate.   &lt;br /&gt;
&lt;br /&gt;
==Introduction to Mozilla Servo==&lt;br /&gt;
Servo is a Web Browser engine written in [https://github.com/rust-lang/rust Rust]. Servo is an experimental project build that targets new generation of hardware: mobile devices, multi-core processors and high-performance GPUs to obtain power efficiency and maximum parallelism. &lt;br /&gt;
&lt;br /&gt;
==Rust==&lt;br /&gt;
[https://github.com/rust-lang/rust Rust] is a Systems programming language built in Rust itself that is fast, memory safe and multithreaded, but does not employ a garbage collector or otherwise impose significant runtime overhead. Rust is able to provide both control over hardware and safety which is not the case with other programming languages like C, C++, Python that provide only either control or safety but not both. &lt;br /&gt;
&lt;br /&gt;
==WebSocket==&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
The goal of this project was to incorporate the websocket crate in to servo, using the up to date rust websocket crate instructions. To do that, Rust's crate manager and how it interacted with servo's Mach tool was explored. &lt;br /&gt;
&lt;br /&gt;
===The Crate Manager===&lt;br /&gt;
To incorporate new crates in to a project in rust, two main tasks are needed. First, depending on the crate that is used, a dependency needs to be added to the relevant Cargo.toml. For servo and websocket, that Cargo.toml is related to the script component, found in servo's components/script folder. To add a dependency to the Cargo.toml file, a couple different methods are available, both with separate advantages. &lt;br /&gt;
&lt;br /&gt;
The first method is the simplest, and allows specification of crate versions through a method similar to Ruby gemfiles. Simply navigate to the &amp;lt;code&amp;gt;[dependencies]&amp;lt;/code&amp;gt; section of the Cargo.toml, and add the crate and the version, like this example with websocket: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
[dependencies] &amp;lt;br&amp;gt;&lt;br /&gt;
... &amp;lt;br&amp;gt;&lt;br /&gt;
websocket = &amp;quot;0.11.3&amp;quot; &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Wpgallih</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_M1502_GVJ&amp;diff=95766</id>
		<title>CSC/ECE 517 Spring 2015/oss M1502 GVJ</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_M1502_GVJ&amp;diff=95766"/>
		<updated>2015-03-23T19:55:01Z</updated>

		<summary type="html">&lt;p&gt;Wpgallih: /* The Crate Manager */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==M1502: Implementing the WebSocket API==&lt;br /&gt;
This project concentrates on implementing Rust WebSocket API for Mozilla's web browser engine, Servo. The project work involved making the Servo's script depend on WebSocket crate.   &lt;br /&gt;
&lt;br /&gt;
==Introduction to Mozilla Servo==&lt;br /&gt;
Servo is a Web Browser engine written in [https://github.com/rust-lang/rust Rust]. Servo is an experimental project build that targets new generation of hardware: mobile devices, multi-core processors and high-performance GPUs to obtain power efficiency and maximum parallelism. &lt;br /&gt;
&lt;br /&gt;
==Rust==&lt;br /&gt;
[https://github.com/rust-lang/rust Rust] is a Systems programming language built in Rust itself that is fast, memory safe and multithreaded, but does not employ a garbage collector or otherwise impose significant runtime overhead. Rust is able to provide both control over hardware and safety which is not the case with other programming languages like C, C++, Python that provide only either control or safety but not both. &lt;br /&gt;
&lt;br /&gt;
==WebSocket==&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
The goal of this project was to incorporate the websocket crate in to servo, using the up to date rust websocket crate instructions. To do that, Rust's crate manager and how it interacted with servo's Mach tool was explored. &lt;br /&gt;
&lt;br /&gt;
===The Crate Manager===&lt;br /&gt;
To incorporate new crates in to a project in rust, two main tasks are needed. First, depending on the crate that is used, a dependency needs to be added to the relevant Cargo.toml. For servo and websocket, that Cargo.toml is related to the script component, found in servo's components/script folder. To add a dependency to the Cargo.toml file, a couple different methods are available, both with separate advantages. &lt;br /&gt;
&lt;br /&gt;
The first method is the simplest, and allows specification of crate versions through a method similar to Ruby gemfiles. Simply navigate to the &amp;lt;code&amp;gt;[dependencies]&amp;lt;/code&amp;gt; section of the Cargo.toml, and add the crate and the version, like this example with websocket: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
[dependencies] &lt;br /&gt;
... &lt;br /&gt;
websocket = &amp;quot;0.11.3&amp;quot; &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Wpgallih</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_M1502_GVJ&amp;diff=95765</id>
		<title>CSC/ECE 517 Spring 2015/oss M1502 GVJ</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_M1502_GVJ&amp;diff=95765"/>
		<updated>2015-03-23T19:54:43Z</updated>

		<summary type="html">&lt;p&gt;Wpgallih: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==M1502: Implementing the WebSocket API==&lt;br /&gt;
This project concentrates on implementing Rust WebSocket API for Mozilla's web browser engine, Servo. The project work involved making the Servo's script depend on WebSocket crate.   &lt;br /&gt;
&lt;br /&gt;
==Introduction to Mozilla Servo==&lt;br /&gt;
Servo is a Web Browser engine written in [https://github.com/rust-lang/rust Rust]. Servo is an experimental project build that targets new generation of hardware: mobile devices, multi-core processors and high-performance GPUs to obtain power efficiency and maximum parallelism. &lt;br /&gt;
&lt;br /&gt;
==Rust==&lt;br /&gt;
[https://github.com/rust-lang/rust Rust] is a Systems programming language built in Rust itself that is fast, memory safe and multithreaded, but does not employ a garbage collector or otherwise impose significant runtime overhead. Rust is able to provide both control over hardware and safety which is not the case with other programming languages like C, C++, Python that provide only either control or safety but not both. &lt;br /&gt;
&lt;br /&gt;
==WebSocket==&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
The goal of this project was to incorporate the websocket crate in to servo, using the up to date rust websocket crate instructions. To do that, Rust's crate manager and how it interacted with servo's Mach tool was explored. &lt;br /&gt;
&lt;br /&gt;
===The Crate Manager===&lt;br /&gt;
To incorporate new crates in to a project in rust, two main tasks are needed. First, depending on the crate that is used, a dependency needs to be added to the relevant Cargo.toml. For servo and websocket, that Cargo.toml is related to the script component, found in servo's components/script folder. To add a dependency to the Cargo.toml file, a couple different methods are available, both with separate advantages. &lt;br /&gt;
&lt;br /&gt;
The first method is the simplest, and allows specification of crate versions through a method similar to Ruby gemfiles. Simply navigate to the &amp;lt;code&amp;gt;[dependencies]&amp;lt;/code&amp;gt; section of the Cargo.toml, and add the crate and the version, like this example with websocket: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
[dependencies] &lt;br /&gt;
&lt;br /&gt;
... &lt;br /&gt;
&lt;br /&gt;
websocket = &amp;quot;0.11.3&amp;quot; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Wpgallih</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_M1502_GVJ&amp;diff=95612</id>
		<title>CSC/ECE 517 Spring 2015/oss M1502 GVJ</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_M1502_GVJ&amp;diff=95612"/>
		<updated>2015-03-23T09:58:59Z</updated>

		<summary type="html">&lt;p&gt;Wpgallih: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==M1502: Implementing the WebSocket API==&lt;br /&gt;
This project concentrates on implementing Rust WebSocket API for Mozilla's web browser engine, Servo. The project work involved making the Servo's script depend on WebSocket crate.   &lt;br /&gt;
&lt;br /&gt;
==Introduction to Mozilla Servo==&lt;br /&gt;
Servo is a Web Browser engine written in [https://github.com/rust-lang/rust Rust]. Servo is an experimental project build that targets new generation of hardware: mobile devices, multi-core processors and high-performance GPUs to obtain power efficiency and maximum parallelism. &lt;br /&gt;
&lt;br /&gt;
==Rust==&lt;br /&gt;
[https://github.com/rust-lang/rust Rust] is a Systems programming language built in Rust itself that is fast, memory safe and multithreaded, but does not employ a garbage collector or otherwise impose significant runtime overhead. Rust is able to provide both control over hardware and safety which is not the case with other programming languages like C, C++, Python that provide only either control or safety but not both. &lt;br /&gt;
&lt;br /&gt;
==WebSocket==&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
The goal of this project was to incorporate the websocket crate in to servo, using the up to date rust websocket crate instructions. To do that, Rust's crate manager and how it interacted with servo's Mach tool was explored. &lt;br /&gt;
&lt;br /&gt;
===The Crate Manager===&lt;br /&gt;
To incorporate new crates in to a project in rust, two main tasks are needed. First, depending on the crate that is used, a dependency needs to be added to the relevant Cargo.toml. For servo and websocket, that Cargo.toml is related to the script component, found in servo's components/script folder. To add a dependency to the Cargo.toml file, a couple different methods are available, both with separate advantages. &lt;br /&gt;
&lt;br /&gt;
The first method is the simplest, and allows specification of crate versions through a method similar to Ruby gemfiles. Simply navigate to the &amp;lt;code&amp;gt;[dependencies]&amp;lt;/code&amp;gt; section of the Cargo.toml, and add the crate and the version, like this example with websocket:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
[dependencies]&lt;br /&gt;
...&lt;br /&gt;
websocket = &amp;quot;0.11.3&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Wpgallih</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_M1502_GVJ&amp;diff=95611</id>
		<title>CSC/ECE 517 Spring 2015/oss M1502 GVJ</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_M1502_GVJ&amp;diff=95611"/>
		<updated>2015-03-23T09:46:58Z</updated>

		<summary type="html">&lt;p&gt;Wpgallih: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==M1502: Implementing the WebSocket API==&lt;br /&gt;
This project concentrates on implementing Rust WebSocket API for Mozilla's web browser engine, Servo. The project work involved making the Servo's script depend on WebSocket crate.   &lt;br /&gt;
&lt;br /&gt;
==Introduction to Mozilla Servo==&lt;br /&gt;
Servo is a Web Browser engine written in [https://github.com/rust-lang/rust Rust]. Servo is an experimental project build that targets new generation of hardware: mobile devices, multi-core processors and high-performance GPUs to obtain power efficiency and maximum parallelism. &lt;br /&gt;
&lt;br /&gt;
==Rust==&lt;br /&gt;
[https://github.com/rust-lang/rust Rust] is a Systems programming language built in Rust itself that is fast, memory safe and multithreaded, but does not employ a garbage collector or otherwise impose significant runtime overhead. Rust is able to provide both control over hardware and safety which is not the case with other programming languages like C, C++, Python that provide only either control or safety but not both. &lt;br /&gt;
&lt;br /&gt;
==WebSocket==&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
The goal of this project was to incorporate the websocket crate in to servo, using the up to date rust websocket crate instructions. To do that, Rust's crate manager and how it interacted with servo's Mach tool was explored. &lt;br /&gt;
&lt;br /&gt;
=The Crate Manager=&lt;br /&gt;
To incorporate new crates in to a project in rust, two main tasks are needed. First, depending on the crate that is used, a dependency needs to be added to the relevant Cargo.toml. For servo and websocket, that Cargo.toml is related to the script component, found in servo's components/script folder. To add a dependency to the Cargo.toml file, a couple different methods are available, both with separate advantages. &lt;br /&gt;
&lt;br /&gt;
The first method is the simplest, and allows specification of crate versions through a method similar to Ruby gemfiles. Simply navigate to the &amp;lt;code&amp;gt;[dependencies]&amp;lt;/code&amp;gt; section of the Cargo.toml, and add the crate and the version, like this example with websocket:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
[dependencies]&lt;br /&gt;
...&lt;br /&gt;
websocket = &amp;quot;0.11.3&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Wpgallih</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_M1502_GVJ&amp;diff=95610</id>
		<title>CSC/ECE 517 Spring 2015/oss M1502 GVJ</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_M1502_GVJ&amp;diff=95610"/>
		<updated>2015-03-23T09:46:35Z</updated>

		<summary type="html">&lt;p&gt;Wpgallih: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==M1502: Implementing the WebSocket API==&lt;br /&gt;
This project concentrates on implementing Rust WebSocket API for Mozilla's web browser engine, Servo. The project work involved making the Servo's script depend on WebSocket crate.   &lt;br /&gt;
&lt;br /&gt;
==Introduction to Mozilla Servo==&lt;br /&gt;
Servo is a Web Browser engine written in [https://github.com/rust-lang/rust Rust]. Servo is an experimental project build that targets new generation of hardware: mobile devices, multi-core processors and high-performance GPUs to obtain power efficiency and maximum parallelism. &lt;br /&gt;
&lt;br /&gt;
==Rust==&lt;br /&gt;
[https://github.com/rust-lang/rust Rust] is a Systems programming language built in Rust itself that is fast, memory safe and multithreaded, but does not employ a garbage collector or otherwise impose significant runtime overhead. Rust is able to provide both control over hardware and safety which is not the case with other programming languages like C, C++, Python that provide only either control or safety but not both. &lt;br /&gt;
&lt;br /&gt;
==WebSocket==&lt;br /&gt;
&lt;br /&gt;
==Project Description==&lt;br /&gt;
The goal of this project was to incorporate the websocket crate in to servo, using the up to date rust websocket crate instructions. To do that, Rust's crate manager and how it interacted with servo's Mach tool was explored. &lt;br /&gt;
&lt;br /&gt;
=The Crate Manager=&lt;br /&gt;
To incorporate new crates in to a project in rust, two main tasks are needed. First, depending on the crate that is used, a dependency needs to be added to the relevant Cargo.toml. For servo and websocket, that Cargo.toml is related to the script component, found in servo's components/script folder. To add a dependency to the Cargo.toml file, a couple different methods are available, both with separate advantages. &lt;br /&gt;
&lt;br /&gt;
The first method is the simplest, and allows specification of crate versions through a method similar to Ruby gemfiles. Simply navigate to the &amp;lt;code&amp;gt;[dependencies]&amp;lt;/code&amp;gt; section of the Cargo.toml, and add the crate and the version, like this example with websocket:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ruby&amp;quot;&amp;gt;&lt;br /&gt;
[dependencies]&lt;br /&gt;
...&lt;br /&gt;
websocket = &amp;quot;0.11.3&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Wpgallih</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/ch1a_2_WA&amp;diff=93972</id>
		<title>CSC/ECE 517 Spring 2015/ch1a 2 WA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/ch1a_2_WA&amp;diff=93972"/>
		<updated>2015-02-16T22:25:16Z</updated>

		<summary type="html">&lt;p&gt;Wpgallih: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Knife&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
[[File:workstation.png|frame|Source: https://docs.chef.io/chef_quick_overview.html|right]]&lt;br /&gt;
Knife is the command line tool for managing Chef nodes. Simply, Chef allows the distribution of server environments between many different servers (called '''nodes'''). Any changes to the primary chef server (called the '''chef repo''' are distributed throughout all the other nodes, while different nodes can have other recipes and send them back to the chef repo. Knife, then, handles the communication between nodes and the chef repo. For example, let's say that there is an object on the chef repo that a node desires. Knife provides the tools to download that object to the node. Knife also allows setting up a node, installing necessary packages, management of users, and much more.&lt;br /&gt;
&lt;br /&gt;
The topic writeup for this page can be found [https://docs.google.com/document/d/1TgBtp7flIPKJwkkShgtcIkt--mtHuwVHsQX6Tpzj1rc/edit here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
&lt;br /&gt;
Chef streamlines the task of configuring and maintaining a company's servers, and can integrate with cloud-based platforms. Chef is an IT and environment distribution system, built to be robust and scalable. Imagine a large scale internet based company. Depending on the demands of the company, they may have a need for development workstations, servers for purchasing products, servers for hosting games, even clients for games or accessing databases. All of these different environments are called ''chef client nodes'', with each different setup as different ''environments''. For example, you might have ten chef client nodes set up with the development environment, and one hundred chef client nodes set up with the server environment. The chef server contains all of the ''recipes'', reusable code that may be needed both for use and setup of different chef client nodes, to set up all of the different environments that have been defined. In addition, the chef server works like other versioning software. This means you can roll out updates conveniently to all of the different chef client nodes with ease. This allows the entire collection of chef, the recipes, environments, and nodes, called the ''infrastructure'', to be managed simply and in defined, scalable versions. &lt;br /&gt;
Chef is more complex and allows other little tricks and nuances. If you want to learn more about Chef itself, beyond the description found here, check out the comparison between Chef and Puppet here: [http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2013/ch1_1w10_ga] or take a look at the official Chef website here: &amp;lt;ref&amp;gt;[https://www.chef.io/ Chef]&amp;lt;/ref&amp;gt;, which are the sources for the information in this background. This description just serves to introduce the concept of chef, so that knife's purpose can be understood. These other pages cover the ideas of Chef and how to use it effectively in more detail. In fact, the main site for Chef has an interactive tutorial in setting up a Chef server, without even having to use a personal server or computer. However, the rest of this article will be describing and covering knife. &lt;br /&gt;
&lt;br /&gt;
== What is Knife? ==&lt;br /&gt;
&lt;br /&gt;
Chef includes two important command-line tools.&lt;br /&gt;
*Knife command-line tool&lt;br /&gt;
*Chef command-line tool&lt;br /&gt;
&lt;br /&gt;
knife is the command-line tool that provides an interface between a local chef client node and the Chef server. Where the Chef command-line tool is used while working with the chef server and repo, Knife helps us to manage the following:&lt;br /&gt;
&lt;br /&gt;
* Nodes&lt;br /&gt;
* JSON data Stores &lt;br /&gt;
* Environments&lt;br /&gt;
* chef-clients installations on management workstations&lt;br /&gt;
&lt;br /&gt;
Basically, the chef command tool deals with the actual chef installation wherever it is, either a local installation and on the server. It deals only with itself. Knife, however, deals with the setup of all the communication and objects between the chef server and a chef client node. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot; style=&amp;quot;width: auto; margin-left: auto; margin-right: auto;&amp;quot;&amp;gt; [[File:chef_knife server.png]] &amp;lt;ref&amp;gt;[http://dev.classmethod.jp/server-side/chef-server-install/ Chef Server]&amp;lt;/ref&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the figure, we can see that how knife provides an interface  between local repository's and Chef server at the workstation. &lt;br /&gt;
&lt;br /&gt;
== Using Knife ==&lt;br /&gt;
&lt;br /&gt;
Using Knife is fairly straightforward, with usage following this syntax:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; knife [verb] [object] [options] &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The different verbs, or subcommands, for Knife are as follows, from the Using Knife page&amp;lt;ref&amp;gt; [https://docs.chef.io/knife_using.html Knife Documents]&amp;lt;/ref&amp;gt;: bootstrap, client, configure, cookbook, cookbook site, data bag, delete, deps, diff, download, edit, environment, exec, index rebuild, list, node, recipe list, role, search, show, ssh, status, tag, upload, user, and xargs.&lt;br /&gt;
&lt;br /&gt;
'''Warning:''' Before you run many of these commands, you should have the knife editor set correctly. In the chef-repo, there are multiple ruby files that set the configuration of the environment. Inside of knife.rb, you need to add or set the following line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ruby&amp;quot;&amp;gt;&lt;br /&gt;
knife[:editor] = &amp;quot;/usr/bin/vim&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The path can be set to the text editor of choice, the above command sets the editor to vim. &lt;br /&gt;
&lt;br /&gt;
The example we will use is also one that is useful for setting up nodes, and that is the usage of the bootstrap command. To set up a node, go to the command line on the chef repo and execute the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;knife bootstrap ip_address_of_node -x username -P password --sudo &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First, the verb used is '''bootstrap'''. Bootstrap is the subcommand that allows the installation of a chef client on to a targeted node. &lt;br /&gt;
Second, the object is the ip_address_of_node. Every subcommand takes an object, and since chef operates on many ruby principles and scripts, the object can be most anything. For boostrap, this object is the ip of the server address. For other commands, this might be something different. &lt;br /&gt;
Third, we have the options for the bootstrap command and the object. For bootstrap, this includes the username and password for the node, and the option --sudo, to make sure all commands are executed correctly. &lt;br /&gt;
&lt;br /&gt;
Before we do the next example, let's cover an important part of object strings and how they are treated by knife and the chef repo. &lt;br /&gt;
&lt;br /&gt;
'''Wildcards'''&lt;br /&gt;
A wildcard search can be used similar to standard regex commands, with one notable difference. The wildcard character itself '''must be escaped using the \ character.''' Here is an example from the &amp;quot;Using Knife&amp;quot; page on the chef website. Let's say the following was used to search for an object:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;data_bags/a\*&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will return all of the objects that start with data_bags\a on the chef-node. However, if we were to run the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;data_bags/a*&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will only search for objects on the chef repo corresponding to objects starting with data_bags/a on the node. Therefore, the * was applied '''before''' being sent to the chef repo, instead of after. So, as an example, let us list all of the data bags that are on the server that start with 'a'. Our object, then, is the string above, &amp;lt;code&amp;gt;data_bags/a\*&amp;lt;/code&amp;gt;. The verb that lists different objects on the chef repo is called &amp;lt;code&amp;gt;list&amp;lt;/code&amp;gt;. Our command we would run would be this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;knife list data_bags/a\*&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Which would print to the console all of the objects in the data_bags directory that started with a.&lt;br /&gt;
&lt;br /&gt;
== Bootstrapping A Node ==&lt;br /&gt;
&lt;br /&gt;
One of the key uses of knife is doing something called &amp;quot;bootstrapping&amp;quot; a node &amp;lt;ref&amp;gt;[http://docs.chef.io/open_source/install_bootstrap.html Install Bootstrap]&amp;lt;/ref&amp;gt;. This key tool allows someone using the Chef server to set up a remote node, or client. Not only does knife set up all of the relevant recipes, environments, and other such things related with the chef repo itself, it also installs all of the tools necessary for interacting with the chef server and configuring the chef client. Because of this, a basic understanding in how to bootstrap a node, and some knowledge on the available options for bootstrapping a node, is important. &lt;br /&gt;
&lt;br /&gt;
Luckily, bootstrapping a node is very simple. To bootstrap a node, the general command would look like this. Be aware, this is being run from the chef server. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;knife bootstrap ip_address_of_node -x username -P password --sudo --node-name name_of_node&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This process will create a chef client at the designated IP adress. The username and the password is the username and password of a root access user on the remote node.  The name of the node can be set here as well,  instead of automatically using other settings. The option is shown here, to make the rest of the example easier to understand. Luckily, the knife bootstrap command uses an omnibus installer that automatically detects the OS of the target machine and will install all of the necessary command line tools and internal installations, like ruby, for the chef client to function. Once the bootstrap command is complete, the following message will be displayed.&lt;br /&gt;
&amp;lt;pre&amp;gt;INFO: Report handlers complete&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, before continuing, confirmation of the remote node is necessary. To confirm that the remote node was installed correctly and is running, run the following command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;knife client show name_of_node&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here, the name_of_node is the name of the node either set in other options and commands, such as the --node-name used above. When this is run, the node's information should be displayed, such as if the node is an admin, the name of the node, and the JSON type it was created from. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;admin:       false&lt;br /&gt;
chef_type:   client&lt;br /&gt;
json_class:  Chef::ApiClient&lt;br /&gt;
name:        name_of_node&lt;br /&gt;
public_key:&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Bootstrap Options and Knife Settings ==&lt;br /&gt;
As one of the most powerful tools knife has to offer, the bootstrap function has many different options available to it. The &amp;quot;Installing Bootstrap&amp;quot; section covered three such options (-x, -P, and --node-name), but there are many more available that are useful. Here are a few that stand out as being useful to someone using knife bootstrap for the first time, or for people who are dealing with something outside of the normal conditions for installing and using knife bootstrap. In addition, adding different settings to the knife.rb file will be covered, for people looking to expand the usage of knife and knife bootstrap. Most of this information is covered in higher detail in the main knife bootstrap page, as well as all the other options. You can check that page out using the reference here.&amp;lt;ref&amp;gt;[http://docs.chef.io/knife_bootstrap.html Knife Boostrap]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''--bootstrap-curl-options OPTIONS, --bootstrap-install-command COMMAND, --bootstrap-install-sh URL'''&lt;br /&gt;
&lt;br /&gt;
These commands allow customization of the installation bootstrap performs. They are all mutually exclusive, but allow different ways to perform this customization. The first, bootstap-curl-options, which allows additional cURL options to be performed alongside the bootstrap installation. To learn more about cURL, check out their main web page here: ([http://curl.haxx.se/ cURL Home Page]). The second, bootstrap-install-command, allows the execution of another install command on the target node alongside the bootstrap function. The final one, bootstrap-install-sh, allows a custom install script located at the designated URL to be run, following the bootstrap command. &lt;br /&gt;
&lt;br /&gt;
'''--environment ENVIRONMENT, --boostrap-template TEMPLATE'''&lt;br /&gt;
&lt;br /&gt;
The --environment and --bootstrap-template commands are similar, in that they allow customization of the target node. One allows the node to be set up against a target environment, which is useful if your chef server has multiple environments available. The next allows different node setups to be saved as templates. These can be used to quickly and efficiently set up additional similar nodes, especially if the additional installation options in bootstrap are long. &lt;br /&gt;
&lt;br /&gt;
'''-V'''&lt;br /&gt;
&lt;br /&gt;
A small option for bootstrap, the -V option forces the initial chief-client setup to be run on the target node at the debug log level, following the bootstrap installation. This allows almost complete remote setup of new nodes, assuring that the node is ready to be used and the chef-client is fully operational and doesn't need further setup. In addition, the debug log will allow any errors in the chef client to be saved, in the case of something wrong occurring with the node.  The exact command run is shown below:&lt;br /&gt;
&amp;lt;pre&amp;gt;chef-client -l debug&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Custom settings and adding them to the knife.rb file'''&lt;br /&gt;
&lt;br /&gt;
For some settings, including settings related to bootstrap, the options will need to be added to the knife.rb file. This file contains all of the commands for knife, and all of the different options available to these commands. For example, to use the --bootstrap-template and the --sudo options, the following commands need to be executed:&lt;br /&gt;
&amp;lt;pre&amp;gt;knife[:template_file]&lt;br /&gt;
knife[:use_sudo]&amp;lt;/pre&amp;gt;&lt;br /&gt;
These commands add the template_file and use_sudo options to the knife.rb file, which will enable those options to be used in the bootstrap command. There are more options that can be added using the knife.rb file, the full knife documentation for commands are here: ([https://docs.chef.io/chef/knife.html# Knife Reference]).&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Wpgallih</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/ch1a_2_WA&amp;diff=93572</id>
		<title>CSC/ECE 517 Spring 2015/ch1a 2 WA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/ch1a_2_WA&amp;diff=93572"/>
		<updated>2015-02-09T21:12:49Z</updated>

		<summary type="html">&lt;p&gt;Wpgallih: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Knife&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
[[File:workstation.png|frame|Source: https://docs.chef.io/chef_quick_overview.html|right]]&lt;br /&gt;
Knife is the command line tool for managing Chef nodes. Simply, Chef allows the distribution of server environments between many different servers (called '''nodes'''). Any changes to the primary chef server (called the '''chef repo''' are distributed throughout all the other nodes, while different nodes can have other recipes and send them back to the chef repo. Knife, then, handles the communication between nodes and the chef repo. For example, let's say that there is an object on the chef repo that a node desires. Knife provides the tools to download that object to the node. Knife also allows setting up a node, installing necessary packages, management of users, and much more.&lt;br /&gt;
&lt;br /&gt;
The topic writeup for this page can be found [https://docs.google.com/document/d/1TgBtp7flIPKJwkkShgtcIkt--mtHuwVHsQX6Tpzj1rc/edit here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
&lt;br /&gt;
Chef streamlines the task of configuring and maintaining a company's servers, and can integrate with cloud-based platforms.&lt;br /&gt;
If you are unfamiliar with Chef and how it works, check out the comparison between Chef and Puppet here: [http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2013/ch1_1w10_ga] or take a look at the official Chef website here: &amp;lt;ref&amp;gt;[https://www.chef.io/ Chef]&amp;lt;/ref&amp;gt;. There, a deeper understanding of Chef can be attained.&lt;br /&gt;
&lt;br /&gt;
Chef includes two important command-line tools.&lt;br /&gt;
*Knife command-line tool&lt;br /&gt;
*Chef command-line tool&lt;br /&gt;
&lt;br /&gt;
knife is the command-line tool that provides an interface between a local chef-repo and the Chef server. Whereas, Chef command-line tool is used while working with the chef repo. Knife helps us to manage the following.&lt;br /&gt;
&lt;br /&gt;
* Nodes&lt;br /&gt;
* JSON data Stores &lt;br /&gt;
* Environments&lt;br /&gt;
* chef-clients installations on management workstations&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot; style=&amp;quot;width: auto; margin-left: auto; margin-right: auto;&amp;quot;&amp;gt; [[File:chef_knife server.png]] &amp;lt;ref&amp;gt;[http://dev.classmethod.jp/server-side/chef-server-install/ Chef Server]&amp;lt;/ref&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the figure, we can see that how knife provides an interface  between local repository's and Chef server at the workstation.&lt;br /&gt;
&lt;br /&gt;
== Using Knife ==&lt;br /&gt;
&lt;br /&gt;
Using Knife is fairly straightforward, with usage following this syntax:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; knife [verb] [object] [options] &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The different verbs, or subcommands, for Knife are as follows, from the Using Knife page&amp;lt;ref&amp;gt; [https://docs.chef.io/knife_using.html Knife Documents]&amp;lt;/ref&amp;gt;: bootstrap, client, configure, cookbook, cookbook site, data bag, delete, deps, diff, download, edit, environment, exec, index rebuild, list, node, recipe list, role, search, show, ssh, status, tag, upload, user, and xargs.&lt;br /&gt;
&lt;br /&gt;
'''Warning:''' Before you run many of these commands, you should have the knife editor set correctly. In the chef-repo, there are multiple ruby files that set the configuration of the environment. Inside of knife.rb, you need to add or set the following line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ruby&amp;quot;&amp;gt;&lt;br /&gt;
knife[:editor] = &amp;quot;/usr/bin/vim&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The path can be set to the text editor of choice, the above command sets the editor to vim. &lt;br /&gt;
&lt;br /&gt;
The example we will use is also one that is useful for setting up nodes, and that is the usage of the bootstrap command. To set up a node, go to the command line on the chef repo and execute the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;knife bootstrap ip_address_of_node -x username -P password --sudo &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First, the verb used is '''bootstrap'''. Bootstrap is the subcommand that allows the installation of a chef client on to a targeted node. &lt;br /&gt;
Second, the object is the ip_address_of_node. Every subcommand takes an object, and since chef operates on many ruby principles and scripts, the object can be most anything. For boostrap, this object is the ip of the server address. For other commands, this might be something different. &lt;br /&gt;
Third, we have the options for the bootstrap command and the object. For bootstrap, this includes the username and password for the node, and the option --sudo, to make sure all commands are executed correctly. &lt;br /&gt;
&lt;br /&gt;
Before we do the next example, let's cover an important part of object strings and how they are treated by knife and the chef repo. &lt;br /&gt;
&lt;br /&gt;
'''Wildcards'''&lt;br /&gt;
A wildcard search can be used similar to standard regex commands, with one notable difference. The wildcard character itself '''must be escaped using the \ character.''' Here is an example from the &amp;quot;Using Knife&amp;quot; page on the chef website. Let's say the following was used to search for an object:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;data_bags/a\*&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will return all of the objects that start with data_bags\a on the chef-node. However, if we were to run the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;data_bags/a*&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will only search for objects on the chef repo corresponding to objects starting with data_bags/a on the node. Therefore, the * was applied '''before''' being sent to the chef repo, instead of after. So, as an example, let us list all of the data bags that are on the server that start with 'a'. Our object, then, is the string above, &amp;lt;code&amp;gt;data_bags/a\*&amp;lt;/code&amp;gt;. The verb that lists different objects on the chef repo is called &amp;lt;code&amp;gt;list&amp;lt;/code&amp;gt;. Our command we would run would be this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;knife list data_bags/a\*&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Which would print to the console all of the objects in the data_bags directory that started with a.&lt;br /&gt;
&lt;br /&gt;
== Bootstrapping A Node ==&lt;br /&gt;
&lt;br /&gt;
One of the key uses of knife is doing something called &amp;quot;bootstrapping&amp;quot; a node &amp;lt;ref&amp;gt;[http://docs.chef.io/open_source/install_bootstrap.html Install Bootstrap]&amp;lt;/ref&amp;gt;. This key tool allows someone using the Chef server to set up a remote node, or client. Not only does knife set up all of the relevant recipes, environments, and other such things related with the chef repo itself, it also installs all of the tools necessary for interacting with the chef server and configuring the chef client. Because of this, a basic understanding in how to bootstrap a node, and some knowledge on the available options for bootstrapping a node, is important. &lt;br /&gt;
&lt;br /&gt;
Luckily, bootstrapping a node is very simple. To bootstrap a node, the general command would look like this. Be aware, this is being run from the chef server. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;knife bootstrap ip_address_of_node -x username -P password --sudo --node-name name_of_node&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This process will create a chef client at the designated IP adress. The username and the password is the username and password of a root access user on the remote node.  The name of the node can be set here as well,  instead of automatically using other settings. The option is shown here, to make the rest of the example easier to understand. Luckily, the knife bootstrap command uses an omnibus installer that automatically detects the OS of the target machine and will install all of the necessary command line tools and internal installations, like ruby, for the chef client to function. Once the bootstrap command is complete, the following message will be displayed.&lt;br /&gt;
&amp;lt;pre&amp;gt;INFO: Report handlers complete&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, before continuing, confirmation of the remote node is necessary. To confirm that the remote node was installed correctly and is running, run the following command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;knife client show name_of_node&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here, the name_of_node is the name of the node either set in other options and commands, such as the --node-name used above. When this is run, the node's information should be displayed, such as if the node is an admin, the name of the node, and the JSON type it was created from. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;admin:       false&lt;br /&gt;
chef_type:   client&lt;br /&gt;
json_class:  Chef::ApiClient&lt;br /&gt;
name:        name_of_node&lt;br /&gt;
public_key:&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Bootstrap Options and Knife Settings ==&lt;br /&gt;
As one of the most powerful tools knife has to offer, the bootstrap function has many different options available to it. The &amp;quot;Installing Bootstrap&amp;quot; section covered three such options (-x, -P, and --node-name), but there are many more available that are useful. Here are a few that stand out as being useful to someone using knife bootstrap for the first time, or for people who are dealing with something outside of the normal conditions for installing and using knife bootstrap. In addition, adding different settings to the knife.rb file will be covered, for people looking to expand the usage of knife and knife bootstrap. Most of this information is covered in higher detail in the main knife bootstrap page, as well as all the other options. You can check that page out using the reference here.&amp;lt;ref&amp;gt;[http://docs.chef.io/knife_bootstrap.html Knife Boostrap]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''--bootstrap-curl-options OPTIONS, --bootstrap-install-command COMMAND, --bootstrap-install-sh URL'''&lt;br /&gt;
&lt;br /&gt;
These commands allow customization of the installation bootstrap performs. They are all mutually exclusive, but allow different ways to perform this customization. The first, bootstap-curl-options, which allows additional cURL options to be performed alongside the bootstrap installation. To learn more about cURL, check out their main web page here: ([http://curl.haxx.se/ cURL Home Page]). The second, bootstrap-install-command, allows the execution of another install command on the target node alongside the bootstrap function. The final one, bootstrap-install-sh, allows a custom install script located at the designated URL to be run, following the bootstrap command. &lt;br /&gt;
&lt;br /&gt;
'''--environment ENVIRONMENT, --boostrap-template TEMPLATE'''&lt;br /&gt;
&lt;br /&gt;
The --environment and --bootstrap-template commands are similar, in that they allow customization of the target node. One allows the node to be set up against a target environment, which is useful if your chef server has multiple environments available. The next allows different node setups to be saved as templates. These can be used to quickly and efficiently set up additional similar nodes, especially if the additional installation options in bootstrap are long. &lt;br /&gt;
&lt;br /&gt;
'''-V'''&lt;br /&gt;
&lt;br /&gt;
A small option for bootstrap, the -V option forces the initial chief-client setup to be run on the target node at the debug log level, following the bootstrap installation. This allows almost complete remote setup of new nodes, assuring that the node is ready to be used and the chef-client is fully operational and doesn't need further setup. In addition, the debug log will allow any errors in the chef client to be saved, in the case of something wrong occurring with the node.  The exact command run is shown below:&lt;br /&gt;
&amp;lt;pre&amp;gt;chef-client -l debug&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Custom settings and adding them to the knife.rb file'''&lt;br /&gt;
&lt;br /&gt;
For some settings, including settings related to bootstrap, the options will need to be added to the knife.rb file. This file contains all of the commands for knife, and all of the different options available to these commands. For example, to use the --bootstrap-template and the --sudo options, the following commands need to be executed:&lt;br /&gt;
&amp;lt;pre&amp;gt;knife[:template_file]&lt;br /&gt;
knife[:use_sudo]&amp;lt;/pre&amp;gt;&lt;br /&gt;
These commands add the template_file and use_sudo options to the knife.rb file, which will enable those options to be used in the bootstrap command. There are more options that can be added using the knife.rb file, the full knife documentation for commands are here: ([https://docs.chef.io/chef/knife.html# Knife Reference]).&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Wpgallih</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/ch1a_2_WA&amp;diff=93570</id>
		<title>CSC/ECE 517 Spring 2015/ch1a 2 WA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/ch1a_2_WA&amp;diff=93570"/>
		<updated>2015-02-09T21:03:58Z</updated>

		<summary type="html">&lt;p&gt;Wpgallih: /* Bootstrap Options and Knife Settings */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Knife&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
[[File:workstation.png|frame|Source: https://docs.chef.io/chef_quick_overview.html|right]]&lt;br /&gt;
Knife is the command line tool for managing Chef nodes. Simply, Chef allows the distribution of server environments between many different servers (called '''nodes'''). Any changes to the primary chef server (called the '''chef repo''' are distributed throughout all the other nodes, while different nodes can have other recipes and send them back to the chef repo. Knife, then, handles the communication between nodes and the chef repo. For example, let's say that there is an object on the chef repo that a node desires. Knife provides the tools to download that object to the node. Knife also allows setting up a node, installing necessary packages, management of users, and much more.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
&lt;br /&gt;
Chef streamlines the task of configuring and maintaining a company's servers, and can integrate with cloud-based platforms.&lt;br /&gt;
If you are unfamiliar with Chef and how it works, check out the comparison between Chef and Puppet here: [http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2013/ch1_1w10_ga] or take a look at the official Chef website here: &amp;lt;ref&amp;gt;[https://www.chef.io/ Chef]&amp;lt;/ref&amp;gt;. There, a deeper understanding of Chef can be attained.&lt;br /&gt;
&lt;br /&gt;
Chef includes two important command-line tools.&lt;br /&gt;
*Knife command-line tool&lt;br /&gt;
*Chef command-line tool&lt;br /&gt;
&lt;br /&gt;
knife is the command-line tool that provides an interface between a local chef-repo and the Chef server. Whereas, Chef command-line tool is used while working with the chef repo. Knife helps us to manage the following.&lt;br /&gt;
&lt;br /&gt;
* Nodes&lt;br /&gt;
* JSON data Stores &lt;br /&gt;
* Environments&lt;br /&gt;
* chef-clients installations on management workstations&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot; style=&amp;quot;width: auto; margin-left: auto; margin-right: auto;&amp;quot;&amp;gt; [[File:chef_knife server.png]] &amp;lt;ref&amp;gt;[http://dev.classmethod.jp/server-side/chef-server-install/ Chef Server]&amp;lt;/ref&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the figure, we can see that how knife provides an interface  between local repository's and Chef server at the workstation.&lt;br /&gt;
&lt;br /&gt;
== Using Knife ==&lt;br /&gt;
&lt;br /&gt;
Using Knife is fairly straightforward, with usage following this syntax:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; knife [verb] [object] [options] &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The different verbs, or subcommands, for Knife are as follows, from the Using Knife page&amp;lt;ref&amp;gt; [https://docs.chef.io/knife_using.html Knife Documents]&amp;lt;/ref&amp;gt;: bootstrap, client, configure, cookbook, cookbook site, data bag, delete, deps, diff, download, edit, environment, exec, index rebuild, list, node, recipe list, role, search, show, ssh, status, tag, upload, user, and xargs.&lt;br /&gt;
&lt;br /&gt;
'''Warning:''' Before you run many of these commands, you should have the knife editor set correctly. In the chef-repo, there are multiple ruby files that set the configuration of the environment. Inside of knife.rb, you need to add or set the following line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ruby&amp;quot;&amp;gt;&lt;br /&gt;
knife[:editor] = &amp;quot;/usr/bin/vim&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The path can be set to the text editor of choice, the above command sets the editor to vim. &lt;br /&gt;
&lt;br /&gt;
The example we will use is also one that is useful for setting up nodes, and that is the usage of the bootstrap command. To set up a node, go to the command line on the chef repo and execute the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;knife bootstrap ip_address_of_node -x username -P password --sudo &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First, the verb used is '''bootstrap'''. Bootstrap is the subcommand that allows the installation of a chef client on to a targeted node. &lt;br /&gt;
Second, the object is the ip_address_of_node. Every subcommand takes an object, and since chef operates on many ruby principles and scripts, the object can be most anything. For boostrap, this object is the ip of the server address. For other commands, this might be something different. &lt;br /&gt;
Third, we have the options for the bootstrap command and the object. For bootstrap, this includes the username and password for the node, and the option --sudo, to make sure all commands are executed correctly. &lt;br /&gt;
&lt;br /&gt;
Before we do the next example, let's cover an important part of object strings and how they are treated by knife and the chef repo. &lt;br /&gt;
&lt;br /&gt;
'''Wildcards'''&lt;br /&gt;
A wildcard search can be used similar to standard regex commands, with one notable difference. The wildcard character itself '''must be escaped using the \ character.''' Here is an example from the &amp;quot;Using Knife&amp;quot; page on the chef website. Let's say the following was used to search for an object:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;data_bags/a\*&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will return all of the objects that start with data_bags\a on the chef-node. However, if we were to run the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;data_bags/a*&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will only search for objects on the chef repo corresponding to objects starting with data_bags/a on the node. Therefore, the * was applied '''before''' being sent to the chef repo, instead of after. So, as an example, let us list all of the data bags that are on the server that start with 'a'. Our object, then, is the string above, &amp;lt;code&amp;gt;data_bags/a\*&amp;lt;/code&amp;gt;. The verb that lists different objects on the chef repo is called &amp;lt;code&amp;gt;list&amp;lt;/code&amp;gt;. Our command we would run would be this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;knife list data_bags/a\*&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Which would print to the console all of the objects in the data_bags directory that started with a.&lt;br /&gt;
&lt;br /&gt;
== Bootstrapping A Node ==&lt;br /&gt;
&lt;br /&gt;
One of the key uses of knife is doing something called &amp;quot;bootstrapping&amp;quot; a node &amp;lt;ref&amp;gt;[http://docs.chef.io/open_source/install_bootstrap.html Install Bootstrap]&amp;lt;/ref&amp;gt;. This key tool allows someone using the Chef server to set up a remote node, or client. Not only does knife set up all of the relevant recipes, environments, and other such things related with the chef repo itself, it also installs all of the tools necessary for interacting with the chef server and configuring the chef client. Because of this, a basic understanding in how to bootstrap a node, and some knowledge on the available options for bootstrapping a node, is important. &lt;br /&gt;
&lt;br /&gt;
Luckily, bootstrapping a node is very simple. To bootstrap a node, the general command would look like this. Be aware, this is being run from the chef server. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;knife bootstrap ip_address_of_node -x username -P password --sudo --node-name name_of_node&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This process will create a chef client at the designated IP adress. The username and the password is the username and password of a root access user on the remote node.  The name of the node can be set here as well,  instead of automatically using other settings. The option is shown here, to make the rest of the example easier to understand. Luckily, the knife bootstrap command uses an omnibus installer that automatically detects the OS of the target machine and will install all of the necessary command line tools and internal installations, like ruby, for the chef client to function. Once the bootstrap command is complete, the following message will be displayed.&lt;br /&gt;
&amp;lt;pre&amp;gt;INFO: Report handlers complete&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, before continuing, confirmation of the remote node is necessary. To confirm that the remote node was installed correctly and is running, run the following command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;knife client show name_of_node&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here, the name_of_node is the name of the node either set in other options and commands, such as the --node-name used above. When this is run, the node's information should be displayed, such as if the node is an admin, the name of the node, and the JSON type it was created from. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;admin:       false&lt;br /&gt;
chef_type:   client&lt;br /&gt;
json_class:  Chef::ApiClient&lt;br /&gt;
name:        name_of_node&lt;br /&gt;
public_key:&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Bootstrap Options and Knife Settings ==&lt;br /&gt;
As one of the most powerful tools knife has to offer, the bootstrap function has many different options available to it. The &amp;quot;Installing Bootstrap&amp;quot; section covered three such options (-x, -P, and --node-name), but there are many more available that are useful. Here are a few that stand out as being useful to someone using knife bootstrap for the first time, or for people who are dealing with something outside of the normal conditions for installing and using knife bootstrap. In addition, adding different settings to the knife.rb file will be covered, for people looking to expand the usage of knife and knife bootstrap. Most of this information is covered in higher detail in the main knife bootstrap page, as well as all the other options. You can check that page out using the reference here.&amp;lt;ref&amp;gt;[http://docs.chef.io/knife_bootstrap.html Knife Boostrap]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''--bootstrap-curl-options OPTIONS, --bootstrap-install-command COMMAND, --bootstrap-install-sh URL'''&lt;br /&gt;
&lt;br /&gt;
These commands allow customization of the installation bootstrap performs. They are all mutually exclusive, but allow different ways to perform this customization. The first, bootstap-curl-options, which allows additional cURL options to be performed alongside the bootstrap installation. To learn more about cURL, check out their main web page here: ([http://curl.haxx.se/ cURL Home Page]). The second, bootstrap-install-command, allows the execution of another install command on the target node alongside the bootstrap function. The final one, bootstrap-install-sh, allows a custom install script located at the designated URL to be run, following the bootstrap command. &lt;br /&gt;
&lt;br /&gt;
'''--environment ENVIRONMENT, --boostrap-template TEMPLATE'''&lt;br /&gt;
&lt;br /&gt;
The --environment and --bootstrap-template commands are similar, in that they allow customization of the target node. One allows the node to be set up against a target environment, which is useful if your chef server has multiple environments available. The next allows different node setups to be saved as templates. These can be used to quickly and efficiently set up additional similar nodes, especially if the additional installation options in bootstrap are long. &lt;br /&gt;
&lt;br /&gt;
'''-V'''&lt;br /&gt;
&lt;br /&gt;
A small option for bootstrap, the -V option forces the initial chief-client setup to be run on the target node at the debug log level, following the bootstrap installation. This allows almost complete remote setup of new nodes, assuring that the node is ready to be used and the chef-client is fully operational and doesn't need further setup. In addition, the debug log will allow any errors in the chef client to be saved, in the case of something wrong occurring with the node.  The exact command run is shown below:&lt;br /&gt;
&amp;lt;pre&amp;gt;chef-client -l debug&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Custom settings and adding them to the knife.rb file'''&lt;br /&gt;
&lt;br /&gt;
For some settings, including settings related to bootstrap, the options will need to be added to the knife.rb file. This file contains all of the commands for knife, and all of the different options available to these commands. For example, to use the --bootstrap-template and the --sudo options, the following commands need to be executed:&lt;br /&gt;
&amp;lt;pre&amp;gt;knife[:template_file]&lt;br /&gt;
knife[:use_sudo]&amp;lt;/pre&amp;gt;&lt;br /&gt;
These commands add the template_file and use_sudo options to the knife.rb file, which will enable those options to be used in the bootstrap command. There are more options that can be added using the knife.rb file, the full knife documentation for commands are here: ([https://docs.chef.io/chef/knife.html# Knife Reference]).&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Wpgallih</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/ch1a_2_WA&amp;diff=93565</id>
		<title>CSC/ECE 517 Spring 2015/ch1a 2 WA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/ch1a_2_WA&amp;diff=93565"/>
		<updated>2015-02-09T20:49:32Z</updated>

		<summary type="html">&lt;p&gt;Wpgallih: /* Bootstrap Options and Knife Settings */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Knife&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Knife is the command line tool for managing Chef nodes. Simply, Chef allows the distribution of server environments between many different servers (called '''nodes'''). Any changes to the primary chef server (called the '''chef repo''' are distributed throughout all the other nodes, while different nodes can have other recipes and send them back to the chef repo. Knife, then, handles the communication between nodes and the chef repo. For example, let's say that there is an object on the chef repo that a node desires. Knife provides the tools to download that object to the node. Knife also allows setting up a node, installing necessary packages, management of users, and much more.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
&lt;br /&gt;
Chef streamlines the task of configuring and maintaining a company's servers, and can integrate with cloud-based platforms.&lt;br /&gt;
If you are unfamiliar with Chef and how it works, check out the comparison between Chef and Puppet here: [http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2013/ch1_1w10_ga] or take a look at the official Chef website here: &amp;lt;ref&amp;gt;[https://www.chef.io/ Chef]&amp;lt;/ref&amp;gt;. There, a deeper understanding of Chef can be attained.&lt;br /&gt;
&lt;br /&gt;
Chef includes two important command-line tools.&lt;br /&gt;
*Knife command-line tool&lt;br /&gt;
*Chef command-line tool&lt;br /&gt;
&lt;br /&gt;
knife is the command-line tool that provides an interface between a local chef-repo and the Chef server. Whereas, Chef command-line tool is used while working with the chef repo. Knife helps us to manage the following.&lt;br /&gt;
&lt;br /&gt;
* Nodes&lt;br /&gt;
* JSON data Stores &lt;br /&gt;
* Environments&lt;br /&gt;
* chef-clients installations on management workstations&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot; style=&amp;quot;width: auto; margin-left: auto; margin-right: auto;&amp;quot;&amp;gt; [[File:chef_knife server.png]] &amp;lt;ref&amp;gt;[http://dev.classmethod.jp/server-side/chef-server-install/ Chef Server]&amp;lt;/ref&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the figure, we can see that how knife provides an interface  between local repository's and Chef server at the workstation.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
Using Knife is fairly straightforward, with usage following this syntax:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; knife [verb] [object] [options] &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The different verbs, or subcommands, for Knife are as follows, from the Using Knife page&amp;lt;ref&amp;gt; [https://docs.chef.io/knife_using.html Knife Documents]&amp;lt;/ref&amp;gt;: bootstrap, client, configure, cookbook, cookbook site, data bag, delete, deps, diff, download, edit, environment, exec, index rebuild, list, node, recipe list, role, search, show, ssh, status, tag, upload, user, and xargs.&lt;br /&gt;
&lt;br /&gt;
'''Warning:''' Before you run many of these commands, you should have the knife editor set correctly. In the chef-repo, there are multiple ruby files that set the configuration of the environment. Inside of knife.rb, you need to add or set the following line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ruby&amp;quot;&amp;gt;&lt;br /&gt;
knife[:editor] = &amp;quot;/usr/bin/vim&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The path can be set to the text editor of choice, the above command sets the editor to vim. &lt;br /&gt;
&lt;br /&gt;
The example we will use is also one that is useful for setting up nodes, and that is the usage of the bootstrap command. To set up a node, go to the command line on the chef repo and execute the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;knife bootstrap ip_address_of_node -x username -P password --sudo &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First, the verb used is '''bootstrap'''. Bootstrap is the subcommand that allows the installation of a chef client on to a targeted node. &lt;br /&gt;
Second, the object is the ip_address_of_node. Every subcommand takes an object, and since chef operates on many ruby principles and scripts, the object can be most anything. For boostrap, this object is the ip of the server address. For other commands, this might be something different. &lt;br /&gt;
Third, we have the options for the bootstrap command and the object. For bootstrap, this includes the username and password for the node, and the option --sudo, to make sure all commands are executed correctly. &lt;br /&gt;
&lt;br /&gt;
Before we do the next example, let's cover an important part of object strings and how they are treated by knife and the chef repo. &lt;br /&gt;
&lt;br /&gt;
'''Wildcards'''&lt;br /&gt;
A wildcard search can be used similar to standard regex commands, with one notable difference. The wildcard character itself '''must be escaped using the \ character.''' Here is an example from the &amp;quot;Using Knife&amp;quot; page on the chef website. Let's say the following was used to search for an object:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;data_bags/a\*&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will return all of the objects that start with data_bags\a on the chef-node. However, if we were to run the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;data_bags/a*&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will only search for objects on the chef repo corresponding to objects starting with data_bags/a on the node. Therefore, the * was applied '''before''' being sent to the chef repo, instead of after. So, as an example, let us list all of the data bags that are on the server that start with 'a'. Our object, then, is the string above, &amp;lt;code&amp;gt;data_bags/a\*&amp;lt;/code&amp;gt;. The verb that lists different objects on the chef repo is called &amp;lt;code&amp;gt;list&amp;lt;/code&amp;gt;. Our command we would run would be this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;knife list data_bags/a\*&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Which would print to the console all of the objects in the data_bags directory that started with a.&lt;br /&gt;
&lt;br /&gt;
== Bootstrapping A Node ==&lt;br /&gt;
&lt;br /&gt;
One of the key uses of knife is doing something called &amp;quot;bootstrapping&amp;quot; a node &amp;lt;ref&amp;gt;[http://docs.chef.io/open_source/install_bootstrap.html Install Bootstrap]&amp;lt;/ref&amp;gt;. This key tool allows someone using the Chef server to set up a remote node, or client. Not only does knife set up all of the relevant recipes, environments, and other such things related with the chef repo itself, it also installs all of the tools necessary for interacting with the chef server and configuring the chef client. Because of this, a basic understanding in how to bootstrap a node, and some knowledge on the available options for bootstrapping a node, is important. &lt;br /&gt;
&lt;br /&gt;
Luckily, bootstrapping a node is very simple. To bootstrap a node, the general command would look like this. Be aware, this is being run from the chef server. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;knife bootstrap ip_address_of_node -x username -P password --sudo --node-name name_of_node&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This process will create a chef client at the designated IP adress. The username and the password is the username and password of a root access user on the remote node.  The name of the node can be set here as well,  instead of automatically using other settings. The option is shown here, to make the rest of the example easier to understand. Luckily, the knife bootstrap command uses an omnibus installer that automatically detects the OS of the target machine and will install all of the necessary command line tools and internal installations, like ruby, for the chef client to function. Once the bootstrap command is complete, the following message will be displayed.&lt;br /&gt;
&amp;lt;pre&amp;gt;INFO: Report handlers complete&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, before continuing, confirmation of the remote node is necessary. To confirm that the remote node was installed correctly and is running, run the following command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;knife client show name_of_node&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here, the name_of_node is the name of the node either set in other options and commands, such as the --node-name used above. When this is run, the node's information should be displayed, such as if the node is an admin, the name of the node, and the JSON type it was created from. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;admin:       false&lt;br /&gt;
chef_type:   client&lt;br /&gt;
json_class:  Chef::ApiClient&lt;br /&gt;
name:        name_of_node&lt;br /&gt;
public_key:&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Bootstrap Options and Knife Settings ==&lt;br /&gt;
As one of the most powerful tools knife has to offer, the bootstrap function has many different options available to it. The &amp;quot;Installing Bootstrap&amp;quot; section covered three such options (-x, -P, and --node-name), but there are many more available that are useful. Here are a few that stand out as being useful to someone using knife bootstrap for the first time, or for people who are dealing with something outside of the normal conditions for installing and using knife bootstrap. In addition, adding different settings to the knife.rb file will be covered, for people looking to expand the usage of knife and knife bootstrap. Most of this information is covered in higher detail in the main knife bootstrap page, as well as all the other options. You can check that page out using the reference here.&amp;lt;ref&amp;gt;[http://docs.chef.io/knife_bootstrap.html Knife Boostrap]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''--bootstrap-curl-options OPTIONS, --bootstrap-install-command COMMAND, --bootstrap-install-sh URL'''&lt;br /&gt;
&lt;br /&gt;
These commands allow customization of the installation bootstrap performs. They are all mutually exclusive, but allow different ways to perform this customization. The first, bootstap-curl-options, which allows additional cURL options to be performed alongside the bootstrap installation. To learn more about cURL, check out their main web page [http://curl.haxx.se/ here (cURL Home Page)].&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Wpgallih</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/ch1a_2_WA&amp;diff=93558</id>
		<title>CSC/ECE 517 Spring 2015/ch1a 2 WA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/ch1a_2_WA&amp;diff=93558"/>
		<updated>2015-02-09T20:30:41Z</updated>

		<summary type="html">&lt;p&gt;Wpgallih: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Knife&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Knife is the command line tool for managing Chef nodes. Simply, Chef allows the distribution of server environments between many different servers (called '''nodes'''). Any changes to the primary chef server (called the '''chef repo''' are distributed throughout all the other nodes, while different nodes can have other recipes and send them back to the chef repo. Knife, then, handles the communication between nodes and the chef repo. For example, let's say that there is an object on the chef repo that a node desires. Knife provides the tools to download that object to the node. Knife also allows setting up a node, installing necessary packages, management of users, and much more.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
&lt;br /&gt;
Chef streamlines the task of configuring and maintaining a company's servers, and can integrate with cloud-based platforms.&lt;br /&gt;
If you are unfamiliar with Chef and how it works, check out the comparison between Chef and Puppet here: [http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2013/ch1_1w10_ga] or take a look at the official Chef website here: &amp;lt;ref&amp;gt;[https://www.chef.io/ Chef]&amp;lt;/ref&amp;gt;. There, a deeper understanding of Chef can be attained.&lt;br /&gt;
&lt;br /&gt;
Chef includes two important command-line tools.&lt;br /&gt;
*Knife command-line tool&lt;br /&gt;
*Chef command-line tool&lt;br /&gt;
&lt;br /&gt;
knife is the command-line tool that provides an interface between a local chef-repo and the Chef server. Whereas, Chef command-line tool is used while working with the chef repo.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot; style=&amp;quot;width: auto; margin-left: auto; margin-right: auto;&amp;quot;&amp;gt; [[File:chef_knife server.png]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
Using Knife is fairly straightforward, with usage following this syntax:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; knife [verb] [object] [options] &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The different verbs, or subcommands, for Knife are as follows, from the Using Knife page&amp;lt;ref&amp;gt; [https://docs.chef.io/knife_using.html Knife Documents]&amp;lt;/ref&amp;gt;: bootstrap, client, configure, cookbook, cookbook site, data bag, delete, deps, diff, download, edit, environment, exec, index rebuild, list, node, recipe list, role, search, show, ssh, status, tag, upload, user, and xargs.&lt;br /&gt;
&lt;br /&gt;
'''Warning:''' Before you run many of these commands, you should have the knife editor set correctly. In the chef-repo, there are multiple ruby files that set the configuration of the environment. Inside of knife.rb, you need to add or set the following line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ruby&amp;quot;&amp;gt;&lt;br /&gt;
knife[:editor] = &amp;quot;/usr/bin/vim&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The path can be set to the text editor of choice, the above command sets the editor to vim. &lt;br /&gt;
&lt;br /&gt;
The example we will use is also one that is useful for setting up nodes, and that is the usage of the bootstrap command. To set up a node, go to the command line on the chef repo and execute the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;knife bootstrap ip_address_of_node -x username -P password --sudo &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First, the verb used is '''bootstrap'''. Bootstrap is the subcommand that allows the installation of a chef client on to a targeted node. &lt;br /&gt;
Second, the object is the ip_address_of_node. Every subcommand takes an object, and since chef operates on many ruby principles and scripts, the object can be most anything. For boostrap, this object is the ip of the server address. For other commands, this might be something different. &lt;br /&gt;
Third, we have the options for the bootstrap command and the object. For bootstrap, this includes the username and password for the node, and the option --sudo, to make sure all commands are executed correctly. &lt;br /&gt;
&lt;br /&gt;
Before we do the next example, let's cover an important part of object strings and how they are treated by knife and the chef repo. &lt;br /&gt;
&lt;br /&gt;
'''Wildcards'''&lt;br /&gt;
A wildcard search can be used similar to standard regex commands, with one notable difference. The wildcard character itself '''must be escaped using the \ character.''' Here is an example from the &amp;quot;Using Knife&amp;quot; page on the chef website. Let's say the following was used to search for an object:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;data_bags/a\*&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will return all of the objects that start with data_bags\a on the chef-node. However, if we were to run the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;data_bags/a*&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will only search for objects on the chef repo corresponding to objects starting with data_bags/a on the node. Therefore, the * was applied '''before''' being sent to the chef repo, instead of after. So, as an example, let us list all of the data bags that are on the server that start with 'a'. Our object, then, is the string above, &amp;lt;code&amp;gt;data_bags/a\*&amp;lt;/code&amp;gt;. The verb that lists different objects on the chef repo is called &amp;lt;code&amp;gt;list&amp;lt;/code&amp;gt;. Our command we would run would be this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;knife list data_bags/a\*&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Which would print to the console all of the objects in the data_bags directory that started with a.&lt;br /&gt;
&lt;br /&gt;
== Bootstrapping A Node ==&lt;br /&gt;
&lt;br /&gt;
One of the key uses of knife is doing something called &amp;quot;bootstrapping&amp;quot; a node &amp;lt;ref&amp;gt;[http://docs.chef.io/open_source/install_bootstrap.html Install Bootstrap]&amp;lt;/ref&amp;gt;. This key tool allows someone using the Chef server to set up a remote node, or client. Not only does knife set up all of the relevant recipes, environments, and other such things related with the chef repo itself, it also installs all of the tools necessary for interacting with the chef server and configuring the chef client. Because of this, a basic understanding in how to bootstrap a node, and some knowledge on the available options for bootstrapping a node, is important. &lt;br /&gt;
&lt;br /&gt;
Luckily, bootstrapping a node is very simple. To bootstrap a node, the general command would look like this. Be aware, this is being run from the chef server. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;knife bootstrap ip_address_of_node -x username -P password --sudo --node-name name_of_node&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This process will create a chef client at the designated IP adress. The username and the password is the username and password of a root access user on the remote node.  The name of the node can be set here as well,  instead of automatically using other settings. The option is shown here, to make the rest of the example easier to understand. Luckily, the knife bootstrap command uses an omnibus installer that automatically detects the OS of the target machine and will install all of the necessary command line tools and internal installations, like ruby, for the chef client to function. Once the bootstrap command is complete, the following message will be displayed.&lt;br /&gt;
&amp;lt;pre&amp;gt;INFO: Report handlers complete&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, before continuing, confirmation of the remote node is necessary. To confirm that the remote node was installed correctly and is running, run the following command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;knife client show name_of_node&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here, the name_of_node is the name of the node either set in other options and commands, such as the --node-name used above. When this is run, the node's information should be displayed, such as if the node is an admin, the name of the node, and the JSON type it was created from. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;admin:       false&lt;br /&gt;
chef_type:   client&lt;br /&gt;
json_class:  Chef::ApiClient&lt;br /&gt;
name:        name_of_node&lt;br /&gt;
public_key:&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Bootstrap Options and Knife Settings ==&lt;br /&gt;
As one of the most powerful tools knife has to offer, the bootstrap function has many different options available to it. The &amp;quot;Installing Bootstrap&amp;quot; section covered three such options (-x, -P, and --node-name), but there are many more available that are useful. Here are a few that stand out as being useful to someone using knife bootstrap for the first time, or for people who are dealing with something outside of the normal conditions for installing and using knife bootstrap. In addition, adding different settings to the knife.rb file will be covered, for people looking to expand the usage of knife and knife bootstrap. Most of this information is covered in higher detail in the main knife bootstrap page, as well as all the other options. You can check that page out using the reference here.&amp;lt;ref&amp;gt;[http://docs.chef.io/knife_bootstrap.html Knife Boostrap]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Wpgallih</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/ch1a_2_WA&amp;diff=93556</id>
		<title>CSC/ECE 517 Spring 2015/ch1a 2 WA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/ch1a_2_WA&amp;diff=93556"/>
		<updated>2015-02-09T20:18:34Z</updated>

		<summary type="html">&lt;p&gt;Wpgallih: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Knife&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Knife is the command line tool for managing Chef nodes. Simply, Chef allows the distribution of server environments between many different servers (called '''nodes'''). Any changes to the primary chef server (called the '''chef repo''' are distributed throughout all the other nodes, while different nodes can have other recipes and send them back to the chef repo. Knife, then, handles the communication between nodes and the chef repo. For example, let's say that there is an object on the chef repo that a node desires. Knife provides the tools to download that object to the node. Knife also allows setting up a node, installing necessary packages, management of users, and much more.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Knife ==&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
&lt;br /&gt;
Chef streamlines the task of configuring and maintaining a company's servers, and can integrate with cloud-based platforms.&lt;br /&gt;
If you are unfamiliar with Chef and how it works, check out the comparison between Chef and Puppet here: [http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2013/ch1_1w10_ga] or take a look at the official Chef website here: &amp;lt;ref&amp;gt;[https://www.chef.io/ Chef]&amp;lt;/ref&amp;gt;. There, a deeper understanding of Chef can be attained.&lt;br /&gt;
&lt;br /&gt;
Chef includes two important command-line tools.&lt;br /&gt;
*Knife command-line tool&lt;br /&gt;
*Chef command-line tool&lt;br /&gt;
&lt;br /&gt;
knife is the command-line tool that provides an interface between a local chef-repo and the Chef server. Whereas, Chef command-line tool is used while working with the chef repo.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot; style=&amp;quot;width: auto; margin-left: auto; margin-right: auto;&amp;quot;&amp;gt; [[File:chef_knife server.png]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
Using Knife is fairly straightforward, with usage following this syntax:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; knife [verb] [object] [options] &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The different verbs, or subcommands, for Knife are as follows, from the Using Knife page&amp;lt;ref&amp;gt; [https://docs.chef.io/knife_using.html Knife Documents]&amp;lt;/ref&amp;gt;: bootstrap, client, configure, cookbook, cookbook site, data bag, delete, deps, diff, download, edit, environment, exec, index rebuild, list, node, recipe list, role, search, show, ssh, status, tag, upload, user, and xargs.&lt;br /&gt;
&lt;br /&gt;
'''Warning:''' Before you run many of these commands, you should have the knife editor set correctly. In the chef-repo, there are multiple ruby files that set the configuration of the environment. Inside of knife.rb, you need to add or set the following line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ruby&amp;quot;&amp;gt;&lt;br /&gt;
knife[:editor] = &amp;quot;/usr/bin/vim&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The path can be set to the text editor of choice, the above command sets the editor to vim. &lt;br /&gt;
&lt;br /&gt;
The example we will use is also one that is useful for setting up nodes, and that is the usage of the bootstrap command. To set up a node, go to the command line on the chef repo and execute the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;knife bootstrap ip_address_of_node -x username -P password --sudo &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First, the verb used is '''bootstrap'''. Bootstrap is the subcommand that allows the installation of a chef client on to a targeted node. &lt;br /&gt;
Second, the object is the ip_address_of_node. Every subcommand takes an object, and since chef operates on many ruby principles and scripts, the object can be most anything. For boostrap, this object is the ip of the server address. For other commands, this might be something different. &lt;br /&gt;
Third, we have the options for the bootstrap command and the object. For bootstrap, this includes the username and password for the node, and the option --sudo, to make sure all commands are executed correctly. &lt;br /&gt;
&lt;br /&gt;
Before we do the next example, let's cover an important part of object strings and how they are treated by knife and the chef repo. &lt;br /&gt;
&lt;br /&gt;
'''Wildcards'''&lt;br /&gt;
A wildcard search can be used similar to standard regex commands, with one notable difference. The wildcard character itself '''must be escaped using the \ character.''' Here is an example from the &amp;quot;Using Knife&amp;quot; page on the chef website. Let's say the following was used to search for an object:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;data_bags/a\*&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will return all of the objects that start with data_bags\a on the chef-node. However, if we were to run the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;data_bags/a*&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will only search for objects on the chef repo corresponding to objects starting with data_bags/a on the node. Therefore, the * was applied '''before''' being sent to the chef repo, instead of after. So, as an example, let us list all of the data bags that are on the server that start with 'a'. Our object, then, is the string above, &amp;lt;code&amp;gt;data_bags/a\*&amp;lt;/code&amp;gt;. The verb that lists different objects on the chef repo is called &amp;lt;code&amp;gt;list&amp;lt;/code&amp;gt;. Our command we would run would be this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;knife list data_bags/a\*&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Which would print to the console all of the objects in the data_bags directory that started with a.&lt;br /&gt;
&lt;br /&gt;
== Bootstrapping A Node ==&lt;br /&gt;
&lt;br /&gt;
One of the key uses of knife is doing something called &amp;quot;bootstrapping&amp;quot; a node &amp;lt;ref&amp;gt;[http://docs.chef.io/open_source/install_bootstrap.html Install Bootstrap]&amp;lt;/ref&amp;gt;. This key tool allows someone using the Chef server to set up a remote node, or client. Not only does knife set up all of the relevant recipes, environments, and other such things related with the chef repo itself, it also installs all of the tools necessary for interacting with the chef server and configuring the chef client. Because of this, a basic understanding in how to bootstrap a node, and some knowledge on the available options for bootstrapping a node, is important. &lt;br /&gt;
&lt;br /&gt;
Luckily, bootstrapping a node is very simple. To bootstrap a node, the general command would look like this. Be aware, this is being run from the chef server. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;knife bootstrap ip_address_of_node -x username -P password --sudo --node-name name_of_node&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This process will create a chef client at the designated IP adress. The username and the password is the username and password of a root access user on the remote node.  The name of the node can be set here as well,  instead of automatically using other settings. The option is shown here, to make the rest of the example easier to understand. Luckily, the knife bootstrap command uses an omnibus installer that automatically detects the OS of the target machine and will install all of the necessary command line tools and internal installations, like ruby, for the chef client to function. Once the bootstrap command is complete, the following message will be displayed.&lt;br /&gt;
&amp;lt;pre&amp;gt;INFO: Report handlers complete&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, before continuing, confirmation of the remote node is necessary. To confirm that the remote node was installed correctly and is running, run the following command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;knife client show name_of_node&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here, the name_of_node is the name of the node either set in other options and commands, such as the --node-name used above. When this is run, the node's information should be displayed, such as if the node is an admin, the name of the node, and the JSON type it was created from. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;admin:       false&lt;br /&gt;
chef_type:   client&lt;br /&gt;
json_class:  Chef::ApiClient&lt;br /&gt;
name:        name_of_node&lt;br /&gt;
public_key:&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Wpgallih</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/ch1a_2_WA&amp;diff=93555</id>
		<title>CSC/ECE 517 Spring 2015/ch1a 2 WA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/ch1a_2_WA&amp;diff=93555"/>
		<updated>2015-02-09T20:14:13Z</updated>

		<summary type="html">&lt;p&gt;Wpgallih: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Knife&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Knife is the command line tool for managing Chef nodes. Simply, Chef allows the distribution of server environments between many different servers (called '''nodes'''). Any changes to the primary chef server (called the '''chef repo''' are distributed throughout all the other nodes, while different nodes can have other recipes and send them back to the chef repo. Knife, then, handles the communication between nodes and the chef repo. For example, let's say that there is an object on the chef repo that a node desires. Knife provides the tools to download that object to the node. Knife also allows setting up a node, installing necessary packages, management of users, and much more.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Knife ==&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
&lt;br /&gt;
Chef streamlines the task of configuring and maintaining a company's servers, and can integrate with cloud-based platforms.&lt;br /&gt;
If you are unfamiliar with Chef and how it works, check out the comparison between Chef and Puppet here: [http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2013/ch1_1w10_ga] or take a look at the official Chef website here: &amp;lt;ref&amp;gt;[https://www.chef.io/ Chef]&amp;lt;/ref&amp;gt;. There, a deeper understanding of Chef can be attained.&lt;br /&gt;
&lt;br /&gt;
Chef includes two important command-line tools.&lt;br /&gt;
*Knife command-line tool&lt;br /&gt;
*Chef command-line tool&lt;br /&gt;
&lt;br /&gt;
knife is the command-line tool that provides an interface between a local chef-repo and the Chef server. Whereas, Chef command-line tool is used while working with the chef repo.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot; style=&amp;quot;width: auto; margin-left: auto; margin-right: auto;&amp;quot;&amp;gt; [[File:chef_knife server.png]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
Using Knife is fairly straightforward, with usage following this syntax:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; knife [verb] [object] [options] &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The different verbs, or subcommands, for Knife are as follows, from the Using Knife page&amp;lt;ref&amp;gt; [https://docs.chef.io/knife_using.html Knife Documents]&amp;lt;/ref&amp;gt;: bootstrap, client, configure, cookbook, cookbook site, data bag, delete, deps, diff, download, edit, environment, exec, index rebuild, list, node, recipe list, role, search, show, ssh, status, tag, upload, user, and xargs.&lt;br /&gt;
&lt;br /&gt;
'''Warning:''' Before you run many of these commands, you should have the knife editor set correctly. In the chef-repo, there are multiple ruby files that set the configuration of the environment. Inside of knife.rb, you need to add or set the following line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ruby&amp;quot;&amp;gt;&lt;br /&gt;
knife[:editor] = &amp;quot;/usr/bin/vim&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The path can be set to the text editor of choice, the above command sets the editor to vim. &lt;br /&gt;
&lt;br /&gt;
The example we will use is also one that is useful for setting up nodes, and that is the usage of the bootstrap command. To set up a node, go to the command line on the chef repo and execute the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;knife bootstrap ip_address_of_node -x username -P password --sudo &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First, the verb used is '''bootstrap'''. Bootstrap is the subcommand that allows the installation of a chef client on to a targeted node. &lt;br /&gt;
Second, the object is the ip_address_of_node. Every subcommand takes an object, and since chef operates on many ruby principles and scripts, the object can be most anything. For boostrap, this object is the ip of the server address. For other commands, this might be something different. &lt;br /&gt;
Third, we have the options for the bootstrap command and the object. For bootstrap, this includes the username and password for the node, and the option --sudo, to make sure all commands are executed correctly. &lt;br /&gt;
&lt;br /&gt;
Before we do the next example, let's cover an important part of object strings and how they are treated by knife and the chef repo. &lt;br /&gt;
&lt;br /&gt;
'''Wildcards'''&lt;br /&gt;
A wildcard search can be used similar to standard regex commands, with one notable difference. The wildcard character itself '''must be escaped using the \ character.''' Here is an example from the &amp;quot;Using Knife&amp;quot; page on the chef website. Let's say the following was used to search for an object:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;data_bags/a\*&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will return all of the objects that start with data_bags\a on the chef-node. However, if we were to run the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;data_bags/a*&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will only search for objects on the chef repo corresponding to objects starting with data_bags/a on the node. Therefore, the * was applied '''before''' being sent to the chef repo, instead of after. So, as an example, let us list all of the data bags that are on the server that start with 'a'. Our object, then, is the string above, &amp;lt;code&amp;gt;data_bags/a\*&amp;lt;/code&amp;gt;. The verb that lists different objects on the chef repo is called &amp;lt;code&amp;gt;list&amp;lt;/code&amp;gt;. Our command we would run would be this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;knife list data_bags/a\*&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Which would print to the console all of the objects in the data_bags directory that started with a.&lt;br /&gt;
&lt;br /&gt;
== Bootstrapping A Node ==&lt;br /&gt;
&lt;br /&gt;
One of the key uses of knife is doing something called &amp;quot;bootstrapping&amp;quot; a node. This key tool allows someone using the Chef server to set up a remote node, or client. Not only does knife set up all of the relevant recipes, environments, and other such things related with the chef repo itself, it also installs all of the tools necessary for interacting with the chef server and configuring the chef client. Because of this, a basic understanding in how to bootstrap a node, and some knowledge on the available options for bootstrapping a node, is important. &lt;br /&gt;
&lt;br /&gt;
Luckily, bootstrapping a node is very simple. To bootstrap a node, the general command would look like this. Be aware, this is being run from the chef server. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;knife bootstrap ip_address_of_node -x username -P password --sudo --node-name name_of_node&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This process will create a chef client at the designated IP adress. The username and the password is the username and password of a root access user on the remote node.  The name of the node can be set here as well,  instead of automatically using other settings. The option is shown here, to make the rest of the example easier to understand. Luckily, the knife bootstrap command uses an omnibus installer that automatically detects the OS of the target machine and will install all of the necessary command line tools and internal installations, like ruby, for the chef client to function. Once the bootstrap command is complete, the following message will be displayed.&lt;br /&gt;
&amp;lt;pre&amp;gt;INFO: Report handlers complete&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, before continuing, confirmation of the remote node is necessary. To confirm that the remote node was installed correctly and is running, run the following command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;knife client show name_of_node&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here, the name_of_node is the name of the node either set in other options and commands, such as the --node-name used above. When this is run, the node's information should be displayed, such as if the node is an admin, the name of the node, and the JSON type it was created from. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;admin:       false&lt;br /&gt;
chef_type:   client&lt;br /&gt;
json_class:  Chef::ApiClient&lt;br /&gt;
name:        name_of_node&lt;br /&gt;
public_key:&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Wpgallih</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015&amp;diff=93546</id>
		<title>CSC/ECE 517 Spring 2015</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015&amp;diff=93546"/>
		<updated>2015-02-09T19:24:24Z</updated>

		<summary type="html">&lt;p&gt;Wpgallih: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*[[CSC/ECE 517 Spring 2015/ch1a 17 WL]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2015/ch1a 5 ZX]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2015/ch1a 6 TZ]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2015/ch1a 4 RW]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2015/ch1a 7 SA]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2015/ch1a 9 RA]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2015/ch1a 14 RI]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2015/ch1a 1 DZ]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2015/ch1a 20 HA]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2015/ch1a 3 RF]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2015/ch1a 12 LS]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2015/ch1a 13 MA]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2015/ch1a 2 WA]]&lt;/div&gt;</summary>
		<author><name>Wpgallih</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/ch1a_2_WA&amp;diff=93049</id>
		<title>CSC/ECE 517 Spring 2015/ch1a 2 WA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/ch1a_2_WA&amp;diff=93049"/>
		<updated>2015-02-03T02:39:07Z</updated>

		<summary type="html">&lt;p&gt;Wpgallih: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Knife ==&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
&lt;br /&gt;
Knife is the command line tool for managing Chef nodes. If you are unfamiliar with Chef and how it works, check out the comparison between Chef and Puppet here: [http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2013/ch1_1w10_ga] or take a look at the official Chef website here: [https://www.chef.io/]. There, a deeper understanding of Chef can be attained. Simply, Chef allows the distribution of server environments between many different servers (called '''nodes'''). Any changes to the primary chef server (called the '''chef repo''' are distributed throughout all the other nodes, while different nodes can have other recipes and send them back to the chef repo. Knife, then, handles the communication between nodes and the chef repo. For example, let's say that there is an object on the chef repo that a node desires. Knife provides the tools to download that object to the node. Knife also allows setting up a node, installing necessary packages, management of users, and much more. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
Using Knife is fairly straightforward, with usage following this syntax:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; knife [verb] [object] [options] &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The different verbs, or subcommands, for Knife are as follows, from the Using Knife page [https://docs.chef.io/knife_using.html]: bootstrap, client, configure, cookbook, cookbook site, data bag, delete, deps, diff, download, edit, environment, exec, index rebuild, list, node, recipe list, role, search, show, ssh, status, tag, upload, user, and xargs.&lt;br /&gt;
&lt;br /&gt;
'''Warning:''' Before you run many of these commands, you should have the knife editor set correctly. In the chef-repo, there are multiple ruby files that set the configuration of the environment. Inside of knife.rb, you need to add or set the following line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ruby&amp;quot;&amp;gt;&lt;br /&gt;
knife[:editor] = &amp;quot;/usr/bin/vim&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The path can be set to the text editor of choice, the above command sets the editor to vim. &lt;br /&gt;
&lt;br /&gt;
The example we will use is also one that is useful for setting up nodes, and that is the usage of the bootstrap command. To set up a node, go to the command line on the chef repo and execute the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;knife bootstrap ip_address_of_node -x username -P password --sudo &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First, the verb used is '''bootstrap'''. Bootstrap is the subcommand that allows the installation of a chef client on to a targeted node. &lt;br /&gt;
Second, the object is the ip_address_of_node. Every subcommand takes an object, and since chef operates on many ruby principles and scripts, the object can be most anything. For boostrap, this object is the ip of the server address. For other commands, this might be something different. &lt;br /&gt;
Third, we have the options for the bootstrap command and the object. For bootstrap, this includes the username and password for the node, and the option --sudo, to make sure all commands are executed correctly. &lt;br /&gt;
&lt;br /&gt;
Before we do the next example, let's cover an important part of object strings and how they are treated by knife and the chef repo. &lt;br /&gt;
&lt;br /&gt;
'''Wildcards'''&lt;br /&gt;
A wildcard search can be used similar to standard regex commands, with one notable difference. The wildcard character itself '''must be escaped using the \ character.''' Here is an example from the &amp;quot;Using Knife&amp;quot; page on the chef website. Let's say the following was used to search for an object:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;data_bags/a\*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will return all of the objects that start with data_bags\a on the chef-node. However, if we were to run the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;data_bags/a*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will only search for objects on the chef repo corresponding to objects starting with data_bags/a on the node. Therefore, the * was applied '''before''' being sent to the chef repo, instead of after. So, as an example, let us list all of the data bags that are on the server that start with 'a'. Our object, then, is the string above, &amp;lt;code&amp;gt;data_bags/a\*&amp;lt;/code&amp;gt;. The verb that lists different objects on the chef repo is called &amp;lt;code&amp;gt;list&amp;lt;/code&amp;gt;. Our command we would run would be this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;knife list data_bags/a\*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Which would print to the console all of the objects in the data_bags directory that started with a.&lt;/div&gt;</summary>
		<author><name>Wpgallih</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/ch1a_2_WA&amp;diff=93048</id>
		<title>CSC/ECE 517 Spring 2015/ch1a 2 WA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/ch1a_2_WA&amp;diff=93048"/>
		<updated>2015-02-03T01:52:12Z</updated>

		<summary type="html">&lt;p&gt;Wpgallih: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Knife ==&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
&lt;br /&gt;
Knife is the command line tool for managing Chef nodes. If you are unfamiliar with Chef and how it works, check out the comparison between Chef and Puppet here: [http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2013/ch1_1w10_ga] or take a look at the official Chef website here: [https://www.chef.io/]. There, a deeper understanding of Chef can be attained. Simply, Chef allows the distribution of server environments between many different servers (called '''nodes'''). Any changes to the primary chef server (called the '''chef repo''' are distributed throughout all the other nodes, while different nodes can have other recipes and send them back to the chef repo. Knife, then, handles the communication between nodes and the chef repo. For example, let's say that there is an object on the chef repo that a node desires. Knife provides the tools to download that object to the node. Knife also allows setting up a node, installing necessary packages, management of users, and much more. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
Using Knife is fairly straightforward, with usage following this syntax:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; knife [verb] [object] &amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Wpgallih</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/ch1a_2_WA&amp;diff=93044</id>
		<title>CSC/ECE 517 Spring 2015/ch1a 2 WA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/ch1a_2_WA&amp;diff=93044"/>
		<updated>2015-02-03T01:17:16Z</updated>

		<summary type="html">&lt;p&gt;Wpgallih: Created page with &amp;quot; == Knife == Background Knife is the command line tool for managing Chef nodes. If you are unfamiliar with Chef and how it works, check out the comparison between Chef and Pu...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Knife ==&lt;br /&gt;
[[Background]]&lt;br /&gt;
Knife is the command line tool for managing Chef nodes. If you are unfamiliar with Chef and how it works, check out the comparison between Chef and Puppet [[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2013/ch1_1w10_ga]]&lt;/div&gt;</summary>
		<author><name>Wpgallih</name></author>
	</entry>
</feed>