<?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=Sdpampat</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=Sdpampat"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Sdpampat"/>
	<updated>2026-06-26T15:38:14Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1991._Improvements_to_anonymized_view&amp;diff=129007</id>
		<title>CSC/ECE 517 Fall 2019 - E1991. Improvements to anonymized view</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1991._Improvements_to_anonymized_view&amp;diff=129007"/>
		<updated>2019-11-12T02:30:49Z</updated>

		<summary type="html">&lt;p&gt;Sdpampat: /* Impersonating Student Using Anonymized Names */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
The [http://expertiza.ncsu.edu/ Expertiza] project takes advantage of peer-review among students to allow them to learn from each other. Tracking the time that a student spends on each submitted resources is meaningful to instructors to study and improve the teaching experience. Unfortunately, most peer assessment systems do not manage the content of students’ submission within the systems. They usually allow the authors to submit external links to the submission (e.g. GitHub code / deployed application), which makes it difficult for the system to track the time that the reviewers spend on the submissions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
The main idea of this project is to improve anonymized view in Expertiza. The feature is already implemented. However, there are issues / limitations with the current implementation which we will try to improve. &lt;br /&gt;
&lt;br /&gt;
==== Anonymized View For Students ====&lt;br /&gt;
Currently, anonymized view is not implemented for students. Although, not directly required by students, instructors may want to use anonymized view when impersonating a student. &lt;br /&gt;
&lt;br /&gt;
==== Issue with Impersonating Anonymized Student ====&lt;br /&gt;
In an anonymized view, instructors cannot impersonate a student because the username field has the anonymized name instead of their real name in the database. In order to be able to impersonate a student, we need to know their real names from database.&lt;br /&gt;
&lt;br /&gt;
==== Wrong Anonymized Names ====&lt;br /&gt;
In some places, anonymized names are not shown. For example, heatgrid view. We need to fix occurrences in different parts of the application where anonymized names are not shown.&lt;br /&gt;
&lt;br /&gt;
==== Anonymizing Team Names ====&lt;br /&gt;
Currently, team names are not anonymized. We need to extend the same logic of anonymization to teams.&lt;br /&gt;
&lt;br /&gt;
==== Optional Objective ====&lt;br /&gt;
Use randomized American names for anonymized users.&lt;br /&gt;
&lt;br /&gt;
== ''' Proposed Solution ''' ==&lt;br /&gt;
&lt;br /&gt;
In this section, we propose solutions to the problems / issues discussed above.&lt;br /&gt;
&lt;br /&gt;
==== Anonymized View For Students ====&lt;br /&gt;
Instructors often use 'impersonate' functionality to use Expertiza as a different user. Sometimes they also need to use anonymized view while they are impersonating a student. Therefore, anonymized view needs to be extended to students as well. &lt;br /&gt;
&lt;br /&gt;
In order to extend Anonymized view for students, the first thing we need to do is extend the following function : &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  def set_anonymized_view&lt;br /&gt;
    anonymized_view_starter_ips = $redis.get('anonymized_view_starter_ips') || ''&lt;br /&gt;
    session[:ip] = request.remote_ip&lt;br /&gt;
    if anonymized_view_starter_ips.include? session[:ip]&lt;br /&gt;
      anonymized_view_starter_ips.delete!(&amp;quot; #{session[:ip]}&amp;quot;)&lt;br /&gt;
    else&lt;br /&gt;
      anonymized_view_starter_ips += &amp;quot; #{session[:ip]}&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    $redis.set('anonymized_view_starter_ips', anonymized_view_starter_ips)&lt;br /&gt;
    redirect_to :back&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function is responsible to switch back and forth between normal view and an anonymized view. We could figure out that the session of current user is being manipulated to change views. The main driving logic works by storing user's IP address in a value field of &amp;lt;code&amp;gt;anonymized_view_starter_ips&amp;lt;/code&amp;gt; which is in Redis database.&lt;br /&gt;
&lt;br /&gt;
Refer the following flow chart for design details:&lt;br /&gt;
&lt;br /&gt;
[[File:D1.png|center]]&lt;br /&gt;
&lt;br /&gt;
==== Impersonating Student Using Anonymized Names ====&lt;br /&gt;
&lt;br /&gt;
When an instructor is already in Anonymized view and wants to impersonate a student, they have to quit the anonymized view and get the real username of that student. However, we want the instructor to be able to impersonate a student by using their anonymized names. The following function in &amp;lt;code&amp;gt;impersonate_controller.rb&amp;lt;/code&amp;gt; is responsible to impersonate students.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  def impersonate&lt;br /&gt;
    ...&lt;br /&gt;
    begin&lt;br /&gt;
      original_user = session[:super_user] || session[:user]&lt;br /&gt;
      # Impersonate using form on /impersonate/start&lt;br /&gt;
      if params[:impersonate].nil?&lt;br /&gt;
        ...&lt;br /&gt;
        user = User.find_by(name: params[:user][:name]) &lt;br /&gt;
        ...&lt;br /&gt;
      else&lt;br /&gt;
        # Impersonate a new account&lt;br /&gt;
        if !params[:impersonate][:name].empty?&lt;br /&gt;
          ...&lt;br /&gt;
          user = User.find_by(name: params[:impersonate][:name])          &lt;br /&gt;
          ...&lt;br /&gt;
        else&lt;br /&gt;
          ...&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      ...&lt;br /&gt;
    rescue Exception =&amp;gt; e&lt;br /&gt;
      flash[:error] = e.message&lt;br /&gt;
      redirect_to :back&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above snippet, we have omitted the irrelevant parts of code. The only change we need to do is the logic for &amp;lt;code&amp;gt;User.find_by()&amp;lt;/code&amp;gt; function. We will add a condition to check whether the current view is anonymized or not. If anonymized mode is set, we will convert the anonymous name back to the original name of the student. We will then make 'find' query using the real name of the student instead of using their anonymized name.&lt;br /&gt;
&lt;br /&gt;
The procedure to do this would be opposite of what we do to get anonymized names in first place. See following code snippet : &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  def name(ip_address = nil)&lt;br /&gt;
    User.anonymized_view?(ip_address) ? self.role.name + ' ' + self.id.to_s : self[:name]&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above snippet is an example of how anonymized names are generated.&lt;br /&gt;
&lt;br /&gt;
Please refer the following flowchart for design details;&lt;br /&gt;
&lt;br /&gt;
[[File:D2 (1).png|center]]&lt;br /&gt;
&lt;br /&gt;
=== Anonymizing Team Names ===&lt;br /&gt;
&lt;br /&gt;
Right now, team names are not anonymized. We need to add accessor methods for team names in &amp;lt;code&amp;gt;team.rb&amp;lt;/code&amp;gt; model file. &lt;br /&gt;
&lt;br /&gt;
Additionally, we need a &amp;lt;code&amp;gt;before&amp;lt;/code&amp;gt; function to check whether Anonymized view is set or not. In this function, we will generate anonymized name whenever Anonymized view is set. This is very similar to existing implementation of anonymizing user names as shown below : &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  def self.anonymized_view?(ip_address = nil)&lt;br /&gt;
    anonymized_view_starter_ips = $redis.get('anonymized_view_starter_ips') || ''&lt;br /&gt;
    return true if ip_address and anonymized_view_starter_ips.include? ip_address&lt;br /&gt;
    false&lt;br /&gt;
  end&lt;br /&gt;
  ...&lt;br /&gt;
  def fullname(ip_address = nil)&lt;br /&gt;
    User.anonymized_view?(ip_address) ? self.role.name + ', ' + self.id.to_s : self[:fullname]&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Wrong Anonymized Names ===&lt;br /&gt;
&lt;br /&gt;
In some parts of the application, anonymized names are not working properly right now. It is highly difficult to find all such occurrences in the application at this early stage of the project. We are working to find all such occurrences.&lt;br /&gt;
&lt;br /&gt;
However, we figured out that we need a common helper function to determine the name of a student based on whether Anonymized view is set or not. We will use the same function whenever we need to display name of a student. The function will internally take care of checking whether to return anonymized name or the real name.&lt;br /&gt;
&lt;br /&gt;
=== ''' User Flowchart/Design ''' ===&lt;br /&gt;
&lt;br /&gt;
==  ''' Test Plan ''' ==&lt;br /&gt;
&lt;br /&gt;
In this section, we discuss what the expected output of all the features will be in terms of well defined test steps.&lt;br /&gt;
&lt;br /&gt;
==== Anonymized View For Students ====&lt;br /&gt;
&lt;br /&gt;
# Login as an instructor&lt;br /&gt;
# Impersonate a student &lt;br /&gt;
# Switch to Anonymized view as a student&lt;br /&gt;
&lt;br /&gt;
Right now, (3) is not supported.&lt;br /&gt;
&lt;br /&gt;
==== Impersonating Student Using Anonymized Names ====&lt;br /&gt;
&lt;br /&gt;
# Login as an instructor&lt;br /&gt;
# Switch to Anonymized view&lt;br /&gt;
# Find a student from list of users&lt;br /&gt;
# Assert that the student name is anonymized&lt;br /&gt;
# Use the anonymized name to impersonate the real user behind anonymous entity&lt;br /&gt;
&lt;br /&gt;
Currently, (5) is not supported&lt;br /&gt;
&lt;br /&gt;
==== Anonymizing Team Names ====&lt;br /&gt;
&lt;br /&gt;
# Login as an instructor&lt;br /&gt;
# Switch to Anonymized view&lt;br /&gt;
# All team names should now be anonymized&lt;br /&gt;
&lt;br /&gt;
In current implementation, (3) is not supported&lt;br /&gt;
&lt;br /&gt;
==== Wrong Anonymized Names ====&lt;br /&gt;
&lt;br /&gt;
We are yet to triage the scope of this functionality.&lt;br /&gt;
&lt;br /&gt;
==== American English Names for Anonymized Students ====&lt;br /&gt;
&lt;br /&gt;
# Login as an instructor&lt;br /&gt;
# Switch to Anonymized view&lt;br /&gt;
# Anonymized student names should be normal human names in American English, instead of cryptic names like &amp;lt;code&amp;gt;student12312&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
#Shubham Dilip Pampattiwar (sdpampat)&lt;br /&gt;
#Pranav Maruti Gaikwad (pmgaikwa)&lt;br /&gt;
#Omkar Sunil Kulkarni (oskulkar)&lt;br /&gt;
#Deepayan Bardhan (dbardha)&lt;br /&gt;
&lt;br /&gt;
'''Mentor''': Sharique Khan (mkhan8)&lt;br /&gt;
&amp;lt;br&amp;gt;'''Professor''': Dr. Edward F. Gehringer (efg)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;/div&gt;</summary>
		<author><name>Sdpampat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1991._Improvements_to_anonymized_view&amp;diff=128999</id>
		<title>CSC/ECE 517 Fall 2019 - E1991. Improvements to anonymized view</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1991._Improvements_to_anonymized_view&amp;diff=128999"/>
		<updated>2019-11-12T02:28:38Z</updated>

		<summary type="html">&lt;p&gt;Sdpampat: /* Impersonating Student Using Anonymized Names */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
The [http://expertiza.ncsu.edu/ Expertiza] project takes advantage of peer-review among students to allow them to learn from each other. Tracking the time that a student spends on each submitted resources is meaningful to instructors to study and improve the teaching experience. Unfortunately, most peer assessment systems do not manage the content of students’ submission within the systems. They usually allow the authors to submit external links to the submission (e.g. GitHub code / deployed application), which makes it difficult for the system to track the time that the reviewers spend on the submissions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
The main idea of this project is to improve anonymized view in Expertiza. The feature is already implemented. However, there are issues / limitations with the current implementation which we will try to improve as a part of this project. &lt;br /&gt;
&lt;br /&gt;
==== Anonymized View For Students ====&lt;br /&gt;
Currently, anonymized view is not implemented for students. Although, not directly required by students, instructors may want to use anonymized view when impersonating a student. &lt;br /&gt;
&lt;br /&gt;
==== Issue with Impersonating Anonymized Student ====&lt;br /&gt;
In an anonymized view, instructors cannot impersonate a student because the username field has the anonymized name instead of their real name in the database. In order to be able to impersonate a student, we need to know their real names from database.&lt;br /&gt;
&lt;br /&gt;
==== Wrong Anonymized Names ====&lt;br /&gt;
In some places, anonymized names are not shown. For example, heatgrid view.&lt;br /&gt;
&lt;br /&gt;
==== Anonymizing Team Names ====&lt;br /&gt;
Currently, team names are not anonymized. &lt;br /&gt;
&lt;br /&gt;
==== Optional Objective ====&lt;br /&gt;
Use randomized American names for anonymized users.&lt;br /&gt;
&lt;br /&gt;
== ''' Proposed Solution ''' ==&lt;br /&gt;
&lt;br /&gt;
In this section, we propose solutions to the problems / issues discussed above.&lt;br /&gt;
&lt;br /&gt;
==== Anonymized View For Students ====&lt;br /&gt;
Instructors often use 'impersonate' functionality to use Expertiza as a different user. Sometimes they also need to use anonymized view while they are impersonating a student. Therefore, anonymized view needs to be extended to students as well. &lt;br /&gt;
&lt;br /&gt;
In order to extend Anonymized view for students, the first thing we need to do is extend the following function : &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  def set_anonymized_view&lt;br /&gt;
    anonymized_view_starter_ips = $redis.get('anonymized_view_starter_ips') || ''&lt;br /&gt;
    session[:ip] = request.remote_ip&lt;br /&gt;
    if anonymized_view_starter_ips.include? session[:ip]&lt;br /&gt;
      anonymized_view_starter_ips.delete!(&amp;quot; #{session[:ip]}&amp;quot;)&lt;br /&gt;
    else&lt;br /&gt;
      anonymized_view_starter_ips += &amp;quot; #{session[:ip]}&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    $redis.set('anonymized_view_starter_ips', anonymized_view_starter_ips)&lt;br /&gt;
    redirect_to :back&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function is responsible to switch back and forth between normal view and an anonymized view. We could figure out that the session of current user is being manipulated to change views. The main driving logic works by storing user's IP address in a value field of &amp;lt;code&amp;gt;anonymized_view_starter_ips&amp;lt;/code&amp;gt; which is in Redis database.&lt;br /&gt;
&lt;br /&gt;
Refer the following flow chart for design details:&lt;br /&gt;
&lt;br /&gt;
[[File:D1.png|center]]&lt;br /&gt;
&lt;br /&gt;
==== Impersonating Student Using Anonymized Names ====&lt;br /&gt;
&lt;br /&gt;
When an instructor is already in Anonymized view and wants to impersonate a student, they have to quit the anonymized view and get the real username of that student. However, we want the instructor to be able to impersonate a student by using their anonymized names. The following function in &amp;lt;code&amp;gt;impersonate_controller.rb&amp;lt;/code&amp;gt; is responsible to impersonate students.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  def impersonate&lt;br /&gt;
    ...&lt;br /&gt;
    begin&lt;br /&gt;
      original_user = session[:super_user] || session[:user]&lt;br /&gt;
      # Impersonate using form on /impersonate/start&lt;br /&gt;
      if params[:impersonate].nil?&lt;br /&gt;
        ...&lt;br /&gt;
        user = User.find_by(name: params[:user][:name]) &lt;br /&gt;
        ...&lt;br /&gt;
      else&lt;br /&gt;
        # Impersonate a new account&lt;br /&gt;
        if !params[:impersonate][:name].empty?&lt;br /&gt;
          ...&lt;br /&gt;
          user = User.find_by(name: params[:impersonate][:name])          &lt;br /&gt;
          ...&lt;br /&gt;
        else&lt;br /&gt;
          ...&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      ...&lt;br /&gt;
    rescue Exception =&amp;gt; e&lt;br /&gt;
      flash[:error] = e.message&lt;br /&gt;
      redirect_to :back&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above snippet, we have omitted the irrelevant parts of code. The only change we need to do is the logic for &amp;lt;code&amp;gt;User.find_by()&amp;lt;/code&amp;gt; function. We will add a condition to check whether the current view is anonymized or not. If anonymized mode is set, we will convert the anonymous name back to the original name of the student. We will then make 'find' query using the real name of the student instead of using their anonymized name.&lt;br /&gt;
&lt;br /&gt;
The procedure to do this would be opposite of what we do to get anonymized names in first place. See following code snippet : &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  def name(ip_address = nil)&lt;br /&gt;
    User.anonymized_view?(ip_address) ? self.role.name + ' ' + self.id.to_s : self[:name]&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above snippet is an example of how anonymized names are generated.&lt;br /&gt;
&lt;br /&gt;
Please refer the following flowchart for design detials;&lt;br /&gt;
&lt;br /&gt;
[[File:D1(2).png]]&lt;br /&gt;
&lt;br /&gt;
=== Anonymizing Team Names ===&lt;br /&gt;
&lt;br /&gt;
Right now, team names are not anonymized. We need to add accessor methods for team names in &amp;lt;code&amp;gt;team.rb&amp;lt;/code&amp;gt; model file. &lt;br /&gt;
&lt;br /&gt;
Additionally, we need a &amp;lt;code&amp;gt;before&amp;lt;/code&amp;gt; function to check whether Anonymized view is set or not. In this function, we will generate anonymized name whenever Anonymized view is set. This is very similar to existing implementation of anonymizing user names as shown below : &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  def self.anonymized_view?(ip_address = nil)&lt;br /&gt;
    anonymized_view_starter_ips = $redis.get('anonymized_view_starter_ips') || ''&lt;br /&gt;
    return true if ip_address and anonymized_view_starter_ips.include? ip_address&lt;br /&gt;
    false&lt;br /&gt;
  end&lt;br /&gt;
  ...&lt;br /&gt;
  def fullname(ip_address = nil)&lt;br /&gt;
    User.anonymized_view?(ip_address) ? self.role.name + ', ' + self.id.to_s : self[:fullname]&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Wrong Anonymized Names ===&lt;br /&gt;
&lt;br /&gt;
In some parts of the application, anonymized names are not working properly right now. It is highly difficult to find all such occurrences in the application at this early stage of the project. We are working to find all such occurrences.&lt;br /&gt;
&lt;br /&gt;
However, we figured out that we need a common helper function to determine the name of a student based on whether Anonymized view is set or not. We will use the same function whenever we need to display name of a student. The function will internally take care of checking whether to return anonymized name or the real name.&lt;br /&gt;
&lt;br /&gt;
=== ''' User Flowchart/Design ''' ===&lt;br /&gt;
&lt;br /&gt;
==  ''' Test Plan ''' ==&lt;br /&gt;
&lt;br /&gt;
In this section, we discuss what the expected output of all the features will be in terms of well defined test steps.&lt;br /&gt;
&lt;br /&gt;
==== Anonymized View For Students ====&lt;br /&gt;
&lt;br /&gt;
# Login as an instructor&lt;br /&gt;
# Impersonate a student &lt;br /&gt;
# Switch to Anonymized view as a student&lt;br /&gt;
&lt;br /&gt;
Right now, (3) is not supported.&lt;br /&gt;
&lt;br /&gt;
==== Impersonating Student Using Anonymized Names ====&lt;br /&gt;
&lt;br /&gt;
# Login as an instructor&lt;br /&gt;
# Switch to Anonymized view&lt;br /&gt;
# Find a student from list of users&lt;br /&gt;
# Assert that the student name is anonymized&lt;br /&gt;
# Use the anonymized name to impersonate the real user behind anonymous entity&lt;br /&gt;
&lt;br /&gt;
Currently, (5) is not supported&lt;br /&gt;
&lt;br /&gt;
==== Anonymizing Team Names ====&lt;br /&gt;
&lt;br /&gt;
# Login as an instructor&lt;br /&gt;
# Switch to Anonymized view&lt;br /&gt;
# All team names should now be anonymized&lt;br /&gt;
&lt;br /&gt;
In current implementation, (3) is not supported&lt;br /&gt;
&lt;br /&gt;
==== Wrong Anonymized Names ====&lt;br /&gt;
&lt;br /&gt;
We are yet to triage the scope of this functionality.&lt;br /&gt;
&lt;br /&gt;
==== American English Names for Anonymized Students ====&lt;br /&gt;
&lt;br /&gt;
# Login as an instructor&lt;br /&gt;
# Switch to Anonymized view&lt;br /&gt;
# Anonymized student names should be normal human names in American English, instead of cryptic names like &amp;lt;code&amp;gt;student12312&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
#Shubham Dilip Pampattiwar (sdpampat)&lt;br /&gt;
#Pranav Maruti Gaikwad (pmgaikwa)&lt;br /&gt;
#Omkar Sunil Kulkarni (oskulkar)&lt;br /&gt;
#Deepayan Bardhan (dbardha)&lt;br /&gt;
&lt;br /&gt;
'''Mentor''': Sharique Khan (mkhan8)&lt;br /&gt;
&amp;lt;br&amp;gt;'''Professor''': Dr. Edward F. Gehringer (efg)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;/div&gt;</summary>
		<author><name>Sdpampat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1991._Improvements_to_anonymized_view&amp;diff=128995</id>
		<title>CSC/ECE 517 Fall 2019 - E1991. Improvements to anonymized view</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1991._Improvements_to_anonymized_view&amp;diff=128995"/>
		<updated>2019-11-12T02:24:59Z</updated>

		<summary type="html">&lt;p&gt;Sdpampat: /* Anonymized View For Students */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
The [http://expertiza.ncsu.edu/ Expertiza] project takes advantage of peer-review among students to allow them to learn from each other. Tracking the time that a student spends on each submitted resources is meaningful to instructors to study and improve the teaching experience. Unfortunately, most peer assessment systems do not manage the content of students’ submission within the systems. They usually allow the authors to submit external links to the submission (e.g. GitHub code / deployed application), which makes it difficult for the system to track the time that the reviewers spend on the submissions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
The main idea of this exercise is to improve anonymized view in Expertiza. The feature is already implemented. However, there are issues / limitations with the current implementation which we will try to improve as a part of this project. &lt;br /&gt;
&lt;br /&gt;
==== Anonymized View For Students ====&lt;br /&gt;
Currently, anonymized view is not implemented for students. Although, not directly required by students, instructors may want to use anonymized view when impersonating a student. &lt;br /&gt;
&lt;br /&gt;
==== Issue with Impersonating Anonymized Student ====&lt;br /&gt;
In an anonymized view, instructors cannot impersonate a student because the username field has the anonymized name instead of their real name in the database. In order to be able to impersonate a student, we need to know their real names from database.&lt;br /&gt;
&lt;br /&gt;
==== Wrong Anonymized Names ====&lt;br /&gt;
In some places, anonymized names are not shown. For example, heatgrid view.&lt;br /&gt;
&lt;br /&gt;
==== Anonymizing Team Names ====&lt;br /&gt;
Currently, team names are not anonymized. &lt;br /&gt;
&lt;br /&gt;
==== Optional Objective ====&lt;br /&gt;
Use randomized American names for anonymized users.&lt;br /&gt;
&lt;br /&gt;
== ''' Proposed Solution ''' ==&lt;br /&gt;
&lt;br /&gt;
In this section, we propose solutions to the problems / issues discussed above.&lt;br /&gt;
&lt;br /&gt;
==== Anonymized View For Students ====&lt;br /&gt;
Instructors often use 'impersonate' functionality to use Expertiza as a different user. Sometimes they also need to use anonymized view while they are impersonating a student. Therefore, anonymized view needs to be extended to students as well. &lt;br /&gt;
&lt;br /&gt;
In order to extend Anonymized view for students, the first thing we need to do is extend the following function : &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  def set_anonymized_view&lt;br /&gt;
    anonymized_view_starter_ips = $redis.get('anonymized_view_starter_ips') || ''&lt;br /&gt;
    session[:ip] = request.remote_ip&lt;br /&gt;
    if anonymized_view_starter_ips.include? session[:ip]&lt;br /&gt;
      anonymized_view_starter_ips.delete!(&amp;quot; #{session[:ip]}&amp;quot;)&lt;br /&gt;
    else&lt;br /&gt;
      anonymized_view_starter_ips += &amp;quot; #{session[:ip]}&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    $redis.set('anonymized_view_starter_ips', anonymized_view_starter_ips)&lt;br /&gt;
    redirect_to :back&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function is responsible to switch back and forth between normal view and an anonymized view. We could figure out that the session of current user is being manipulated to change views. The main driving logic works by storing user's IP address in a value field of &amp;lt;code&amp;gt;anonymized_view_starter_ips&amp;lt;/code&amp;gt; which is in Redis database.&lt;br /&gt;
&lt;br /&gt;
Refer the following flow chart for design details:&lt;br /&gt;
&lt;br /&gt;
[[File:D1.png|center]]&lt;br /&gt;
&lt;br /&gt;
==== Impersonating Student Using Anonymized Names ====&lt;br /&gt;
&lt;br /&gt;
When an instructor is already in Anonymized view and wants to impersonate a student, they have to quit the anonymized view and get the real username of that student. However, we want the instructor to be able to impersonate a student by using their anonymized names. The following function in &amp;lt;code&amp;gt;impersonate_controller.rb&amp;lt;/code&amp;gt; is responsible to impersonate students.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  def impersonate&lt;br /&gt;
    ...&lt;br /&gt;
    begin&lt;br /&gt;
      original_user = session[:super_user] || session[:user]&lt;br /&gt;
      # Impersonate using form on /impersonate/start&lt;br /&gt;
      if params[:impersonate].nil?&lt;br /&gt;
        ...&lt;br /&gt;
        user = User.find_by(name: params[:user][:name]) &lt;br /&gt;
        ...&lt;br /&gt;
      else&lt;br /&gt;
        # Impersonate a new account&lt;br /&gt;
        if !params[:impersonate][:name].empty?&lt;br /&gt;
          ...&lt;br /&gt;
          user = User.find_by(name: params[:impersonate][:name])          &lt;br /&gt;
          ...&lt;br /&gt;
        else&lt;br /&gt;
          ...&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      ...&lt;br /&gt;
    rescue Exception =&amp;gt; e&lt;br /&gt;
      flash[:error] = e.message&lt;br /&gt;
      redirect_to :back&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above snippet, we have omitted the irrelevant parts of code. The only change we need to do is the logic for &amp;lt;code&amp;gt;User.find_by()&amp;lt;/code&amp;gt; function. We will add a condition to check whether the current view is anonymized or not. If anonymized mode is set, we will convert the anonymous name back to the original name of the student. We will then make 'find' query using the real name of the student instead of using their anonymized name.&lt;br /&gt;
&lt;br /&gt;
The procedure to do this would be opposite of what we do to get anonymized names in first place. See following code snippet : &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  def name(ip_address = nil)&lt;br /&gt;
    User.anonymized_view?(ip_address) ? self.role.name + ' ' + self.id.to_s : self[:name]&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above snippet is an example of how anonymized names are generated.&lt;br /&gt;
&lt;br /&gt;
=== Anonymizing Team Names ===&lt;br /&gt;
&lt;br /&gt;
Right now, team names are not anonymized. We need to add accessor methods for team names in &amp;lt;code&amp;gt;team.rb&amp;lt;/code&amp;gt; model file. &lt;br /&gt;
&lt;br /&gt;
Additionally, we need a &amp;lt;code&amp;gt;before&amp;lt;/code&amp;gt; function to check whether Anonymized view is set or not. In this function, we will generate anonymized name whenever Anonymized view is set. This is very similar to existing implementation of anonymizing user names as shown below : &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  def self.anonymized_view?(ip_address = nil)&lt;br /&gt;
    anonymized_view_starter_ips = $redis.get('anonymized_view_starter_ips') || ''&lt;br /&gt;
    return true if ip_address and anonymized_view_starter_ips.include? ip_address&lt;br /&gt;
    false&lt;br /&gt;
  end&lt;br /&gt;
  ...&lt;br /&gt;
  def fullname(ip_address = nil)&lt;br /&gt;
    User.anonymized_view?(ip_address) ? self.role.name + ', ' + self.id.to_s : self[:fullname]&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Wrong Anonymized Names ===&lt;br /&gt;
&lt;br /&gt;
In some parts of the application, anonymized names are not working properly right now. It is highly difficult to find all such occurrences in the application at this early stage of the project. We are working to find all such occurrences.&lt;br /&gt;
&lt;br /&gt;
However, we figured out that we need a common helper function to determine the name of a student based on whether Anonymized view is set or not. We will use the same function whenever we need to display name of a student. The function will internally take care of checking whether to return anonymized name or the real name.&lt;br /&gt;
&lt;br /&gt;
=== ''' User Flowchart/Design ''' ===&lt;br /&gt;
&lt;br /&gt;
==  ''' Test Plan ''' ==&lt;br /&gt;
&lt;br /&gt;
In this section, we discuss what the expected output of all the features will be in terms of well defined test steps.&lt;br /&gt;
&lt;br /&gt;
==== Anonymized View For Students ====&lt;br /&gt;
&lt;br /&gt;
# Login as an instructor&lt;br /&gt;
# Impersonate a student &lt;br /&gt;
# Switch to Anonymized view as a student&lt;br /&gt;
&lt;br /&gt;
Right now, (3) is not supported.&lt;br /&gt;
&lt;br /&gt;
==== Impersonating Student Using Anonymized Names ====&lt;br /&gt;
&lt;br /&gt;
# Login as an instructor&lt;br /&gt;
# Switch to Anonymized view&lt;br /&gt;
# Find a student from list of users&lt;br /&gt;
# Assert that the student name is anonymized&lt;br /&gt;
# Use the anonymized name to impersonate the real user behind anonymous entity&lt;br /&gt;
&lt;br /&gt;
Currently, (5) is not supported&lt;br /&gt;
&lt;br /&gt;
==== Anonymizing Team Names ====&lt;br /&gt;
&lt;br /&gt;
# Login as an instructor&lt;br /&gt;
# Switch to Anonymized view&lt;br /&gt;
# All team names should now be anonymized&lt;br /&gt;
&lt;br /&gt;
In current implementation, (3) is not supported&lt;br /&gt;
&lt;br /&gt;
==== Wrong Anonymized Names ====&lt;br /&gt;
&lt;br /&gt;
We are yet to triage the scope of this functionality.&lt;br /&gt;
&lt;br /&gt;
==== American English Names for Anonymized Students ====&lt;br /&gt;
&lt;br /&gt;
# Login as an instructor&lt;br /&gt;
# Switch to Anonymized view&lt;br /&gt;
# Anonymized student names should be normal human names in American English, instead of cryptic names like &amp;lt;code&amp;gt;student12312&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
#Shubham Dilip Pampattiwar (sdpampat)&lt;br /&gt;
#Pranav Maruti Gaikwad (pmgaikwa)&lt;br /&gt;
#Omkar Sunil Kulkarni (oskulkar)&lt;br /&gt;
#Deepayan Bardhan (dbardha)&lt;br /&gt;
&lt;br /&gt;
'''Mentor''': Sharique Khan (mkhan8)&lt;br /&gt;
&amp;lt;br&amp;gt;'''Professor''': Dr. Edward F. Gehringer (efg)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;/div&gt;</summary>
		<author><name>Sdpampat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1991._Improvements_to_anonymized_view&amp;diff=128993</id>
		<title>CSC/ECE 517 Fall 2019 - E1991. Improvements to anonymized view</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1991._Improvements_to_anonymized_view&amp;diff=128993"/>
		<updated>2019-11-12T02:24:24Z</updated>

		<summary type="html">&lt;p&gt;Sdpampat: /* Anonymized View For Students */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
The [http://expertiza.ncsu.edu/ Expertiza] project takes advantage of peer-review among students to allow them to learn from each other. Tracking the time that a student spends on each submitted resources is meaningful to instructors to study and improve the teaching experience. Unfortunately, most peer assessment systems do not manage the content of students’ submission within the systems. They usually allow the authors to submit external links to the submission (e.g. GitHub code / deployed application), which makes it difficult for the system to track the time that the reviewers spend on the submissions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
The main idea of this exercise is to improve anonymized view in Expertiza. The feature is already implemented. However, there are issues / limitations with the current implementation which we will try to improve as a part of this project. &lt;br /&gt;
&lt;br /&gt;
==== Anonymized View For Students ====&lt;br /&gt;
Currently, anonymized view is not implemented for students. Although, not directly required by students, instructors may want to use anonymized view when impersonating a student. &lt;br /&gt;
&lt;br /&gt;
==== Issue with Impersonating Anonymized Student ====&lt;br /&gt;
In an anonymized view, instructors cannot impersonate a student because the username field has the anonymized name instead of their real name in the database. In order to be able to impersonate a student, we need to know their real names from database.&lt;br /&gt;
&lt;br /&gt;
==== Wrong Anonymized Names ====&lt;br /&gt;
In some places, anonymized names are not shown. For example, heatgrid view.&lt;br /&gt;
&lt;br /&gt;
==== Anonymizing Team Names ====&lt;br /&gt;
Currently, team names are not anonymized. &lt;br /&gt;
&lt;br /&gt;
==== Optional Objective ====&lt;br /&gt;
Use randomized American names for anonymized users.&lt;br /&gt;
&lt;br /&gt;
== ''' Proposed Solution ''' ==&lt;br /&gt;
&lt;br /&gt;
In this section, we propose solutions to the problems / issues discussed above.&lt;br /&gt;
&lt;br /&gt;
==== Anonymized View For Students ====&lt;br /&gt;
Instructors often use 'impersonate' functionality to use Expertiza as a different user. Sometimes they also need to use anonymized view while they are impersonating a student. Therefore, anonymized view needs to be extended to students as well. &lt;br /&gt;
&lt;br /&gt;
In order to extend Anonymized view for students, the first thing we need to do is extend the following function : &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  def set_anonymized_view&lt;br /&gt;
    anonymized_view_starter_ips = $redis.get('anonymized_view_starter_ips') || ''&lt;br /&gt;
    session[:ip] = request.remote_ip&lt;br /&gt;
    if anonymized_view_starter_ips.include? session[:ip]&lt;br /&gt;
      anonymized_view_starter_ips.delete!(&amp;quot; #{session[:ip]}&amp;quot;)&lt;br /&gt;
    else&lt;br /&gt;
      anonymized_view_starter_ips += &amp;quot; #{session[:ip]}&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    $redis.set('anonymized_view_starter_ips', anonymized_view_starter_ips)&lt;br /&gt;
    redirect_to :back&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function is responsible to switch back and forth between normal view and an anonymized view. We could figure out that the session of current user is being manipulated to change views. The main driving logic works by storing user's IP address in a value field of &amp;lt;code&amp;gt;anonymized_view_starter_ips&amp;lt;/code&amp;gt; which is in Redis database.&lt;br /&gt;
&lt;br /&gt;
Refer the following flow chart for design details:&lt;br /&gt;
&lt;br /&gt;
[[File:D1.png]]&lt;br /&gt;
&lt;br /&gt;
==== Impersonating Student Using Anonymized Names ====&lt;br /&gt;
&lt;br /&gt;
When an instructor is already in Anonymized view and wants to impersonate a student, they have to quit the anonymized view and get the real username of that student. However, we want the instructor to be able to impersonate a student by using their anonymized names. The following function in &amp;lt;code&amp;gt;impersonate_controller.rb&amp;lt;/code&amp;gt; is responsible to impersonate students.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  def impersonate&lt;br /&gt;
    ...&lt;br /&gt;
    begin&lt;br /&gt;
      original_user = session[:super_user] || session[:user]&lt;br /&gt;
      # Impersonate using form on /impersonate/start&lt;br /&gt;
      if params[:impersonate].nil?&lt;br /&gt;
        ...&lt;br /&gt;
        user = User.find_by(name: params[:user][:name]) &lt;br /&gt;
        ...&lt;br /&gt;
      else&lt;br /&gt;
        # Impersonate a new account&lt;br /&gt;
        if !params[:impersonate][:name].empty?&lt;br /&gt;
          ...&lt;br /&gt;
          user = User.find_by(name: params[:impersonate][:name])          &lt;br /&gt;
          ...&lt;br /&gt;
        else&lt;br /&gt;
          ...&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      ...&lt;br /&gt;
    rescue Exception =&amp;gt; e&lt;br /&gt;
      flash[:error] = e.message&lt;br /&gt;
      redirect_to :back&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above snippet, we have omitted the irrelevant parts of code. The only change we need to do is the logic for &amp;lt;code&amp;gt;User.find_by()&amp;lt;/code&amp;gt; function. We will add a condition to check whether the current view is anonymized or not. If anonymized mode is set, we will convert the anonymous name back to the original name of the student. We will then make 'find' query using the real name of the student instead of using their anonymized name.&lt;br /&gt;
&lt;br /&gt;
The procedure to do this would be opposite of what we do to get anonymized names in first place. See following code snippet : &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  def name(ip_address = nil)&lt;br /&gt;
    User.anonymized_view?(ip_address) ? self.role.name + ' ' + self.id.to_s : self[:name]&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above snippet is an example of how anonymized names are generated.&lt;br /&gt;
&lt;br /&gt;
=== Anonymizing Team Names ===&lt;br /&gt;
&lt;br /&gt;
Right now, team names are not anonymized. We need to add accessor methods for team names in &amp;lt;code&amp;gt;team.rb&amp;lt;/code&amp;gt; model file. &lt;br /&gt;
&lt;br /&gt;
Additionally, we need a &amp;lt;code&amp;gt;before&amp;lt;/code&amp;gt; function to check whether Anonymized view is set or not. In this function, we will generate anonymized name whenever Anonymized view is set. This is very similar to existing implementation of anonymizing user names as shown below : &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  def self.anonymized_view?(ip_address = nil)&lt;br /&gt;
    anonymized_view_starter_ips = $redis.get('anonymized_view_starter_ips') || ''&lt;br /&gt;
    return true if ip_address and anonymized_view_starter_ips.include? ip_address&lt;br /&gt;
    false&lt;br /&gt;
  end&lt;br /&gt;
  ...&lt;br /&gt;
  def fullname(ip_address = nil)&lt;br /&gt;
    User.anonymized_view?(ip_address) ? self.role.name + ', ' + self.id.to_s : self[:fullname]&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Wrong Anonymized Names ===&lt;br /&gt;
&lt;br /&gt;
In some parts of the application, anonymized names are not working properly right now. It is highly difficult to find all such occurrences in the application at this early stage of the project. We are working to find all such occurrences.&lt;br /&gt;
&lt;br /&gt;
However, we figured out that we need a common helper function to determine the name of a student based on whether Anonymized view is set or not. We will use the same function whenever we need to display name of a student. The function will internally take care of checking whether to return anonymized name or the real name.&lt;br /&gt;
&lt;br /&gt;
=== ''' User Flowchart/Design ''' ===&lt;br /&gt;
&lt;br /&gt;
==  ''' Test Plan ''' ==&lt;br /&gt;
&lt;br /&gt;
In this section, we discuss what the expected output of all the features will be in terms of well defined test steps.&lt;br /&gt;
&lt;br /&gt;
==== Anonymized View For Students ====&lt;br /&gt;
&lt;br /&gt;
# Login as an instructor&lt;br /&gt;
# Impersonate a student &lt;br /&gt;
# Switch to Anonymized view as a student&lt;br /&gt;
&lt;br /&gt;
Right now, (3) is not supported.&lt;br /&gt;
&lt;br /&gt;
==== Impersonating Student Using Anonymized Names ====&lt;br /&gt;
&lt;br /&gt;
# Login as an instructor&lt;br /&gt;
# Switch to Anonymized view&lt;br /&gt;
# Find a student from list of users&lt;br /&gt;
# Assert that the student name is anonymized&lt;br /&gt;
# Use the anonymized name to impersonate the real user behind anonymous entity&lt;br /&gt;
&lt;br /&gt;
Currently, (5) is not supported&lt;br /&gt;
&lt;br /&gt;
==== Anonymizing Team Names ====&lt;br /&gt;
&lt;br /&gt;
# Login as an instructor&lt;br /&gt;
# Switch to Anonymized view&lt;br /&gt;
# All team names should now be anonymized&lt;br /&gt;
&lt;br /&gt;
In current implementation, (3) is not supported&lt;br /&gt;
&lt;br /&gt;
==== Wrong Anonymized Names ====&lt;br /&gt;
&lt;br /&gt;
We are yet to triage the scope of this functionality.&lt;br /&gt;
&lt;br /&gt;
==== American English Names for Anonymized Students ====&lt;br /&gt;
&lt;br /&gt;
# Login as an instructor&lt;br /&gt;
# Switch to Anonymized view&lt;br /&gt;
# Anonymized student names should be normal human names in American English, instead of cryptic names like &amp;lt;code&amp;gt;student12312&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
#Shubham Dilip Pampattiwar (sdpampat)&lt;br /&gt;
#Pranav Maruti Gaikwad (pmgaikwa)&lt;br /&gt;
#Omkar Sunil Kulkarni (oskulkar)&lt;br /&gt;
#Deepayan Bardhan (dbardha)&lt;br /&gt;
&lt;br /&gt;
'''Mentor''': Sharique Khan (mkhan8)&lt;br /&gt;
&amp;lt;br&amp;gt;'''Professor''': Dr. Edward F. Gehringer (efg)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;/div&gt;</summary>
		<author><name>Sdpampat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:D2_(1).png&amp;diff=128971</id>
		<title>File:D2 (1).png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:D2_(1).png&amp;diff=128971"/>
		<updated>2019-11-12T02:16:29Z</updated>

		<summary type="html">&lt;p&gt;Sdpampat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sdpampat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:D1.png&amp;diff=128970</id>
		<title>File:D1.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:D1.png&amp;diff=128970"/>
		<updated>2019-11-12T02:16:14Z</updated>

		<summary type="html">&lt;p&gt;Sdpampat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sdpampat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_M1950._Support_Asynchronous_Web_Assembly_Compilation&amp;diff=127743</id>
		<title>CSC/ECE 517 Fall 2019 - M1950. Support Asynchronous Web Assembly Compilation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_M1950._Support_Asynchronous_Web_Assembly_Compilation&amp;diff=127743"/>
		<updated>2019-11-07T01:47:02Z</updated>

		<summary type="html">&lt;p&gt;Sdpampat: /* Scope */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Servo is a prototype web browser engine written in the [https://en.wikipedia.org/wiki/Rust_(programming_language) Rust] language. Servo is a new, experimental browser that supports synchronously compiling and executing WebAssembly code, but does not yet support asynchronous compilation. This means that the entire WebAssembly program must be fetched before compilation can begin, which leads to longer time loading pages that run WebAssembly programs than in other web browsers. The goal of the project is to support compiling WebAssembly programs asynchronously so compilation can begin while the program is still being fetched from the network.&lt;br /&gt;
&lt;br /&gt;
=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
[https://en.wikipedia.org/wiki/Servo_(layout_engine) Servo]Servo is an open source prototype web browser layout engine being developed by Mozilla, and it is written in [https://www.rust-lang.org/ Rust] language. The main idea is to create a highly parallel environment, in which different components can be handled by fine grained, isolated tasks. The different components can be rendering, HTML parsing, etc. &lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
[https://doc.rust-lang.org/book/index.html Rust] is an open source systems programming language developed by Mozilla. Servo is written in Rust. The main purpose behind it's design is to be thread safe and concurrent. The emphasis is also on speed, safety and control of memory layout.&lt;br /&gt;
&lt;br /&gt;
=='''Scope'''==&lt;br /&gt;
&lt;br /&gt;
The scope of the project was to complete the initial steps mentioned [https://github.com/servo/servo/wiki/Asynchronous-WebAssembly-compilation-project here].&lt;br /&gt;
&lt;br /&gt;
The steps are as follows:&lt;br /&gt;
&lt;br /&gt;
* The project requirement initially stated that we build and Compile servo. Following are the steps for this:&lt;br /&gt;
Servo is built with [https://mail.mozilla.org/pipermail/rust-dev/2014-March/009090.html Cargo], the Rust package manager. Mozilla's Mach tools are used to orchestrate the build and other tasks.&lt;br /&gt;
&lt;br /&gt;
    git clone https://github.com/servo/servo&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --dev&lt;br /&gt;
&lt;br /&gt;
* Create a rust JS::StreamConsumer wrapper that stores a pointer to the object and has methods for consumeChunk, streamEnd, streamError, and noteResponseURLs.&lt;br /&gt;
* Implement an extern &amp;quot;C&amp;quot; function in script_runtime.rs that matches ConsumeStreamCallback that initiates the streaming webassembly compilation then creates a wrapper for the stream consumer and stores it in the Response object&lt;br /&gt;
* Implement an extern &amp;quot;C&amp;quot; function in script_runtime.rs that matches ReportStreamErrorCallback and reports an error with the error! macro&lt;br /&gt;
* Lastly, call InitStreamConsumerCallback in new_rt_and_cx with the two new functions as arguments, described in the specifications&lt;br /&gt;
&lt;br /&gt;
The subsequent steps mentioned [https://github.com/servo/servo/wiki/Asynchronous-WebAssembly-compilation-project here] are to be done for the final project.&lt;br /&gt;
&lt;br /&gt;
The steps involved in the project scope are depicted below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Steps.png|center]]&lt;br /&gt;
&lt;br /&gt;
=='''Design Pattern'''==&lt;br /&gt;
Design patterns are not applicable as our task involved just implementation of methods. However, the Implementation section below provides details of the steps as why it was implemented, the way it was implemented&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
The following steps were followed to meet the project requirements as per this [https://github.com/servo/servo/wiki/Asynchronous-WebAssembly-compilation-project github page].&lt;br /&gt;
&lt;br /&gt;
===Step 1===&lt;br /&gt;
&lt;br /&gt;
We created a Stream Consumer structure which has the methods for consumeChunk, streamEnd, streamError, and noteResponseURLs based on the Stream Consumer class implemented in the Mozilla Spider Monkey module. &lt;br /&gt;
&lt;br /&gt;
[[File:IS1-1.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:IS1-2.png]]&lt;br /&gt;
&lt;br /&gt;
===Step 2===&lt;br /&gt;
&lt;br /&gt;
We implemented the ReportStreamErrorCallback function to retrieve and report errors during stream compilation.&lt;br /&gt;
&lt;br /&gt;
[[File:IS2-1.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:IS2-2.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:IS2-3.png]]&lt;br /&gt;
&lt;br /&gt;
===Step 3===&lt;br /&gt;
&lt;br /&gt;
The implementation of ConsumeStreamCallback and InitStreamConsumer function in new_rt_and_cx, is in progress.&lt;br /&gt;
&lt;br /&gt;
[[File:IS3.png]]&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
&lt;br /&gt;
The code added in the initial steps(scope) is not expected to have any change in behavior on its own. We loaded https://wasm.bootcss.com/demo/Tanks/ to verify that there is no change in behavior due to our changes. &lt;br /&gt;
&lt;br /&gt;
In addition, we have tested our implementation against the servo-provided automated test suite using `./mach test-wpt tests/wpt/web-platform-tests/wasm/webapi` command.&lt;br /&gt;
The following image is the output of the said command:&lt;br /&gt;
&lt;br /&gt;
[[File:Serv_tests.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Following are the steps to compile the implementation to check for any broken code:&lt;br /&gt;
&lt;br /&gt;
# Install the pre-requisites required for servo as mentioned [https://github.com/servo/servo/blob/master/README.md here] &lt;br /&gt;
# Run the following commands&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; &lt;br /&gt;
  cd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git clone https://github.com/Akash-Pateria/servo&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 cd servo&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git checkout -b origin/async-wasm-compilation-initial&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach fmt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach test-tidy&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach build -d&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will see that the servo build is successful and no errors are reported.&lt;br /&gt;
&lt;br /&gt;
=='''Pull Request'''==&lt;br /&gt;
&lt;br /&gt;
Here is our [https://github.com/servo/servo/pull/24563 pull request] which has been merged in Servo master branch. We have raised [https://github.com/servo/servo/pull/24653 another pull request](currently in review state), containing the implementation of the remaining initial steps.&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
1.    https://doc.rust-lang.org/book&amp;lt;br&amp;gt;&lt;br /&gt;
2.    https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;br&amp;gt;&lt;br /&gt;
3.    https://en.wikipedia.org/wiki/Servo_(layout_engine)&amp;lt;br&amp;gt;&lt;br /&gt;
4.    https://github.com/servo/servo/wiki/Asynchronous-WebAssembly-compilation-project&amp;lt;br&amp;gt;&lt;br /&gt;
6.    http://rustbyexample.com/&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sdpampat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_M1950._Support_Asynchronous_Web_Assembly_Compilation&amp;diff=127740</id>
		<title>CSC/ECE 517 Fall 2019 - M1950. Support Asynchronous Web Assembly Compilation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_M1950._Support_Asynchronous_Web_Assembly_Compilation&amp;diff=127740"/>
		<updated>2019-11-07T01:43:34Z</updated>

		<summary type="html">&lt;p&gt;Sdpampat: /* Scope */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Servo is a prototype web browser engine written in the [https://en.wikipedia.org/wiki/Rust_(programming_language) Rust] language. Servo is a new, experimental browser that supports synchronously compiling and executing WebAssembly code, but does not yet support asynchronous compilation. This means that the entire WebAssembly program must be fetched before compilation can begin, which leads to longer time loading pages that run WebAssembly programs than in other web browsers. The goal of the project is to support compiling WebAssembly programs asynchronously so compilation can begin while the program is still being fetched from the network.&lt;br /&gt;
&lt;br /&gt;
=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
[https://en.wikipedia.org/wiki/Servo_(layout_engine) Servo]Servo is an open source prototype web browser layout engine being developed by Mozilla, and it is written in [https://www.rust-lang.org/ Rust] language. The main idea is to create a highly parallel environment, in which different components can be handled by fine grained, isolated tasks. The different components can be rendering, HTML parsing, etc. &lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
[https://doc.rust-lang.org/book/index.html Rust] is an open source systems programming language developed by Mozilla. Servo is written in Rust. The main purpose behind it's design is to be thread safe and concurrent. The emphasis is also on speed, safety and control of memory layout.&lt;br /&gt;
&lt;br /&gt;
=='''Scope'''==&lt;br /&gt;
&lt;br /&gt;
The scope of the project was to complete the initial steps mentioned [https://github.com/servo/servo/wiki/Asynchronous-WebAssembly-compilation-project here].&lt;br /&gt;
&lt;br /&gt;
The steps are as follows:&lt;br /&gt;
&lt;br /&gt;
* The project requirement initially stated that we build and Compile servo. Following are the steps for this:&lt;br /&gt;
Servo is built with [https://mail.mozilla.org/pipermail/rust-dev/2014-March/009090.html Cargo], the Rust package manager. Mozilla's Mach tools are used to orchestrate the build and other tasks.&lt;br /&gt;
&lt;br /&gt;
    git clone https://github.com/servo/servo&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --dev&lt;br /&gt;
&lt;br /&gt;
* Create a rust JS::StreamConsumer wrapper that stores a pointer to the object and has methods for consumeChunk, streamEnd, streamError, and noteResponseURLs.&lt;br /&gt;
* Implement an extern &amp;quot;C&amp;quot; function in script_runtime.rs that matches ConsumeStreamCallback that initiates the streaming webassembly compilation then creates a wrapper for the stream consumer and stores it in the Response object&lt;br /&gt;
* Implement an extern &amp;quot;C&amp;quot; function in script_runtime.rs that matches ReportStreamErrorCallback and reports an error with the error! macro&lt;br /&gt;
* Lastly, call InitStreamConsumerCallback in new_rt_and_cx with the two new functions as arguments, described in the specifications&lt;br /&gt;
&lt;br /&gt;
The subsequent steps mentioned [https://github.com/servo/servo/wiki/Asynchronous-WebAssembly-compilation-project here] are to be done for the final project.&lt;br /&gt;
&lt;br /&gt;
[[File:Steps.png]]&lt;br /&gt;
&lt;br /&gt;
=='''Design Pattern'''==&lt;br /&gt;
Design patterns are not applicable as our task involved just implementation of methods. However, the Implementation section below provides details of the steps as why it was implemented, the way it was implemented&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
The following steps were followed to meet the project requirements as per this [https://github.com/servo/servo/wiki/Asynchronous-WebAssembly-compilation-project github page].&lt;br /&gt;
&lt;br /&gt;
===Step 1===&lt;br /&gt;
&lt;br /&gt;
We created a Stream Consumer structure which has the methods for consumeChunk, streamEnd, streamError, and noteResponseURLs based on the Stream Consumer class implemented in the Mozilla Spider Monkey module. &lt;br /&gt;
&lt;br /&gt;
[[File:IS1-1.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:IS1-2.png]]&lt;br /&gt;
&lt;br /&gt;
===Step 2===&lt;br /&gt;
&lt;br /&gt;
We implemented the ReportStreamErrorCallback function to retrieve and report errors during stream compilation.&lt;br /&gt;
&lt;br /&gt;
[[File:IS2-1.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:IS2-2.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:IS2-3.png]]&lt;br /&gt;
&lt;br /&gt;
===Step 3===&lt;br /&gt;
&lt;br /&gt;
The implementation of ConsumeStreamCallback and InitStreamConsumer function in new_rt_and_cx, is in progress.&lt;br /&gt;
&lt;br /&gt;
[[File:IS3.png]]&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
&lt;br /&gt;
The code added in the initial steps(scope) is not expected to have any change in behavior on its own. We loaded https://wasm.bootcss.com/demo/Tanks/ to verify that there is no change in behavior due to our changes. &lt;br /&gt;
&lt;br /&gt;
In addition, we have tested our implementation against the servo-provided automated test suite using `./mach test-wpt tests/wpt/web-platform-tests/wasm/webapi` command.&lt;br /&gt;
The following image is the output of the said command:&lt;br /&gt;
&lt;br /&gt;
[[File:Serv_tests.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Following are the steps to compile the implementation to check for any broken code:&lt;br /&gt;
&lt;br /&gt;
# Install the pre-requisites required for servo as mentioned [https://github.com/servo/servo/blob/master/README.md here] &lt;br /&gt;
# Run the following commands&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; &lt;br /&gt;
  cd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git clone https://github.com/Akash-Pateria/servo&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 cd servo&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git checkout -b origin/async-wasm-compilation-initial&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach fmt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach test-tidy&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach build -d&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will see that the servo build is successful and no errors are reported.&lt;br /&gt;
&lt;br /&gt;
=='''Pull Request'''==&lt;br /&gt;
&lt;br /&gt;
Here is our [https://github.com/servo/servo/pull/24563 pull request] which has been merged in Servo master branch. We have raised [https://github.com/servo/servo/pull/24653 another pull request](currently in review state), containing the implementation of the remaining initial steps.&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
1.    https://doc.rust-lang.org/book&amp;lt;br&amp;gt;&lt;br /&gt;
2.    https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;br&amp;gt;&lt;br /&gt;
3.    https://en.wikipedia.org/wiki/Servo_(layout_engine)&amp;lt;br&amp;gt;&lt;br /&gt;
4.    https://github.com/servo/servo/wiki/Asynchronous-WebAssembly-compilation-project&amp;lt;br&amp;gt;&lt;br /&gt;
6.    http://rustbyexample.com/&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sdpampat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_M1950._Support_Asynchronous_Web_Assembly_Compilation&amp;diff=127739</id>
		<title>CSC/ECE 517 Fall 2019 - M1950. Support Asynchronous Web Assembly Compilation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_M1950._Support_Asynchronous_Web_Assembly_Compilation&amp;diff=127739"/>
		<updated>2019-11-07T01:43:01Z</updated>

		<summary type="html">&lt;p&gt;Sdpampat: /* Scope */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Servo is a prototype web browser engine written in the [https://en.wikipedia.org/wiki/Rust_(programming_language) Rust] language. Servo is a new, experimental browser that supports synchronously compiling and executing WebAssembly code, but does not yet support asynchronous compilation. This means that the entire WebAssembly program must be fetched before compilation can begin, which leads to longer time loading pages that run WebAssembly programs than in other web browsers. The goal of the project is to support compiling WebAssembly programs asynchronously so compilation can begin while the program is still being fetched from the network.&lt;br /&gt;
&lt;br /&gt;
=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
[https://en.wikipedia.org/wiki/Servo_(layout_engine) Servo]Servo is an open source prototype web browser layout engine being developed by Mozilla, and it is written in [https://www.rust-lang.org/ Rust] language. The main idea is to create a highly parallel environment, in which different components can be handled by fine grained, isolated tasks. The different components can be rendering, HTML parsing, etc. &lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
[https://doc.rust-lang.org/book/index.html Rust] is an open source systems programming language developed by Mozilla. Servo is written in Rust. The main purpose behind it's design is to be thread safe and concurrent. The emphasis is also on speed, safety and control of memory layout.&lt;br /&gt;
&lt;br /&gt;
=='''Scope'''==&lt;br /&gt;
&lt;br /&gt;
The scope of the project was to complete the initial steps mentioned [https://github.com/servo/servo/wiki/Asynchronous-WebAssembly-compilation-project here].&lt;br /&gt;
&lt;br /&gt;
The steps are as follows:&lt;br /&gt;
&lt;br /&gt;
* The project requirement initially stated that we build and Compile servo. Following are the steps for this:&lt;br /&gt;
Servo is built with [https://mail.mozilla.org/pipermail/rust-dev/2014-March/009090.html Cargo], the Rust package manager. Mozilla's Mach tools are used to orchestrate the build and other tasks.&lt;br /&gt;
&lt;br /&gt;
    git clone https://github.com/servo/servo&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --dev&lt;br /&gt;
&lt;br /&gt;
* Create a rust JS::StreamConsumer wrapper that stores a pointer to the object and has methods for consumeChunk, streamEnd, streamError, and noteResponseURLs.&lt;br /&gt;
* Implement an extern &amp;quot;C&amp;quot; function in script_runtime.rs that matches ConsumeStreamCallback that initiates the streaming webassembly compilation then creates a wrapper for the stream consumer and stores it in the Response object&lt;br /&gt;
* Implement an extern &amp;quot;C&amp;quot; function in script_runtime.rs that matches ReportStreamErrorCallback and reports an error with the error! macro&lt;br /&gt;
* Lastly, call InitStreamConsumerCallback in new_rt_and_cx with the two new functions as arguments, described in the specifications&lt;br /&gt;
&lt;br /&gt;
The subsequent steps mentioned [https://github.com/servo/servo/wiki/Asynchronous-WebAssembly-compilation-project here] are to be done for the final project.&lt;br /&gt;
&lt;br /&gt;
[[File:ISteps.png]]&lt;br /&gt;
&lt;br /&gt;
=='''Design Pattern'''==&lt;br /&gt;
Design patterns are not applicable as our task involved just implementation of methods. However, the Implementation section below provides details of the steps as why it was implemented, the way it was implemented&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
The following steps were followed to meet the project requirements as per this [https://github.com/servo/servo/wiki/Asynchronous-WebAssembly-compilation-project github page].&lt;br /&gt;
&lt;br /&gt;
===Step 1===&lt;br /&gt;
&lt;br /&gt;
We created a Stream Consumer structure which has the methods for consumeChunk, streamEnd, streamError, and noteResponseURLs based on the Stream Consumer class implemented in the Mozilla Spider Monkey module. &lt;br /&gt;
&lt;br /&gt;
[[File:IS1-1.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:IS1-2.png]]&lt;br /&gt;
&lt;br /&gt;
===Step 2===&lt;br /&gt;
&lt;br /&gt;
We implemented the ReportStreamErrorCallback function to retrieve and report errors during stream compilation.&lt;br /&gt;
&lt;br /&gt;
[[File:IS2-1.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:IS2-2.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:IS2-3.png]]&lt;br /&gt;
&lt;br /&gt;
===Step 3===&lt;br /&gt;
&lt;br /&gt;
The implementation of ConsumeStreamCallback and InitStreamConsumer function in new_rt_and_cx, is in progress.&lt;br /&gt;
&lt;br /&gt;
[[File:IS3.png]]&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
&lt;br /&gt;
The code added in the initial steps(scope) is not expected to have any change in behavior on its own. We loaded https://wasm.bootcss.com/demo/Tanks/ to verify that there is no change in behavior due to our changes. &lt;br /&gt;
&lt;br /&gt;
In addition, we have tested our implementation against the servo-provided automated test suite using `./mach test-wpt tests/wpt/web-platform-tests/wasm/webapi` command.&lt;br /&gt;
The following image is the output of the said command:&lt;br /&gt;
&lt;br /&gt;
[[File:Serv_tests.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Following are the steps to compile the implementation to check for any broken code:&lt;br /&gt;
&lt;br /&gt;
# Install the pre-requisites required for servo as mentioned [https://github.com/servo/servo/blob/master/README.md here] &lt;br /&gt;
# Run the following commands&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; &lt;br /&gt;
  cd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git clone https://github.com/Akash-Pateria/servo&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 cd servo&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git checkout -b origin/async-wasm-compilation-initial&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach fmt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach test-tidy&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach build -d&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will see that the servo build is successful and no errors are reported.&lt;br /&gt;
&lt;br /&gt;
=='''Pull Request'''==&lt;br /&gt;
&lt;br /&gt;
Here is our [https://github.com/servo/servo/pull/24563 pull request] which has been merged in Servo master branch. We have raised [https://github.com/servo/servo/pull/24653 another pull request](currently in review state), containing the implementation of the remaining initial steps.&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
1.    https://doc.rust-lang.org/book&amp;lt;br&amp;gt;&lt;br /&gt;
2.    https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;br&amp;gt;&lt;br /&gt;
3.    https://en.wikipedia.org/wiki/Servo_(layout_engine)&amp;lt;br&amp;gt;&lt;br /&gt;
4.    https://github.com/servo/servo/wiki/Asynchronous-WebAssembly-compilation-project&amp;lt;br&amp;gt;&lt;br /&gt;
6.    http://rustbyexample.com/&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sdpampat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Steps.png&amp;diff=127735</id>
		<title>File:Steps.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Steps.png&amp;diff=127735"/>
		<updated>2019-11-07T01:40:30Z</updated>

		<summary type="html">&lt;p&gt;Sdpampat: Steps involved in the project scope&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Steps involved in the project scope&lt;/div&gt;</summary>
		<author><name>Sdpampat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_M1950._Support_Asynchronous_Web_Assembly_Compilation&amp;diff=125964</id>
		<title>CSC/ECE 517 Fall 2019 - M1950. Support Asynchronous Web Assembly Compilation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_M1950._Support_Asynchronous_Web_Assembly_Compilation&amp;diff=125964"/>
		<updated>2019-10-28T20:25:26Z</updated>

		<summary type="html">&lt;p&gt;Sdpampat: /* Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Servo is a prototype web browser engine written in the [https://en.wikipedia.org/wiki/Rust_(programming_language) Rust] language. Servo is a new, experimental browser that supports synchronously compiling and executing WebAssembly code, but does not yet support asynchronous compilation. This means that the entire WebAssembly program must be fetched before compilation can begin, which leads to longer time loading pages that run WebAssembly programs than in other web browsers. The goal of the project is to support compiling WebAssembly programs asynchronously so compilation can begin while the program is still being fetched from the network.&lt;br /&gt;
&lt;br /&gt;
=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
[https://en.wikipedia.org/wiki/Servo_(layout_engine) Servo]Servo is an open source prototype web browser layout engine being developed by Mozilla, and it is written in [https://www.rust-lang.org/ Rust] language. The main idea is to create a highly parallel environment, in which different components can be handled by fine grained, isolated tasks. The different components can be rendering, HTML parsing, etc. &lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
[https://doc.rust-lang.org/book/index.html Rust] is an open source systems programming language developed by Mozilla. Servo is written in Rust. The main purpose behind it's design is to be thread safe and concurrent. The emphasis is also on speed, safety and control of memory layout.&lt;br /&gt;
&lt;br /&gt;
=='''Scope'''==&lt;br /&gt;
&lt;br /&gt;
The scope of the project was to complete the initial steps mentioned [https://github.com/servo/servo/wiki/Asynchronous-WebAssembly-compilation-project here].&lt;br /&gt;
&lt;br /&gt;
The steps are as follows:&lt;br /&gt;
&lt;br /&gt;
* The project requirement initially stated that we build and Compile servo. Following are the steps for this:&lt;br /&gt;
Servo is built with [https://mail.mozilla.org/pipermail/rust-dev/2014-March/009090.html Cargo], the Rust package manager. Mozilla's Mach tools are used to orchestrate the build and other tasks.&lt;br /&gt;
&lt;br /&gt;
    git clone https://github.com/servo/servo&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --dev&lt;br /&gt;
&lt;br /&gt;
* Create a rust JS::StreamConsumer wrapper that stores a pointer to the object and has methods for consumeChunk, streamEnd, streamError, and noteResponseURLs.&lt;br /&gt;
* Implement an extern &amp;quot;C&amp;quot; function in script_runtime.rs that matches ConsumeStreamCallback that initiates the streaming webassembly compilation then creates a wrapper for the stream consumer and stores it in the Response object&lt;br /&gt;
* Implement an extern &amp;quot;C&amp;quot; function in script_runtime.rs that matches ReportStreamErrorCallback and reports an error with the error! macro&lt;br /&gt;
* Lastly, call InitStreamConsumerCallback in new_rt_and_cx with the two new functions as arguments, described in the specifications&lt;br /&gt;
&lt;br /&gt;
The subsequent steps mentioned [https://github.com/servo/servo/wiki/Asynchronous-WebAssembly-compilation-project here] are to be done for the final project.&lt;br /&gt;
&lt;br /&gt;
=='''Design Pattern'''==&lt;br /&gt;
Design patterns are not applicable as our task involved just implementation of methods. However, the Implementation section below provides details of the steps as why it was implemented, the way it was implemented&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
The following steps were followed to meet the project requirements as per this [https://github.com/servo/servo/wiki/Asynchronous-WebAssembly-compilation-project github page].&lt;br /&gt;
&lt;br /&gt;
===Step 1===&lt;br /&gt;
&lt;br /&gt;
We created a Stream Consumer structure which has the methods for consumeChunk, streamEnd, streamError, and noteResponseURLs based on the Stream Consumer class implemented in the Mozilla Spider Monkey module. &lt;br /&gt;
&lt;br /&gt;
[[File:StreamConsumerFunctions.png]]&lt;br /&gt;
&lt;br /&gt;
===Step 2===&lt;br /&gt;
&lt;br /&gt;
We implemented the ReportStreamErrorCallback function to retrieve and report errors during stream compilation.&lt;br /&gt;
&lt;br /&gt;
[[File:ReportErrorCallback.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Step 3===&lt;br /&gt;
&lt;br /&gt;
The implementation of ConsumeStreamCallback and new_rt_and_cx is in progress.&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
&lt;br /&gt;
The code added in the initial steps(scope) is not expected to have any change in behaviour on its own. We loaded https://wasm.bootcss.com/demo/Tanks/ to verify that there is no change in behaviour due to our changes.&lt;br /&gt;
&lt;br /&gt;
Since there are no functional tests involved pertaining to the tasks in our scope, we took steps to look out for compilation errors before raising the pull request.&lt;br /&gt;
&lt;br /&gt;
Following are the steps for the same:&lt;br /&gt;
&lt;br /&gt;
# Install the pre-requisites required for servo as mentioned [https://github.com/servo/servo/blob/master/README.md here] &lt;br /&gt;
# Run the following commands&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; &lt;br /&gt;
  cd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git clone https://github.com/Akash-Pateria/servo&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 cd servo&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git checkout -b origin/async-wasm-compilation-initial&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach fmt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach test-tidy&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach build -d&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will see that the servo build is successful and no errors are reported.&lt;br /&gt;
&lt;br /&gt;
=='''Pull Request'''==&lt;br /&gt;
&lt;br /&gt;
Here is our [https://github.com/servo/servo/pull/24563 pull request]. In the PR, you can see all the code snippets added to implement the above-mentioned steps.&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
1.    https://doc.rust-lang.org/book&amp;lt;br&amp;gt;&lt;br /&gt;
2.    https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;br&amp;gt;&lt;br /&gt;
3.    https://en.wikipedia.org/wiki/Servo_(layout_engine)&amp;lt;br&amp;gt;&lt;br /&gt;
4.    https://github.com/servo/servo/wiki/Asynchronous-WebAssembly-compilation-project&amp;lt;br&amp;gt;&lt;br /&gt;
6.    http://rustbyexample.com/&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sdpampat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_M1950._Support_Asynchronous_Web_Assembly_Compilation&amp;diff=125961</id>
		<title>CSC/ECE 517 Fall 2019 - M1950. Support Asynchronous Web Assembly Compilation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_M1950._Support_Asynchronous_Web_Assembly_Compilation&amp;diff=125961"/>
		<updated>2019-10-28T20:24:06Z</updated>

		<summary type="html">&lt;p&gt;Sdpampat: /* Scope */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Servo is a prototype web browser engine written in the [https://en.wikipedia.org/wiki/Rust_(programming_language) Rust] language. Servo is a new, experimental browser that supports synchronously compiling and executing WebAssembly code, but does not yet support asynchronous compilation. This means that the entire WebAssembly program must be fetched before compilation can begin, which leads to longer time loading pages that run WebAssembly programs than in other web browsers. The goal of the project is to support compiling WebAssembly programs asynchronously so compilation can begin while the program is still being fetched from the network.&lt;br /&gt;
&lt;br /&gt;
=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
[https://en.wikipedia.org/wiki/Servo_(layout_engine) Servo]Servo is an open source prototype web browser layout engine being developed by Mozilla, and it is written in [https://www.rust-lang.org/ Rust] language. The main idea is to create a highly parallel environment, in which different components can be handled by fine grained, isolated tasks. The different components can be rendering, HTML parsing, etc. &lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
[https://doc.rust-lang.org/book/index.html Rust] is an open source systems programming language developed by Mozilla. Servo is written in Rust. The main purpose behind it's design is to be thread safe and concurrent. The emphasis is also on speed, safety and control of memory layout.&lt;br /&gt;
&lt;br /&gt;
=='''Scope'''==&lt;br /&gt;
&lt;br /&gt;
The scope of the project was to complete the initial steps mentioned [https://github.com/servo/servo/wiki/Asynchronous-WebAssembly-compilation-project here].&lt;br /&gt;
&lt;br /&gt;
The steps are as follows:&lt;br /&gt;
&lt;br /&gt;
* The project requirement initially stated that we build and Compile servo. Following are the steps for this:&lt;br /&gt;
Servo is built with [https://mail.mozilla.org/pipermail/rust-dev/2014-March/009090.html Cargo], the Rust package manager. Mozilla's Mach tools are used to orchestrate the build and other tasks.&lt;br /&gt;
&lt;br /&gt;
    git clone https://github.com/servo/servo&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --dev&lt;br /&gt;
&lt;br /&gt;
* Create a rust JS::StreamConsumer wrapper that stores a pointer to the object and has methods for consumeChunk, streamEnd, streamError, and noteResponseURLs.&lt;br /&gt;
* Implement an extern &amp;quot;C&amp;quot; function in script_runtime.rs that matches ConsumeStreamCallback that initiates the streaming webassembly compilation then creates a wrapper for the stream consumer and stores it in the Response object&lt;br /&gt;
* Implement an extern &amp;quot;C&amp;quot; function in script_runtime.rs that matches ReportStreamErrorCallback and reports an error with the error! macro&lt;br /&gt;
* Lastly, call InitStreamConsumerCallback in new_rt_and_cx with the two new functions as arguments, described in the specifications&lt;br /&gt;
&lt;br /&gt;
The subsequent steps mentioned [https://github.com/servo/servo/wiki/Asynchronous-WebAssembly-compilation-project here] are to be done for the final project.&lt;br /&gt;
&lt;br /&gt;
=='''Design Pattern'''==&lt;br /&gt;
Design patterns are not applicable as our task involved just implementation of methods. However, the Implementation section below provides details of the steps as why it was implemented, the way it was implemented&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
The following steps were followed to meet the project requirements as per this [https://github.com/servo/servo/wiki/Asynchronous-WebAssembly-compilation-project github page].&lt;br /&gt;
&lt;br /&gt;
===Step 1===&lt;br /&gt;
&lt;br /&gt;
We created a Stream Consumer structure which has the methods for consumeChunk, streamEnd, streamError, and noteResponseURLs based on the Stream Consumer class implemented in the Mozilla Spider Monkey module. &lt;br /&gt;
&lt;br /&gt;
[[File:StreamConsumerFunctions.png]]&lt;br /&gt;
&lt;br /&gt;
===Step 2===&lt;br /&gt;
&lt;br /&gt;
We implemented the ReportStreamErrorCallback function to retrieve and report errors during stream compilation.&lt;br /&gt;
&lt;br /&gt;
[[File:ReportErrorCallback.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Step 3===&lt;br /&gt;
&lt;br /&gt;
The implementation of ConsumeStreamCallback and new_rt_and_cx is in progress.&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
&lt;br /&gt;
The code added in the initial steps(scope) is not expected to have any change in behaviour on its own. We loaded https://wasm.bootcss.com/demo/Tanks/ to verify that there is no change in behaviour due to our changes.&lt;br /&gt;
&lt;br /&gt;
Since there are no functional tests involved pertaining to the tasks in our scope, we took steps to look out for compilation errors before raising the pull request.&lt;br /&gt;
&lt;br /&gt;
Following are the steps for the same:&lt;br /&gt;
&lt;br /&gt;
# Install the pre-requisites required for servo as mentioned [https://github.com/servo/servo/blob/master/README.md here] &lt;br /&gt;
# Run the following commands&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; &lt;br /&gt;
  cd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git clone https://github.com/Akash-Pateria/servo&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 cd servo&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git checkout -b origin/async-wasm-compilation-initial&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach fmt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach test-tidy&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach build -d&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can see that the servo build is successful and no errors are reported.&lt;br /&gt;
&lt;br /&gt;
=='''Pull Request'''==&lt;br /&gt;
&lt;br /&gt;
Here is our [https://github.com/servo/servo/pull/24563 pull request]. In the PR, you can see all the code snippets added to implement the above-mentioned steps.&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
1.    https://doc.rust-lang.org/book&amp;lt;br&amp;gt;&lt;br /&gt;
2.    https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;br&amp;gt;&lt;br /&gt;
3.    https://en.wikipedia.org/wiki/Servo_(layout_engine)&amp;lt;br&amp;gt;&lt;br /&gt;
4.    https://github.com/servo/servo/wiki/Asynchronous-WebAssembly-compilation-project&amp;lt;br&amp;gt;&lt;br /&gt;
6.    http://rustbyexample.com/&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sdpampat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_M1950._Support_Asynchronous_Web_Assembly_Compilation&amp;diff=125960</id>
		<title>CSC/ECE 517 Fall 2019 - M1950. Support Asynchronous Web Assembly Compilation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_M1950._Support_Asynchronous_Web_Assembly_Compilation&amp;diff=125960"/>
		<updated>2019-10-28T20:23:28Z</updated>

		<summary type="html">&lt;p&gt;Sdpampat: /* Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Servo is a prototype web browser engine written in the [https://en.wikipedia.org/wiki/Rust_(programming_language) Rust] language. Servo is a new, experimental browser that supports synchronously compiling and executing WebAssembly code, but does not yet support asynchronous compilation. This means that the entire WebAssembly program must be fetched before compilation can begin, which leads to longer time loading pages that run WebAssembly programs than in other web browsers. The goal of the project is to support compiling WebAssembly programs asynchronously so compilation can begin while the program is still being fetched from the network.&lt;br /&gt;
&lt;br /&gt;
=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
[https://en.wikipedia.org/wiki/Servo_(layout_engine) Servo]Servo is an open source prototype web browser layout engine being developed by Mozilla, and it is written in [https://www.rust-lang.org/ Rust] language. The main idea is to create a highly parallel environment, in which different components can be handled by fine grained, isolated tasks. The different components can be rendering, HTML parsing, etc. &lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
[https://doc.rust-lang.org/book/index.html Rust] is an open source systems programming language developed by Mozilla. Servo is written in Rust. The main purpose behind it's design is to be thread safe and concurrent. The emphasis is also on speed, safety and control of memory layout.&lt;br /&gt;
&lt;br /&gt;
=='''Scope'''==&lt;br /&gt;
&lt;br /&gt;
The scope of the project was to complete the initial steps mentioned [https://github.com/servo/servo/wiki/Asynchronous-WebAssembly-compilation-project here].&lt;br /&gt;
&lt;br /&gt;
The steps are as follows:&lt;br /&gt;
&lt;br /&gt;
* The project requirement initially stated that we build and Compile servo. Following are the steps for this:&lt;br /&gt;
Servo is built with [https://mail.mozilla.org/pipermail/rust-dev/2014-March/009090.html Cargo], the Rust package manager. Mozilla's Mach tools are used to orchestrate the build and other tasks.&lt;br /&gt;
&lt;br /&gt;
    git clone https://github.com/servo/servo&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --dev&lt;br /&gt;
    ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&lt;br /&gt;
* Create a rust JS::StreamConsumer wrapper that stores a pointer to the object and has methods for consumeChunk, streamEnd, streamError, and noteResponseURLs.&lt;br /&gt;
* Implement an extern &amp;quot;C&amp;quot; function in script_runtime.rs that matches ConsumeStreamCallback that initiates the streaming webassembly compilation then creates a wrapper for the stream consumer and stores it in the Response object&lt;br /&gt;
* Implement an extern &amp;quot;C&amp;quot; function in script_runtime.rs that matches ReportStreamErrorCallback and reports an error with the error! macro&lt;br /&gt;
* Lastly, call InitStreamConsumerCallback in new_rt_and_cx with the two new functions as arguments, described in the specifications&lt;br /&gt;
&lt;br /&gt;
The subsequent steps mentioned [https://github.com/servo/servo/wiki/Asynchronous-WebAssembly-compilation-project here] are to be done for the final project.&lt;br /&gt;
&lt;br /&gt;
=='''Design Pattern'''==&lt;br /&gt;
Design patterns are not applicable as our task involved just implementation of methods. However, the Implementation section below provides details of the steps as why it was implemented, the way it was implemented&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
The following steps were followed to meet the project requirements as per this [https://github.com/servo/servo/wiki/Asynchronous-WebAssembly-compilation-project github page].&lt;br /&gt;
&lt;br /&gt;
===Step 1===&lt;br /&gt;
&lt;br /&gt;
We created a Stream Consumer structure which has the methods for consumeChunk, streamEnd, streamError, and noteResponseURLs based on the Stream Consumer class implemented in the Mozilla Spider Monkey module. &lt;br /&gt;
&lt;br /&gt;
[[File:StreamConsumerFunctions.png]]&lt;br /&gt;
&lt;br /&gt;
===Step 2===&lt;br /&gt;
&lt;br /&gt;
We implemented the ReportStreamErrorCallback function to retrieve and report errors during stream compilation.&lt;br /&gt;
&lt;br /&gt;
[[File:ReportErrorCallback.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Step 3===&lt;br /&gt;
&lt;br /&gt;
The implementation of ConsumeStreamCallback and new_rt_and_cx is in progress.&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
&lt;br /&gt;
The code added in the initial steps(scope) is not expected to have any change in behaviour on its own. We loaded https://wasm.bootcss.com/demo/Tanks/ to verify that there is no change in behaviour due to our changes.&lt;br /&gt;
&lt;br /&gt;
Since there are no functional tests involved pertaining to the tasks in our scope, we took steps to look out for compilation errors before raising the pull request.&lt;br /&gt;
&lt;br /&gt;
Following are the steps for the same:&lt;br /&gt;
&lt;br /&gt;
# Install the pre-requisites required for servo as mentioned [https://github.com/servo/servo/blob/master/README.md here] &lt;br /&gt;
# Run the following commands&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; &lt;br /&gt;
  cd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git clone https://github.com/Akash-Pateria/servo&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 cd servo&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git checkout -b origin/async-wasm-compilation-initial&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach fmt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach test-tidy&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach build -d&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can see that the servo build is successful and no errors are reported.&lt;br /&gt;
&lt;br /&gt;
=='''Pull Request'''==&lt;br /&gt;
&lt;br /&gt;
Here is our [https://github.com/servo/servo/pull/24563 pull request]. In the PR, you can see all the code snippets added to implement the above-mentioned steps.&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
1.    https://doc.rust-lang.org/book&amp;lt;br&amp;gt;&lt;br /&gt;
2.    https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;br&amp;gt;&lt;br /&gt;
3.    https://en.wikipedia.org/wiki/Servo_(layout_engine)&amp;lt;br&amp;gt;&lt;br /&gt;
4.    https://github.com/servo/servo/wiki/Asynchronous-WebAssembly-compilation-project&amp;lt;br&amp;gt;&lt;br /&gt;
6.    http://rustbyexample.com/&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sdpampat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_M1950._Support_Asynchronous_Web_Assembly_Compilation&amp;diff=125946</id>
		<title>CSC/ECE 517 Fall 2019 - M1950. Support Asynchronous Web Assembly Compilation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_M1950._Support_Asynchronous_Web_Assembly_Compilation&amp;diff=125946"/>
		<updated>2019-10-28T19:49:14Z</updated>

		<summary type="html">&lt;p&gt;Sdpampat: /* Design Pattern */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Servo is a prototype web browser engine written in the [https://en.wikipedia.org/wiki/Rust_(programming_language) Rust] language. Servo is a new, experimental browser that supports synchronously compiling and executing WebAssembly code, but does not yet support asynchronous compilation. This means that the entire WebAssembly program must be fetched before compilation can begin, which leads to longer time loading pages that run WebAssembly programs than in other web browsers. The goal of the project is to support compiling WebAssembly programs asynchronously so compilation can begin while the program is still being fetched from the network.&lt;br /&gt;
&lt;br /&gt;
=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
[https://en.wikipedia.org/wiki/Servo_(layout_engine) Servo]Servo is an open source prototype web browser layout engine being developed by Mozilla, and it is written in [https://www.rust-lang.org/ Rust] language. The main idea is to create a highly parallel environment, in which different components can be handled by fine grained, isolated tasks. The different components can be rendering, HTML parsing, etc. &lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
[https://doc.rust-lang.org/book/index.html Rust] is an open source systems programming language developed by Mozilla. Servo is written in Rust. The main purpose behind it's design is to be thread safe and concurrent. The emphasis is also on speed, safety and control of memory layout.&lt;br /&gt;
&lt;br /&gt;
=='''Scope'''==&lt;br /&gt;
&lt;br /&gt;
The scope of the project was to complete the initial steps mentioned [https://github.com/servo/servo/wiki/Asynchronous-WebAssembly-compilation-project here].&lt;br /&gt;
&lt;br /&gt;
The steps are as follows:&lt;br /&gt;
&lt;br /&gt;
* The project requirement initially stated that we build and Compile servo. Following are the steps for this:&lt;br /&gt;
Servo is built with [https://mail.mozilla.org/pipermail/rust-dev/2014-March/009090.html Cargo], the Rust package manager. Mozilla's Mach tools are used to orchestrate the build and other tasks.&lt;br /&gt;
&lt;br /&gt;
    git clone https://github.com/servo/servo&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --dev&lt;br /&gt;
    ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&lt;br /&gt;
* Create a rust JS::StreamConsumer wrapper that stores a pointer to the object and has methods for consumeChunk, streamEnd, streamError, and noteResponseURLs.&lt;br /&gt;
* Implement an extern &amp;quot;C&amp;quot; function in script_runtime.rs that matches ConsumeStreamCallback that initiates the streaming webassembly compilation then creates a wrapper for the stream consumer and stores it in the Response object&lt;br /&gt;
* Implement an extern &amp;quot;C&amp;quot; function in script_runtime.rs that matches ReportStreamErrorCallback and reports an error with the error! macro&lt;br /&gt;
* Lastly, call InitStreamConsumerCallback in new_rt_and_cx with the two new functions as arguments, described in the specifications&lt;br /&gt;
&lt;br /&gt;
The subsequent steps mentioned [https://github.com/servo/servo/wiki/Asynchronous-WebAssembly-compilation-project here] are to be done for the final project.&lt;br /&gt;
&lt;br /&gt;
=='''Design Pattern'''==&lt;br /&gt;
Design patterns are not applicable as our task involved just implementation of methods. However, the Implementation section below provides details of the steps as why it was implemented, the way it was implemented&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
The following steps were followed to meet the project requirements as per this [https://github.com/servo/servo/wiki/Asynchronous-WebAssembly-compilation-project github page].&lt;br /&gt;
&lt;br /&gt;
===Step 1===&lt;br /&gt;
&lt;br /&gt;
As we need to implement the overrideMimeType() method, we have uncommented the overrideMimeType() method from the XMLHttpRequest interface (components/script/dom/webidls/XMLHttpRequest.webidl).&lt;br /&gt;
&lt;br /&gt;
[[File:StreamConsumerFunctions.png]]&lt;br /&gt;
&lt;br /&gt;
===Step 2===&lt;br /&gt;
&lt;br /&gt;
As two new fields are necessary for overrideMimeType() method implementation, override_mime_type to store the mime type of the mime passed in the argument and override_charset to store the charset of the mime passed in the argument. &lt;br /&gt;
Hence, we have added two new fields: override_mime_type and override_charset to the XMLHttpRequest structure.&lt;br /&gt;
&lt;br /&gt;
[[File:XHRStruct.png]]&lt;br /&gt;
&lt;br /&gt;
===Step 3===&lt;br /&gt;
&lt;br /&gt;
Finally, we have implemented the overrideMimeType method according to the [https://xhr.spec.whatwg.org/#the-overridemimetype%28%29-method XHR specifications].&lt;br /&gt;
* If the state is loading or done, we have returned Invalid State Error&lt;br /&gt;
* Then we have parsed the mime passed in the argument&lt;br /&gt;
* If the parsing of mime was successful, we have saved the appropriate values in override_mime_type and override_charset&lt;br /&gt;
&lt;br /&gt;
[[File:overrideMimeType.png]]&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
&lt;br /&gt;
Unfortunately, the code added in the initial steps(scope) is not expected to have any change in behaviour on its own. The best we can do is to load https://wasm.bootcss.com/demo/Tanks/ and verify that there is no change in behaviour due to our changes.&lt;br /&gt;
&lt;br /&gt;
Eventhough we could not perform any kind of functional tests, we took steps to look out for compilation errors before raising the pull request.&lt;br /&gt;
&lt;br /&gt;
Following are the steps for the same:&lt;br /&gt;
&lt;br /&gt;
# Install the pre-requisites required for servo as mentioned [https://github.com/servo/servo/blob/master/README.md here] &lt;br /&gt;
# Run the following commands&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; &lt;br /&gt;
  cd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git clone https://github.com/Akash-Pateria/servo&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 cd servo&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git checkout -b origin/async-wasm-compilation-initial&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach fmt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach test-tidy&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach build -d&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can see that the servo build is successful and no errors are reported.&lt;br /&gt;
&lt;br /&gt;
=='''Pull Request'''==&lt;br /&gt;
&lt;br /&gt;
Here is our [https://github.com/servo/servo/pull/24563 pull request]. In the PR, you can see all the code snippets added to implement the above-mentioned steps.&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
1.    https://doc.rust-lang.org/book&amp;lt;br&amp;gt;&lt;br /&gt;
2.    https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;br&amp;gt;&lt;br /&gt;
3.    https://en.wikipedia.org/wiki/Servo_(layout_engine)&amp;lt;br&amp;gt;&lt;br /&gt;
4.    https://github.com/servo/servo/wiki/Asynchronous-WebAssembly-compilation-project&amp;lt;br&amp;gt;&lt;br /&gt;
6.    http://rustbyexample.com/&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sdpampat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_M1950._Support_Asynchronous_Web_Assembly_Compilation&amp;diff=125943</id>
		<title>CSC/ECE 517 Fall 2019 - M1950. Support Asynchronous Web Assembly Compilation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_M1950._Support_Asynchronous_Web_Assembly_Compilation&amp;diff=125943"/>
		<updated>2019-10-28T19:46:39Z</updated>

		<summary type="html">&lt;p&gt;Sdpampat: /* Conclusion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Servo is a prototype web browser engine written in the [https://en.wikipedia.org/wiki/Rust_(programming_language) Rust] language. Servo is a new, experimental browser that supports synchronously compiling and executing WebAssembly code, but does not yet support asynchronous compilation. This means that the entire WebAssembly program must be fetched before compilation can begin, which leads to longer time loading pages that run WebAssembly programs than in other web browsers. The goal of the project is to support compiling WebAssembly programs asynchronously so compilation can begin while the program is still being fetched from the network.&lt;br /&gt;
&lt;br /&gt;
=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
[https://en.wikipedia.org/wiki/Servo_(layout_engine) Servo]Servo is an open source prototype web browser layout engine being developed by Mozilla, and it is written in [https://www.rust-lang.org/ Rust] language. The main idea is to create a highly parallel environment, in which different components can be handled by fine grained, isolated tasks. The different components can be rendering, HTML parsing, etc. &lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
[https://doc.rust-lang.org/book/index.html Rust] is an open source systems programming language developed by Mozilla. Servo is written in Rust. The main purpose behind it's design is to be thread safe and concurrent. The emphasis is also on speed, safety and control of memory layout.&lt;br /&gt;
&lt;br /&gt;
=='''Scope'''==&lt;br /&gt;
&lt;br /&gt;
The scope of the project was to complete the initial steps mentioned [https://github.com/servo/servo/wiki/Asynchronous-WebAssembly-compilation-project here].&lt;br /&gt;
&lt;br /&gt;
The steps are as follows:&lt;br /&gt;
&lt;br /&gt;
* The project requirement initially stated that we build and Compile servo. Following are the steps for this:&lt;br /&gt;
Servo is built with [https://mail.mozilla.org/pipermail/rust-dev/2014-March/009090.html Cargo], the Rust package manager. Mozilla's Mach tools are used to orchestrate the build and other tasks.&lt;br /&gt;
&lt;br /&gt;
    git clone https://github.com/servo/servo&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --dev&lt;br /&gt;
    ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&lt;br /&gt;
* Create a rust JS::StreamConsumer wrapper that stores a pointer to the object and has methods for consumeChunk, streamEnd, streamError, and noteResponseURLs.&lt;br /&gt;
* Implement an extern &amp;quot;C&amp;quot; function in script_runtime.rs that matches ConsumeStreamCallback that initiates the streaming webassembly compilation then creates a wrapper for the stream consumer and stores it in the Response object&lt;br /&gt;
* Implement an extern &amp;quot;C&amp;quot; function in script_runtime.rs that matches ReportStreamErrorCallback and reports an error with the error! macro&lt;br /&gt;
* Lastly, call InitStreamConsumerCallback in new_rt_and_cx with the two new functions as arguments, described in the specifications&lt;br /&gt;
&lt;br /&gt;
The subsequent steps mentioned [https://github.com/servo/servo/wiki/Asynchronous-WebAssembly-compilation-project here] are to be done for the final project.&lt;br /&gt;
&lt;br /&gt;
=='''Design Pattern'''==&lt;br /&gt;
Design patterns are not applicable as our task involved just implementing a method. However, the Implementation section below provides details of the steps as why it was implemented, the way it was implemented&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
The following steps were followed to meet the project requirements as per this [https://github.com/servo/servo/wiki/Implement-support-for-missing-XMLHttpRequest-APIs github page].&lt;br /&gt;
&lt;br /&gt;
===Step 1===&lt;br /&gt;
&lt;br /&gt;
As we need to implement the overrideMimeType() method, we have uncommented the overrideMimeType() method from the XMLHttpRequest interface (components/script/dom/webidls/XMLHttpRequest.webidl).&lt;br /&gt;
&lt;br /&gt;
[[File:Uncomment-overrideMimeType.png]]&lt;br /&gt;
&lt;br /&gt;
===Step 2===&lt;br /&gt;
&lt;br /&gt;
As two new fields are necessary for overrideMimeType() method implementation, override_mime_type to store the mime type of the mime passed in the argument and override_charset to store the charset of the mime passed in the argument. &lt;br /&gt;
Hence, we have added two new fields: override_mime_type and override_charset to the XMLHttpRequest structure.&lt;br /&gt;
&lt;br /&gt;
[[File:XHRStruct.png]]&lt;br /&gt;
&lt;br /&gt;
===Step 3===&lt;br /&gt;
&lt;br /&gt;
Finally, we have implemented the overrideMimeType method according to the [https://xhr.spec.whatwg.org/#the-overridemimetype%28%29-method XHR specifications].&lt;br /&gt;
* If the state is loading or done, we have returned Invalid State Error&lt;br /&gt;
* Then we have parsed the mime passed in the argument&lt;br /&gt;
* If the parsing of mime was successful, we have saved the appropriate values in override_mime_type and override_charset&lt;br /&gt;
&lt;br /&gt;
[[File:overrideMimeType.png]]&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
&lt;br /&gt;
Unfortunately, the code added in the initial steps(scope) is not expected to have any change in behaviour on its own. The best we can do is to load https://wasm.bootcss.com/demo/Tanks/ and verify that there is no change in behaviour due to our changes.&lt;br /&gt;
&lt;br /&gt;
Eventhough we could not perform any kind of functional tests, we took steps to look out for compilation errors before raising the pull request.&lt;br /&gt;
&lt;br /&gt;
Following are the steps for the same:&lt;br /&gt;
&lt;br /&gt;
# Install the pre-requisites required for servo as mentioned [https://github.com/servo/servo/blob/master/README.md here] &lt;br /&gt;
# Run the following commands&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; &lt;br /&gt;
  cd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git clone https://github.com/Akash-Pateria/servo&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 cd servo&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git checkout -b origin/async-wasm-compilation-initial&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach fmt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach test-tidy&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach build -d&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can see that the servo build is successful and no errors are reported.&lt;br /&gt;
&lt;br /&gt;
=='''Pull Request'''==&lt;br /&gt;
&lt;br /&gt;
Here is our [https://github.com/servo/servo/pull/24563 pull request]. In the PR, you can see all the code snippets added to implement the above-mentioned steps.&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
1.    https://doc.rust-lang.org/book&amp;lt;br&amp;gt;&lt;br /&gt;
2.    https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;br&amp;gt;&lt;br /&gt;
3.    https://en.wikipedia.org/wiki/Servo_(layout_engine)&amp;lt;br&amp;gt;&lt;br /&gt;
4.    https://github.com/servo/servo/wiki/Asynchronous-WebAssembly-compilation-project&amp;lt;br&amp;gt;&lt;br /&gt;
6.    http://rustbyexample.com/&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sdpampat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_M1950._Support_Asynchronous_Web_Assembly_Compilation&amp;diff=125940</id>
		<title>CSC/ECE 517 Fall 2019 - M1950. Support Asynchronous Web Assembly Compilation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_M1950._Support_Asynchronous_Web_Assembly_Compilation&amp;diff=125940"/>
		<updated>2019-10-28T19:42:12Z</updated>

		<summary type="html">&lt;p&gt;Sdpampat: /* Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Servo is a prototype web browser engine written in the [https://en.wikipedia.org/wiki/Rust_(programming_language) Rust] language. Servo is a new, experimental browser that supports synchronously compiling and executing WebAssembly code, but does not yet support asynchronous compilation. This means that the entire WebAssembly program must be fetched before compilation can begin, which leads to longer time loading pages that run WebAssembly programs than in other web browsers. The goal of the project is to support compiling WebAssembly programs asynchronously so compilation can begin while the program is still being fetched from the network.&lt;br /&gt;
&lt;br /&gt;
=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
[https://en.wikipedia.org/wiki/Servo_(layout_engine) Servo]Servo is an open source prototype web browser layout engine being developed by Mozilla, and it is written in [https://www.rust-lang.org/ Rust] language. The main idea is to create a highly parallel environment, in which different components can be handled by fine grained, isolated tasks. The different components can be rendering, HTML parsing, etc. &lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
[https://doc.rust-lang.org/book/index.html Rust] is an open source systems programming language developed by Mozilla. Servo is written in Rust. The main purpose behind it's design is to be thread safe and concurrent. The emphasis is also on speed, safety and control of memory layout.&lt;br /&gt;
&lt;br /&gt;
=='''Scope'''==&lt;br /&gt;
&lt;br /&gt;
The scope of the project was to complete the initial steps mentioned [https://github.com/servo/servo/wiki/Asynchronous-WebAssembly-compilation-project here].&lt;br /&gt;
&lt;br /&gt;
The steps are as follows:&lt;br /&gt;
&lt;br /&gt;
* The project requirement initially stated that we build and Compile servo. Following are the steps for this:&lt;br /&gt;
Servo is built with [https://mail.mozilla.org/pipermail/rust-dev/2014-March/009090.html Cargo], the Rust package manager. Mozilla's Mach tools are used to orchestrate the build and other tasks.&lt;br /&gt;
&lt;br /&gt;
    git clone https://github.com/servo/servo&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --dev&lt;br /&gt;
    ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&lt;br /&gt;
* Create a rust JS::StreamConsumer wrapper that stores a pointer to the object and has methods for consumeChunk, streamEnd, streamError, and noteResponseURLs.&lt;br /&gt;
* Implement an extern &amp;quot;C&amp;quot; function in script_runtime.rs that matches ConsumeStreamCallback that initiates the streaming webassembly compilation then creates a wrapper for the stream consumer and stores it in the Response object&lt;br /&gt;
* Implement an extern &amp;quot;C&amp;quot; function in script_runtime.rs that matches ReportStreamErrorCallback and reports an error with the error! macro&lt;br /&gt;
* Lastly, call InitStreamConsumerCallback in new_rt_and_cx with the two new functions as arguments, described in the specifications&lt;br /&gt;
&lt;br /&gt;
The subsequent steps mentioned [https://github.com/servo/servo/wiki/Asynchronous-WebAssembly-compilation-project here] are to be done for the final project.&lt;br /&gt;
&lt;br /&gt;
=='''Design Pattern'''==&lt;br /&gt;
Design patterns are not applicable as our task involved just implementing a method. However, the Implementation section below provides details of the steps as why it was implemented, the way it was implemented&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
The following steps were followed to meet the project requirements as per this [https://github.com/servo/servo/wiki/Implement-support-for-missing-XMLHttpRequest-APIs github page].&lt;br /&gt;
&lt;br /&gt;
===Step 1===&lt;br /&gt;
&lt;br /&gt;
As we need to implement the overrideMimeType() method, we have uncommented the overrideMimeType() method from the XMLHttpRequest interface (components/script/dom/webidls/XMLHttpRequest.webidl).&lt;br /&gt;
&lt;br /&gt;
[[File:Uncomment-overrideMimeType.png]]&lt;br /&gt;
&lt;br /&gt;
===Step 2===&lt;br /&gt;
&lt;br /&gt;
As two new fields are necessary for overrideMimeType() method implementation, override_mime_type to store the mime type of the mime passed in the argument and override_charset to store the charset of the mime passed in the argument. &lt;br /&gt;
Hence, we have added two new fields: override_mime_type and override_charset to the XMLHttpRequest structure.&lt;br /&gt;
&lt;br /&gt;
[[File:XHRStruct.png]]&lt;br /&gt;
&lt;br /&gt;
===Step 3===&lt;br /&gt;
&lt;br /&gt;
Finally, we have implemented the overrideMimeType method according to the [https://xhr.spec.whatwg.org/#the-overridemimetype%28%29-method XHR specifications].&lt;br /&gt;
* If the state is loading or done, we have returned Invalid State Error&lt;br /&gt;
* Then we have parsed the mime passed in the argument&lt;br /&gt;
* If the parsing of mime was successful, we have saved the appropriate values in override_mime_type and override_charset&lt;br /&gt;
&lt;br /&gt;
[[File:overrideMimeType.png]]&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
&lt;br /&gt;
Unfortunately, the code added in the initial steps(scope) is not expected to have any change in behaviour on its own. The best we can do is to load https://wasm.bootcss.com/demo/Tanks/ and verify that there is no change in behaviour due to our changes.&lt;br /&gt;
&lt;br /&gt;
Eventhough we could not perform any kind of functional tests, we took steps to look out for compilation errors before raising the pull request.&lt;br /&gt;
&lt;br /&gt;
Following are the steps for the same:&lt;br /&gt;
&lt;br /&gt;
# Install the pre-requisites required for servo as mentioned [https://github.com/servo/servo/blob/master/README.md here] &lt;br /&gt;
# Run the following commands&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; &lt;br /&gt;
  cd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git clone https://github.com/Akash-Pateria/servo&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 cd servo&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git checkout -b origin/async-wasm-compilation-initial&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach fmt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach test-tidy&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach build -d&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can see that the servo build is successful and no errors are reported.&lt;br /&gt;
&lt;br /&gt;
=='''Pull Request'''==&lt;br /&gt;
&lt;br /&gt;
Here is our [https://github.com/servo/servo/pull/24563 pull request]. In the PR, you can see all the code snippets added to implement the above-mentioned steps.&lt;br /&gt;
&lt;br /&gt;
=='''Conclusion'''==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
1.    https://doc.rust-lang.org/book&amp;lt;br&amp;gt;&lt;br /&gt;
2.    https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;br&amp;gt;&lt;br /&gt;
3.    https://en.wikipedia.org/wiki/Servo_(layout_engine)&amp;lt;br&amp;gt;&lt;br /&gt;
4.    https://github.com/servo/servo/wiki/Asynchronous-WebAssembly-compilation-project&amp;lt;br&amp;gt;&lt;br /&gt;
6.    http://rustbyexample.com/&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sdpampat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_M1950._Support_Asynchronous_Web_Assembly_Compilation&amp;diff=125938</id>
		<title>CSC/ECE 517 Fall 2019 - M1950. Support Asynchronous Web Assembly Compilation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_M1950._Support_Asynchronous_Web_Assembly_Compilation&amp;diff=125938"/>
		<updated>2019-10-28T19:41:40Z</updated>

		<summary type="html">&lt;p&gt;Sdpampat: /* Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Servo is a prototype web browser engine written in the [https://en.wikipedia.org/wiki/Rust_(programming_language) Rust] language. Servo is a new, experimental browser that supports synchronously compiling and executing WebAssembly code, but does not yet support asynchronous compilation. This means that the entire WebAssembly program must be fetched before compilation can begin, which leads to longer time loading pages that run WebAssembly programs than in other web browsers. The goal of the project is to support compiling WebAssembly programs asynchronously so compilation can begin while the program is still being fetched from the network.&lt;br /&gt;
&lt;br /&gt;
=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
[https://en.wikipedia.org/wiki/Servo_(layout_engine) Servo]Servo is an open source prototype web browser layout engine being developed by Mozilla, and it is written in [https://www.rust-lang.org/ Rust] language. The main idea is to create a highly parallel environment, in which different components can be handled by fine grained, isolated tasks. The different components can be rendering, HTML parsing, etc. &lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
[https://doc.rust-lang.org/book/index.html Rust] is an open source systems programming language developed by Mozilla. Servo is written in Rust. The main purpose behind it's design is to be thread safe and concurrent. The emphasis is also on speed, safety and control of memory layout.&lt;br /&gt;
&lt;br /&gt;
=='''Scope'''==&lt;br /&gt;
&lt;br /&gt;
The scope of the project was to complete the initial steps mentioned [https://github.com/servo/servo/wiki/Asynchronous-WebAssembly-compilation-project here].&lt;br /&gt;
&lt;br /&gt;
The steps are as follows:&lt;br /&gt;
&lt;br /&gt;
* The project requirement initially stated that we build and Compile servo. Following are the steps for this:&lt;br /&gt;
Servo is built with [https://mail.mozilla.org/pipermail/rust-dev/2014-March/009090.html Cargo], the Rust package manager. Mozilla's Mach tools are used to orchestrate the build and other tasks.&lt;br /&gt;
&lt;br /&gt;
    git clone https://github.com/servo/servo&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --dev&lt;br /&gt;
    ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&lt;br /&gt;
* Create a rust JS::StreamConsumer wrapper that stores a pointer to the object and has methods for consumeChunk, streamEnd, streamError, and noteResponseURLs.&lt;br /&gt;
* Implement an extern &amp;quot;C&amp;quot; function in script_runtime.rs that matches ConsumeStreamCallback that initiates the streaming webassembly compilation then creates a wrapper for the stream consumer and stores it in the Response object&lt;br /&gt;
* Implement an extern &amp;quot;C&amp;quot; function in script_runtime.rs that matches ReportStreamErrorCallback and reports an error with the error! macro&lt;br /&gt;
* Lastly, call InitStreamConsumerCallback in new_rt_and_cx with the two new functions as arguments, described in the specifications&lt;br /&gt;
&lt;br /&gt;
The subsequent steps mentioned [https://github.com/servo/servo/wiki/Asynchronous-WebAssembly-compilation-project here] are to be done for the final project.&lt;br /&gt;
&lt;br /&gt;
=='''Design Pattern'''==&lt;br /&gt;
Design patterns are not applicable as our task involved just implementing a method. However, the Implementation section below provides details of the steps as why it was implemented, the way it was implemented&lt;br /&gt;
&lt;br /&gt;
=='''Implementation'''==&lt;br /&gt;
The following steps were followed to meet the project requirements as per this [https://github.com/servo/servo/wiki/Implement-support-for-missing-XMLHttpRequest-APIs github page].&lt;br /&gt;
&lt;br /&gt;
===Step 1===&lt;br /&gt;
&lt;br /&gt;
As we need to implement the overrideMimeType() method, we have uncommented the overrideMimeType() method from the XMLHttpRequest interface (components/script/dom/webidls/XMLHttpRequest.webidl).&lt;br /&gt;
&lt;br /&gt;
[[File:Uncomment-overrideMimeType.png]]&lt;br /&gt;
&lt;br /&gt;
===Step 2===&lt;br /&gt;
&lt;br /&gt;
As two new fields are necessary for overrideMimeType() method implementation, override_mime_type to store the mime type of the mime passed in the argument and override_charset to store the charset of the mime passed in the argument. &lt;br /&gt;
Hence, we have added two new fields: override_mime_type and override_charset to the XMLHttpRequest structure.&lt;br /&gt;
&lt;br /&gt;
[[File:XHRStruct.png]]&lt;br /&gt;
&lt;br /&gt;
===Step 3===&lt;br /&gt;
&lt;br /&gt;
Finally, we have implemented the overrideMimeType method according to the [https://xhr.spec.whatwg.org/#the-overridemimetype%28%29-method XHR specifications].&lt;br /&gt;
* If the state is loading or done, we have returned Invalid State Error&lt;br /&gt;
* Then we have parsed the mime passed in the argument&lt;br /&gt;
* If the parsing of mime was successful, we have saved the appropriate values in override_mime_type and override_charset&lt;br /&gt;
&lt;br /&gt;
[[File:overrideMimeType.png]]&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
&lt;br /&gt;
Unfortunately, the code added in the initial steps(scope) is not expected to have any change in behaviour on its own. The best we can do is to load https://wasm.bootcss.com/demo/Tanks/ and verify that there is no change in behaviour due to our changes.&lt;br /&gt;
&lt;br /&gt;
Eventhough we could not perform any kind of functional tests, we took steps to look out for compilation errors before raising the pull request.&lt;br /&gt;
&lt;br /&gt;
Following are the steps for the same:&lt;br /&gt;
&lt;br /&gt;
# Install the pre-requisites required for servo as mentioned [https://github.com/servo/servo/blob/master/README.md here] &lt;br /&gt;
# Run the following commands&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; &lt;br /&gt;
  cd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git clone https://github.com/Akash-Pateria/servo&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 cd servo&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git checkout -b origin/async-wasm-compilation-initial&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach fmt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach test-tidy&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach build -d&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can see that servo build is successful and no errors are reported.&lt;br /&gt;
&lt;br /&gt;
=='''Pull Request'''==&lt;br /&gt;
&lt;br /&gt;
Here is our [https://github.com/servo/servo/pull/24563 pull request]. In the PR, you can see all the code snippets added to implement the above-mentioned steps.&lt;br /&gt;
&lt;br /&gt;
=='''Conclusion'''==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
1.    https://doc.rust-lang.org/book&amp;lt;br&amp;gt;&lt;br /&gt;
2.    https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;br&amp;gt;&lt;br /&gt;
3.    https://en.wikipedia.org/wiki/Servo_(layout_engine)&amp;lt;br&amp;gt;&lt;br /&gt;
4.    https://github.com/servo/servo/wiki/Asynchronous-WebAssembly-compilation-project&amp;lt;br&amp;gt;&lt;br /&gt;
6.    http://rustbyexample.com/&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sdpampat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_M1950._Support_Asynchronous_Web_Assembly_Compilation&amp;diff=125932</id>
		<title>CSC/ECE 517 Fall 2019 - M1950. Support Asynchronous Web Assembly Compilation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_M1950._Support_Asynchronous_Web_Assembly_Compilation&amp;diff=125932"/>
		<updated>2019-10-28T19:28:02Z</updated>

		<summary type="html">&lt;p&gt;Sdpampat: /* Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Servo is a prototype web browser engine written in the [https://en.wikipedia.org/wiki/Rust_(programming_language) Rust] language. Servo is a new, experimental browser that supports synchronously compiling and executing WebAssembly code, but does not yet support asynchronous compilation. This means that the entire WebAssembly program must be fetched before compilation can begin, which leads to longer time loading pages that run WebAssembly programs than in other web browsers. The goal of the project is to support compiling WebAssembly programs asynchronously so compilation can begin while the program is still being fetched from the network.&lt;br /&gt;
&lt;br /&gt;
=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
[https://en.wikipedia.org/wiki/Servo_(layout_engine) Servo]Servo is an open source prototype web browser layout engine being developed by Mozilla, and it is written in [https://www.rust-lang.org/ Rust] language. The main idea is to create a highly parallel environment, in which different components can be handled by fine grained, isolated tasks. The different components can be rendering, HTML parsing, etc. &lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
[https://doc.rust-lang.org/book/index.html Rust] is an open source systems programming language developed by Mozilla. Servo is written in Rust. The main purpose behind it's design is to be thread safe and concurrent. The emphasis is also on speed, safety and control of memory layout.&lt;br /&gt;
&lt;br /&gt;
=='''Scope'''==&lt;br /&gt;
&lt;br /&gt;
The scope of the project was to complete the initial steps mentioned [https://github.com/servo/servo/wiki/Asynchronous-WebAssembly-compilation-project here].&lt;br /&gt;
&lt;br /&gt;
The steps are as follows:&lt;br /&gt;
&lt;br /&gt;
* The project requirement initially stated that we build and Compile servo. Following are the steps for this:&lt;br /&gt;
Servo is built with [https://mail.mozilla.org/pipermail/rust-dev/2014-March/009090.html Cargo], the Rust package manager. Mozilla's Mach tools are used to orchestrate the build and other tasks.&lt;br /&gt;
&lt;br /&gt;
    git clone https://github.com/servo/servo&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --dev&lt;br /&gt;
    ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&lt;br /&gt;
* Create a rust JS::StreamConsumer wrapper that stores a pointer to the object and has methods for consumeChunk, streamEnd, streamError, and noteResponseURLs.&lt;br /&gt;
* Implement an extern &amp;quot;C&amp;quot; function in script_runtime.rs that matches ConsumeStreamCallback that initiates the streaming webassembly compilation then creates a wrapper for the stream consumer and stores it in the Response object&lt;br /&gt;
* Implement an extern &amp;quot;C&amp;quot; function in script_runtime.rs that matches ReportStreamErrorCallback and reports an error with the error! macro&lt;br /&gt;
* Lastly, call InitStreamConsumerCallback in new_rt_and_cx with the two new functions as arguments, described in the specifications&lt;br /&gt;
&lt;br /&gt;
The subsequent steps mentioned [https://github.com/servo/servo/wiki/Asynchronous-WebAssembly-compilation-project here] are to be done for the final project.&lt;br /&gt;
&lt;br /&gt;
=='''Design Pattern'''==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
&lt;br /&gt;
Unfortunately, the code added in the initial steps(scope) is not expected to have any change in behaviour on its own. The best we can do is to load https://wasm.bootcss.com/demo/Tanks/ and verify that there is no change in behaviour due to our changes.&lt;br /&gt;
&lt;br /&gt;
Eventhough we could not perform any kind of functional tests, we took steps to look out for compilation errors before raising the pull request.&lt;br /&gt;
&lt;br /&gt;
Following are the steps for the same:&lt;br /&gt;
&lt;br /&gt;
# Install the pre-requisites required for servo as mentioned [https://github.com/servo/servo/blob/master/README.md here] &lt;br /&gt;
# Run the following commands&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; &lt;br /&gt;
  cd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git clone https://github.com/Akash-Pateria/servo&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 cd servo&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git checkout -b origin/async-wasm-compilation-initial&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach fmt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach test-tidy&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach build -d&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Pull Request'''==&lt;br /&gt;
&lt;br /&gt;
Here is our [https://github.com/servo/servo/pull/24563 pull request]. In the PR, you can see all the code snippets added to implement the above-mentioned steps.&lt;br /&gt;
&lt;br /&gt;
=='''Conclusion'''==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
1.    https://doc.rust-lang.org/book&amp;lt;br&amp;gt;&lt;br /&gt;
2.    https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;br&amp;gt;&lt;br /&gt;
3.    https://en.wikipedia.org/wiki/Servo_(layout_engine)&amp;lt;br&amp;gt;&lt;br /&gt;
4.    https://github.com/servo/servo/wiki/Asynchronous-WebAssembly-compilation-project&amp;lt;br&amp;gt;&lt;br /&gt;
6.    http://rustbyexample.com/&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sdpampat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_M1950._Support_Asynchronous_Web_Assembly_Compilation&amp;diff=125931</id>
		<title>CSC/ECE 517 Fall 2019 - M1950. Support Asynchronous Web Assembly Compilation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_M1950._Support_Asynchronous_Web_Assembly_Compilation&amp;diff=125931"/>
		<updated>2019-10-28T19:27:28Z</updated>

		<summary type="html">&lt;p&gt;Sdpampat: /* Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Servo is a prototype web browser engine written in the [https://en.wikipedia.org/wiki/Rust_(programming_language) Rust] language. Servo is a new, experimental browser that supports synchronously compiling and executing WebAssembly code, but does not yet support asynchronous compilation. This means that the entire WebAssembly program must be fetched before compilation can begin, which leads to longer time loading pages that run WebAssembly programs than in other web browsers. The goal of the project is to support compiling WebAssembly programs asynchronously so compilation can begin while the program is still being fetched from the network.&lt;br /&gt;
&lt;br /&gt;
=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
[https://en.wikipedia.org/wiki/Servo_(layout_engine) Servo]Servo is an open source prototype web browser layout engine being developed by Mozilla, and it is written in [https://www.rust-lang.org/ Rust] language. The main idea is to create a highly parallel environment, in which different components can be handled by fine grained, isolated tasks. The different components can be rendering, HTML parsing, etc. &lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
[https://doc.rust-lang.org/book/index.html Rust] is an open source systems programming language developed by Mozilla. Servo is written in Rust. The main purpose behind it's design is to be thread safe and concurrent. The emphasis is also on speed, safety and control of memory layout.&lt;br /&gt;
&lt;br /&gt;
=='''Scope'''==&lt;br /&gt;
&lt;br /&gt;
The scope of the project was to complete the initial steps mentioned [https://github.com/servo/servo/wiki/Asynchronous-WebAssembly-compilation-project here].&lt;br /&gt;
&lt;br /&gt;
The steps are as follows:&lt;br /&gt;
&lt;br /&gt;
* The project requirement initially stated that we build and Compile servo. Following are the steps for this:&lt;br /&gt;
Servo is built with [https://mail.mozilla.org/pipermail/rust-dev/2014-March/009090.html Cargo], the Rust package manager. Mozilla's Mach tools are used to orchestrate the build and other tasks.&lt;br /&gt;
&lt;br /&gt;
    git clone https://github.com/servo/servo&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --dev&lt;br /&gt;
    ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&lt;br /&gt;
* Create a rust JS::StreamConsumer wrapper that stores a pointer to the object and has methods for consumeChunk, streamEnd, streamError, and noteResponseURLs.&lt;br /&gt;
* Implement an extern &amp;quot;C&amp;quot; function in script_runtime.rs that matches ConsumeStreamCallback that initiates the streaming webassembly compilation then creates a wrapper for the stream consumer and stores it in the Response object&lt;br /&gt;
* Implement an extern &amp;quot;C&amp;quot; function in script_runtime.rs that matches ReportStreamErrorCallback and reports an error with the error! macro&lt;br /&gt;
* Lastly, call InitStreamConsumerCallback in new_rt_and_cx with the two new functions as arguments, described in the specifications&lt;br /&gt;
&lt;br /&gt;
The subsequent steps mentioned [https://github.com/servo/servo/wiki/Asynchronous-WebAssembly-compilation-project here] are to be done for the final project.&lt;br /&gt;
&lt;br /&gt;
=='''Design Pattern'''==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
&lt;br /&gt;
Unfortunately, the code added in the initial steps(scope) is not expected to have any change in behaviour on its own. The best we can do is to load https://wasm.bootcss.com/demo/Tanks/ and verify that there is no change in behaviour due to our changes.&lt;br /&gt;
&lt;br /&gt;
Eventhough we could not perform any kind of functional tests, we took steps to look out for compilation error before raising the pull request.&lt;br /&gt;
&lt;br /&gt;
Following are the steps for the same:&lt;br /&gt;
&lt;br /&gt;
# Install the pre-requisites required for servo as mentioned [https://github.com/servo/servo/blob/master/README.md here] &lt;br /&gt;
# Run the following commands&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; &lt;br /&gt;
  cd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git clone https://github.com/Akash-Pateria/servo&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 cd servo&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git checkout -b origin/async-wasm-compilation-initial&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach fmt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach test-tidy&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach build -d&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Pull Request'''==&lt;br /&gt;
&lt;br /&gt;
Here is our [https://github.com/servo/servo/pull/24563 pull request]. In the PR, you can see all the code snippets added to implement the above-mentioned steps.&lt;br /&gt;
&lt;br /&gt;
=='''Conclusion'''==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
1.    https://doc.rust-lang.org/book&amp;lt;br&amp;gt;&lt;br /&gt;
2.    https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;br&amp;gt;&lt;br /&gt;
3.    https://en.wikipedia.org/wiki/Servo_(layout_engine)&amp;lt;br&amp;gt;&lt;br /&gt;
4.    https://github.com/servo/servo/wiki/Asynchronous-WebAssembly-compilation-project&amp;lt;br&amp;gt;&lt;br /&gt;
6.    http://rustbyexample.com/&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sdpampat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_M1950._Support_Asynchronous_Web_Assembly_Compilation&amp;diff=125930</id>
		<title>CSC/ECE 517 Fall 2019 - M1950. Support Asynchronous Web Assembly Compilation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_M1950._Support_Asynchronous_Web_Assembly_Compilation&amp;diff=125930"/>
		<updated>2019-10-28T19:25:45Z</updated>

		<summary type="html">&lt;p&gt;Sdpampat: /* Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Servo is a prototype web browser engine written in the [https://en.wikipedia.org/wiki/Rust_(programming_language) Rust] language. Servo is a new, experimental browser that supports synchronously compiling and executing WebAssembly code, but does not yet support asynchronous compilation. This means that the entire WebAssembly program must be fetched before compilation can begin, which leads to longer time loading pages that run WebAssembly programs than in other web browsers. The goal of the project is to support compiling WebAssembly programs asynchronously so compilation can begin while the program is still being fetched from the network.&lt;br /&gt;
&lt;br /&gt;
=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
[https://en.wikipedia.org/wiki/Servo_(layout_engine) Servo]Servo is an open source prototype web browser layout engine being developed by Mozilla, and it is written in [https://www.rust-lang.org/ Rust] language. The main idea is to create a highly parallel environment, in which different components can be handled by fine grained, isolated tasks. The different components can be rendering, HTML parsing, etc. &lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
[https://doc.rust-lang.org/book/index.html Rust] is an open source systems programming language developed by Mozilla. Servo is written in Rust. The main purpose behind it's design is to be thread safe and concurrent. The emphasis is also on speed, safety and control of memory layout.&lt;br /&gt;
&lt;br /&gt;
=='''Scope'''==&lt;br /&gt;
&lt;br /&gt;
The scope of the project was to complete the initial steps mentioned [https://github.com/servo/servo/wiki/Asynchronous-WebAssembly-compilation-project here].&lt;br /&gt;
&lt;br /&gt;
The steps are as follows:&lt;br /&gt;
&lt;br /&gt;
* The project requirement initially stated that we build and Compile servo. Following are the steps for this:&lt;br /&gt;
Servo is built with [https://mail.mozilla.org/pipermail/rust-dev/2014-March/009090.html Cargo], the Rust package manager. Mozilla's Mach tools are used to orchestrate the build and other tasks.&lt;br /&gt;
&lt;br /&gt;
    git clone https://github.com/servo/servo&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --dev&lt;br /&gt;
    ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&lt;br /&gt;
* Create a rust JS::StreamConsumer wrapper that stores a pointer to the object and has methods for consumeChunk, streamEnd, streamError, and noteResponseURLs.&lt;br /&gt;
* Implement an extern &amp;quot;C&amp;quot; function in script_runtime.rs that matches ConsumeStreamCallback that initiates the streaming webassembly compilation then creates a wrapper for the stream consumer and stores it in the Response object&lt;br /&gt;
* Implement an extern &amp;quot;C&amp;quot; function in script_runtime.rs that matches ReportStreamErrorCallback and reports an error with the error! macro&lt;br /&gt;
* Lastly, call InitStreamConsumerCallback in new_rt_and_cx with the two new functions as arguments, described in the specifications&lt;br /&gt;
&lt;br /&gt;
The subsequent steps mentioned [https://github.com/servo/servo/wiki/Asynchronous-WebAssembly-compilation-project here] are to be done for the final project.&lt;br /&gt;
&lt;br /&gt;
=='''Design Pattern'''==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
&lt;br /&gt;
Unfortunately, the code added in the initial steps(scope) is not expected to have any change in behaviour on its own. The best we can do is to load https://wasm.bootcss.com/demo/Tanks/ and verify that there is no change in behaviour due to our changes.&lt;br /&gt;
&lt;br /&gt;
Following are the steps to run all the tests for XMLHttpRequest:&lt;br /&gt;
&lt;br /&gt;
# Install the pre-requisites required for servo as mentioned [https://github.com/servo/servo/blob/master/README.md here] &lt;br /&gt;
# Run the following commands&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; &lt;br /&gt;
  cd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git clone https://github.com/Akash-Pateria/servo&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 cd servo&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git checkout -b origin/async-wasm-compilation-initial&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach fmt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach test-tidy&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach build -d&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Pull Request'''==&lt;br /&gt;
&lt;br /&gt;
Here is our [https://github.com/servo/servo/pull/24563 pull request]. In the PR, you can see all the code snippets added to implement the above-mentioned steps.&lt;br /&gt;
&lt;br /&gt;
=='''Conclusion'''==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
1.    https://doc.rust-lang.org/book&amp;lt;br&amp;gt;&lt;br /&gt;
2.    https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;br&amp;gt;&lt;br /&gt;
3.    https://en.wikipedia.org/wiki/Servo_(layout_engine)&amp;lt;br&amp;gt;&lt;br /&gt;
4.    https://github.com/servo/servo/wiki/Asynchronous-WebAssembly-compilation-project&amp;lt;br&amp;gt;&lt;br /&gt;
6.    http://rustbyexample.com/&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sdpampat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_M1950._Support_Asynchronous_Web_Assembly_Compilation&amp;diff=125929</id>
		<title>CSC/ECE 517 Fall 2019 - M1950. Support Asynchronous Web Assembly Compilation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_M1950._Support_Asynchronous_Web_Assembly_Compilation&amp;diff=125929"/>
		<updated>2019-10-28T19:25:23Z</updated>

		<summary type="html">&lt;p&gt;Sdpampat: /* Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Servo is a prototype web browser engine written in the [https://en.wikipedia.org/wiki/Rust_(programming_language) Rust] language. Servo is a new, experimental browser that supports synchronously compiling and executing WebAssembly code, but does not yet support asynchronous compilation. This means that the entire WebAssembly program must be fetched before compilation can begin, which leads to longer time loading pages that run WebAssembly programs than in other web browsers. The goal of the project is to support compiling WebAssembly programs asynchronously so compilation can begin while the program is still being fetched from the network.&lt;br /&gt;
&lt;br /&gt;
=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
[https://en.wikipedia.org/wiki/Servo_(layout_engine) Servo]Servo is an open source prototype web browser layout engine being developed by Mozilla, and it is written in [https://www.rust-lang.org/ Rust] language. The main idea is to create a highly parallel environment, in which different components can be handled by fine grained, isolated tasks. The different components can be rendering, HTML parsing, etc. &lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
[https://doc.rust-lang.org/book/index.html Rust] is an open source systems programming language developed by Mozilla. Servo is written in Rust. The main purpose behind it's design is to be thread safe and concurrent. The emphasis is also on speed, safety and control of memory layout.&lt;br /&gt;
&lt;br /&gt;
=='''Scope'''==&lt;br /&gt;
&lt;br /&gt;
The scope of the project was to complete the initial steps mentioned [https://github.com/servo/servo/wiki/Asynchronous-WebAssembly-compilation-project here].&lt;br /&gt;
&lt;br /&gt;
The steps are as follows:&lt;br /&gt;
&lt;br /&gt;
* The project requirement initially stated that we build and Compile servo. Following are the steps for this:&lt;br /&gt;
Servo is built with [https://mail.mozilla.org/pipermail/rust-dev/2014-March/009090.html Cargo], the Rust package manager. Mozilla's Mach tools are used to orchestrate the build and other tasks.&lt;br /&gt;
&lt;br /&gt;
    git clone https://github.com/servo/servo&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --dev&lt;br /&gt;
    ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&lt;br /&gt;
* Create a rust JS::StreamConsumer wrapper that stores a pointer to the object and has methods for consumeChunk, streamEnd, streamError, and noteResponseURLs.&lt;br /&gt;
* Implement an extern &amp;quot;C&amp;quot; function in script_runtime.rs that matches ConsumeStreamCallback that initiates the streaming webassembly compilation then creates a wrapper for the stream consumer and stores it in the Response object&lt;br /&gt;
* Implement an extern &amp;quot;C&amp;quot; function in script_runtime.rs that matches ReportStreamErrorCallback and reports an error with the error! macro&lt;br /&gt;
* Lastly, call InitStreamConsumerCallback in new_rt_and_cx with the two new functions as arguments, described in the specifications&lt;br /&gt;
&lt;br /&gt;
The subsequent steps mentioned [https://github.com/servo/servo/wiki/Asynchronous-WebAssembly-compilation-project here] are to be done for the final project.&lt;br /&gt;
&lt;br /&gt;
=='''Design Pattern'''==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
&lt;br /&gt;
Unfortunately, the code added in the initial steps(scope) is not expected to have any change in behaviour on its own. The best we can do is to load https://wasm.bootcss.com/demo/Tanks/ and verify that there is no change in behaviour due to our changes.&lt;br /&gt;
&lt;br /&gt;
Following are the steps to run all the tests for XMLHttpRequest:&lt;br /&gt;
&lt;br /&gt;
# Install the pre-requisites required for servo as mentioned [https://github.com/servo/servo/blob/master/README.md here] &lt;br /&gt;
# Run the following commands&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; &lt;br /&gt;
  cd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git clone https://github.com/Akash-Pateria/servo&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 cd servo&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git checkout -b origin/async-wasm-compilation-initial&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach fmt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach test-tidy&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
./mach build -d&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Pull Request'''==&lt;br /&gt;
&lt;br /&gt;
Here is our [https://github.com/servo/servo/pull/24563 pull request]. In the PR, you can see all the code snippets added to implement the above-mentioned steps.&lt;br /&gt;
&lt;br /&gt;
=='''Conclusion'''==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
1.    https://doc.rust-lang.org/book&amp;lt;br&amp;gt;&lt;br /&gt;
2.    https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;br&amp;gt;&lt;br /&gt;
3.    https://en.wikipedia.org/wiki/Servo_(layout_engine)&amp;lt;br&amp;gt;&lt;br /&gt;
4.    https://github.com/servo/servo/wiki/Asynchronous-WebAssembly-compilation-project&amp;lt;br&amp;gt;&lt;br /&gt;
6.    http://rustbyexample.com/&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sdpampat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_M1950._Support_Asynchronous_Web_Assembly_Compilation&amp;diff=125928</id>
		<title>CSC/ECE 517 Fall 2019 - M1950. Support Asynchronous Web Assembly Compilation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_M1950._Support_Asynchronous_Web_Assembly_Compilation&amp;diff=125928"/>
		<updated>2019-10-28T19:25:09Z</updated>

		<summary type="html">&lt;p&gt;Sdpampat: /* Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Servo is a prototype web browser engine written in the [https://en.wikipedia.org/wiki/Rust_(programming_language) Rust] language. Servo is a new, experimental browser that supports synchronously compiling and executing WebAssembly code, but does not yet support asynchronous compilation. This means that the entire WebAssembly program must be fetched before compilation can begin, which leads to longer time loading pages that run WebAssembly programs than in other web browsers. The goal of the project is to support compiling WebAssembly programs asynchronously so compilation can begin while the program is still being fetched from the network.&lt;br /&gt;
&lt;br /&gt;
=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
[https://en.wikipedia.org/wiki/Servo_(layout_engine) Servo]Servo is an open source prototype web browser layout engine being developed by Mozilla, and it is written in [https://www.rust-lang.org/ Rust] language. The main idea is to create a highly parallel environment, in which different components can be handled by fine grained, isolated tasks. The different components can be rendering, HTML parsing, etc. &lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
[https://doc.rust-lang.org/book/index.html Rust] is an open source systems programming language developed by Mozilla. Servo is written in Rust. The main purpose behind it's design is to be thread safe and concurrent. The emphasis is also on speed, safety and control of memory layout.&lt;br /&gt;
&lt;br /&gt;
=='''Scope'''==&lt;br /&gt;
&lt;br /&gt;
The scope of the project was to complete the initial steps mentioned [https://github.com/servo/servo/wiki/Asynchronous-WebAssembly-compilation-project here].&lt;br /&gt;
&lt;br /&gt;
The steps are as follows:&lt;br /&gt;
&lt;br /&gt;
* The project requirement initially stated that we build and Compile servo. Following are the steps for this:&lt;br /&gt;
Servo is built with [https://mail.mozilla.org/pipermail/rust-dev/2014-March/009090.html Cargo], the Rust package manager. Mozilla's Mach tools are used to orchestrate the build and other tasks.&lt;br /&gt;
&lt;br /&gt;
    git clone https://github.com/servo/servo&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --dev&lt;br /&gt;
    ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&lt;br /&gt;
* Create a rust JS::StreamConsumer wrapper that stores a pointer to the object and has methods for consumeChunk, streamEnd, streamError, and noteResponseURLs.&lt;br /&gt;
* Implement an extern &amp;quot;C&amp;quot; function in script_runtime.rs that matches ConsumeStreamCallback that initiates the streaming webassembly compilation then creates a wrapper for the stream consumer and stores it in the Response object&lt;br /&gt;
* Implement an extern &amp;quot;C&amp;quot; function in script_runtime.rs that matches ReportStreamErrorCallback and reports an error with the error! macro&lt;br /&gt;
* Lastly, call InitStreamConsumerCallback in new_rt_and_cx with the two new functions as arguments, described in the specifications&lt;br /&gt;
&lt;br /&gt;
The subsequent steps mentioned [https://github.com/servo/servo/wiki/Asynchronous-WebAssembly-compilation-project here] are to be done for the final project.&lt;br /&gt;
&lt;br /&gt;
=='''Design Pattern'''==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
&lt;br /&gt;
Unfortunately, the code added in the initial steps(scope) is not expected to have any change in behaviour on its own. The best we can do is to load https://wasm.bootcss.com/demo/Tanks/ and verify that there is no change in behaviour due to our changes.&lt;br /&gt;
&lt;br /&gt;
Following are the steps to run all the tests for XMLHttpRequest:&lt;br /&gt;
&lt;br /&gt;
# Install the pre-requisites required for servo as mentioned [https://github.com/servo/servo/blob/master/README.md here] &lt;br /&gt;
# Run the following commands&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; &lt;br /&gt;
  cd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git clone https://github.com/Akash-Pateria/servo&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 cd servo&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git checkout -b origin/async-wasm-compilation-initial&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach fmt&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 ./mach test-tidy&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
./mach build -d&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Pull Request'''==&lt;br /&gt;
&lt;br /&gt;
Here is our [https://github.com/servo/servo/pull/24563 pull request]. In the PR, you can see all the code snippets added to implement the above-mentioned steps.&lt;br /&gt;
&lt;br /&gt;
=='''Conclusion'''==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
1.    https://doc.rust-lang.org/book&amp;lt;br&amp;gt;&lt;br /&gt;
2.    https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;br&amp;gt;&lt;br /&gt;
3.    https://en.wikipedia.org/wiki/Servo_(layout_engine)&amp;lt;br&amp;gt;&lt;br /&gt;
4.    https://github.com/servo/servo/wiki/Asynchronous-WebAssembly-compilation-project&amp;lt;br&amp;gt;&lt;br /&gt;
6.    http://rustbyexample.com/&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sdpampat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_M1950._Support_Asynchronous_Web_Assembly_Compilation&amp;diff=125925</id>
		<title>CSC/ECE 517 Fall 2019 - M1950. Support Asynchronous Web Assembly Compilation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_M1950._Support_Asynchronous_Web_Assembly_Compilation&amp;diff=125925"/>
		<updated>2019-10-28T19:17:01Z</updated>

		<summary type="html">&lt;p&gt;Sdpampat: /* Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Servo is a prototype web browser engine written in the [https://en.wikipedia.org/wiki/Rust_(programming_language) Rust] language. Servo is a new, experimental browser that supports synchronously compiling and executing WebAssembly code, but does not yet support asynchronous compilation. This means that the entire WebAssembly program must be fetched before compilation can begin, which leads to longer time loading pages that run WebAssembly programs than in other web browsers. The goal of the project is to support compiling WebAssembly programs asynchronously so compilation can begin while the program is still being fetched from the network.&lt;br /&gt;
&lt;br /&gt;
=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
[https://en.wikipedia.org/wiki/Servo_(layout_engine) Servo]Servo is an open source prototype web browser layout engine being developed by Mozilla, and it is written in [https://www.rust-lang.org/ Rust] language. The main idea is to create a highly parallel environment, in which different components can be handled by fine grained, isolated tasks. The different components can be rendering, HTML parsing, etc. &lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
[https://doc.rust-lang.org/book/index.html Rust] is an open source systems programming language developed by Mozilla. Servo is written in Rust. The main purpose behind it's design is to be thread safe and concurrent. The emphasis is also on speed, safety and control of memory layout.&lt;br /&gt;
&lt;br /&gt;
=='''Scope'''==&lt;br /&gt;
&lt;br /&gt;
The scope of the project was to complete the initial steps mentioned [https://github.com/servo/servo/wiki/Asynchronous-WebAssembly-compilation-project here].&lt;br /&gt;
&lt;br /&gt;
The steps are as follows:&lt;br /&gt;
&lt;br /&gt;
* The project requirement initially stated that we build and Compile servo. Following are the steps for this:&lt;br /&gt;
Servo is built with [https://mail.mozilla.org/pipermail/rust-dev/2014-March/009090.html Cargo], the Rust package manager. Mozilla's Mach tools are used to orchestrate the build and other tasks.&lt;br /&gt;
&lt;br /&gt;
    git clone https://github.com/servo/servo&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --dev&lt;br /&gt;
    ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&lt;br /&gt;
* Create a rust JS::StreamConsumer wrapper that stores a pointer to the object and has methods for consumeChunk, streamEnd, streamError, and noteResponseURLs.&lt;br /&gt;
* Implement an extern &amp;quot;C&amp;quot; function in script_runtime.rs that matches ConsumeStreamCallback that initiates the streaming webassembly compilation then creates a wrapper for the stream consumer and stores it in the Response object&lt;br /&gt;
* Implement an extern &amp;quot;C&amp;quot; function in script_runtime.rs that matches ReportStreamErrorCallback and reports an error with the error! macro&lt;br /&gt;
* Lastly, call InitStreamConsumerCallback in new_rt_and_cx with the two new functions as arguments, described in the specifications&lt;br /&gt;
&lt;br /&gt;
The subsequent steps mentioned [https://github.com/servo/servo/wiki/Asynchronous-WebAssembly-compilation-project here] are to be done for the final project.&lt;br /&gt;
&lt;br /&gt;
=='''Design Pattern'''==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
&lt;br /&gt;
Unfortunately, the code added in the initial steps(scope) is not expected to have any change in behaviour on its own. The best we can do is to load https://wasm.bootcss.com/demo/Tanks/ and verify that there is no change in behaviour due to our changes.&lt;br /&gt;
&lt;br /&gt;
Following are the steps to run all the tests for XMLHttpRequest:&lt;br /&gt;
&lt;br /&gt;
# Install the pre-requisites required for servo as mentioned [https://github.com/servo/servo/blob/master/README.md here] &lt;br /&gt;
# Run the following commands&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; &lt;br /&gt;
  cd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git clone https://github.com/shubham-pampattiwar/servo&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 cd servo&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git checkout -b origin/async-wasm-compilation-initial&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Pull Request'''==&lt;br /&gt;
&lt;br /&gt;
Here is our [https://github.com/servo/servo/pull/24563 pull request]. In the PR, you can see all the code snippets added to implement the above-mentioned steps.&lt;br /&gt;
&lt;br /&gt;
=='''Conclusion'''==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
1.    https://doc.rust-lang.org/book&amp;lt;br&amp;gt;&lt;br /&gt;
2.    https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;br&amp;gt;&lt;br /&gt;
3.    https://en.wikipedia.org/wiki/Servo_(layout_engine)&amp;lt;br&amp;gt;&lt;br /&gt;
4.    https://github.com/servo/servo/wiki/Asynchronous-WebAssembly-compilation-project&amp;lt;br&amp;gt;&lt;br /&gt;
6.    http://rustbyexample.com/&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sdpampat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_M1950._Support_Asynchronous_Web_Assembly_Compilation&amp;diff=125924</id>
		<title>CSC/ECE 517 Fall 2019 - M1950. Support Asynchronous Web Assembly Compilation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_M1950._Support_Asynchronous_Web_Assembly_Compilation&amp;diff=125924"/>
		<updated>2019-10-28T19:16:37Z</updated>

		<summary type="html">&lt;p&gt;Sdpampat: /* Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Servo is a prototype web browser engine written in the [https://en.wikipedia.org/wiki/Rust_(programming_language) Rust] language. Servo is a new, experimental browser that supports synchronously compiling and executing WebAssembly code, but does not yet support asynchronous compilation. This means that the entire WebAssembly program must be fetched before compilation can begin, which leads to longer time loading pages that run WebAssembly programs than in other web browsers. The goal of the project is to support compiling WebAssembly programs asynchronously so compilation can begin while the program is still being fetched from the network.&lt;br /&gt;
&lt;br /&gt;
=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
[https://en.wikipedia.org/wiki/Servo_(layout_engine) Servo]Servo is an open source prototype web browser layout engine being developed by Mozilla, and it is written in [https://www.rust-lang.org/ Rust] language. The main idea is to create a highly parallel environment, in which different components can be handled by fine grained, isolated tasks. The different components can be rendering, HTML parsing, etc. &lt;br /&gt;
&lt;br /&gt;
===Rust===&lt;br /&gt;
[https://doc.rust-lang.org/book/index.html Rust] is an open source systems programming language developed by Mozilla. Servo is written in Rust. The main purpose behind it's design is to be thread safe and concurrent. The emphasis is also on speed, safety and control of memory layout.&lt;br /&gt;
&lt;br /&gt;
=='''Scope'''==&lt;br /&gt;
&lt;br /&gt;
The scope of the project was to complete the initial steps mentioned [https://github.com/servo/servo/wiki/Asynchronous-WebAssembly-compilation-project here].&lt;br /&gt;
&lt;br /&gt;
The steps are as follows:&lt;br /&gt;
&lt;br /&gt;
* The project requirement initially stated that we build and Compile servo. Following are the steps for this:&lt;br /&gt;
Servo is built with [https://mail.mozilla.org/pipermail/rust-dev/2014-March/009090.html Cargo], the Rust package manager. Mozilla's Mach tools are used to orchestrate the build and other tasks.&lt;br /&gt;
&lt;br /&gt;
    git clone https://github.com/servo/servo&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build --dev&lt;br /&gt;
    ./mach run tests/html/about-mozilla.html&lt;br /&gt;
&lt;br /&gt;
* Create a rust JS::StreamConsumer wrapper that stores a pointer to the object and has methods for consumeChunk, streamEnd, streamError, and noteResponseURLs.&lt;br /&gt;
* Implement an extern &amp;quot;C&amp;quot; function in script_runtime.rs that matches ConsumeStreamCallback that initiates the streaming webassembly compilation then creates a wrapper for the stream consumer and stores it in the Response object&lt;br /&gt;
* Implement an extern &amp;quot;C&amp;quot; function in script_runtime.rs that matches ReportStreamErrorCallback and reports an error with the error! macro&lt;br /&gt;
* Lastly, call InitStreamConsumerCallback in new_rt_and_cx with the two new functions as arguments, described in the specifications&lt;br /&gt;
&lt;br /&gt;
The subsequent steps mentioned [https://github.com/servo/servo/wiki/Asynchronous-WebAssembly-compilation-project here] are to be done for the final project.&lt;br /&gt;
&lt;br /&gt;
=='''Design Pattern'''==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
&lt;br /&gt;
Unfortunately, the code added in the initial steps(scope) is not expected to have any change in behaviour on its own. The best we can do is to load https://wasm.bootcss.com/demo/Tanks/ and verify that there is no change in behaviour due to our changes.&lt;br /&gt;
&lt;br /&gt;
Following are the steps to run all the tests for XMLHttpRequest:&lt;br /&gt;
&lt;br /&gt;
# Install the pre-requisites required for servo as mentioned [https://github.com/servo/servo/blob/master/README.md here] &lt;br /&gt;
# Run the following commands&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; &lt;br /&gt;
  cd&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git clone https://github.com/shubham-pampattiwar/servo&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 cd servo&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 git checkout -b origin/async-wasm-compilation-initial&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Pull Request'''==&lt;br /&gt;
&lt;br /&gt;
Here is our [https://github.com/servo/servo/pull/24563 pull request]. In the PR, you can see all the code snippets added to implement the above-mentioned steps.&lt;br /&gt;
&lt;br /&gt;
=='''Conclusion'''==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
1.    https://doc.rust-lang.org/book&amp;lt;br&amp;gt;&lt;br /&gt;
2.    https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;br&amp;gt;&lt;br /&gt;
3.    https://en.wikipedia.org/wiki/Servo_(layout_engine)&amp;lt;br&amp;gt;&lt;br /&gt;
4.    https://github.com/servo/servo/wiki/Asynchronous-WebAssembly-compilation-project&amp;lt;br&amp;gt;&lt;br /&gt;
6.    http://rustbyexample.com/&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sdpampat</name></author>
	</entry>
</feed>