<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://homeostasis.scs.carleton.ca/wiki/index.php?action=history&amp;feed=atom&amp;title=WebFund_2016W_Lecture_23</id>
	<title>WebFund 2016W Lecture 23 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://homeostasis.scs.carleton.ca/wiki/index.php?action=history&amp;feed=atom&amp;title=WebFund_2016W_Lecture_23"/>
	<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=WebFund_2016W_Lecture_23&amp;action=history"/>
	<updated>2026-05-12T22:08:06Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=WebFund_2016W_Lecture_23&amp;diff=20950&amp;oldid=prev</id>
		<title>Zero: Defined CDN.</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=WebFund_2016W_Lecture_23&amp;diff=20950&amp;oldid=prev"/>
		<updated>2016-04-11T17:34:54Z</updated>

		<summary type="html">&lt;p&gt;Defined CDN.&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 17:34, 11 April 2016&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l272&quot;&gt;Line 272:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 272:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;****If it&amp;#039;s more than 50 milliseconds or half a second, people will notice&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;****If it&amp;#039;s more than 50 milliseconds or half a second, people will notice&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*So if you want fast access to your web server worldwide&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*So if you want fast access to your web server worldwide&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;**You need to replicate across the globe&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;**You need to replicate across the globe &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;(this is what a CDN/content delivery network does)&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;**Be close to your clients&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;**Be close to your clients&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*In general, the more the functionality a database will have, the longer it will take&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*In general, the more the functionality a database will have, the longer it will take&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Zero</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=WebFund_2016W_Lecture_23&amp;diff=20949&amp;oldid=prev</id>
		<title>Zero: InfiniBand can be sub-microsecond, as far as I know it&#039;s mostly what&#039;s being used for supercomputer networking.</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=WebFund_2016W_Lecture_23&amp;diff=20949&amp;oldid=prev"/>
		<updated>2016-04-11T17:31:32Z</updated>

		<summary type="html">&lt;p&gt;InfiniBand can be sub-microsecond, as far as I know it&amp;#039;s mostly what&amp;#039;s being used for supercomputer networking.&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 17:31, 11 April 2016&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l260&quot;&gt;Line 260:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 260:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*Latency is hard so,&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*Latency is hard so,&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;**A “supercoumputer” is one with low latency memory access, for lots of memory.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;**A “supercoumputer” is one with low latency memory access, for lots of memory.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;***So it has to have fast interconnects between the nodes. Fast meaning low latency, not high bandwidth.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;***So it has to have &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[https://www.mellanox.com/page/performance_infiniband &lt;/ins&gt;fast interconnects between the nodes&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;]&lt;/ins&gt;. Fast meaning low latency, not high bandwidth.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;***Thus, accesses to different nodes aren&amp;#039;t much slower than local accesses&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;***Thus, accesses to different nodes aren&amp;#039;t much slower than local accesses&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*Challenge for large web apps is having the database answer queries with low latency&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*Challenge for large web apps is having the database answer queries with low latency&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Zero</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=WebFund_2016W_Lecture_23&amp;diff=20933&amp;oldid=prev</id>
		<title>LeeCroft at 05:03, 7 April 2016</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=WebFund_2016W_Lecture_23&amp;diff=20933&amp;oldid=prev"/>
		<updated>2016-04-07T05:03:26Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;a href=&quot;https://homeostasis.scs.carleton.ca/wiki/index.php?title=WebFund_2016W_Lecture_23&amp;amp;diff=20933&amp;amp;oldid=20919&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>LeeCroft</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=WebFund_2016W_Lecture_23&amp;diff=20919&amp;oldid=prev</id>
		<title>Soma: /* Code */</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=WebFund_2016W_Lecture_23&amp;diff=20919&amp;oldid=prev"/>
		<updated>2016-04-06T03:31:31Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Code&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 03:31, 6 April 2016&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l118&quot;&gt;Line 118:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 118:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Code==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Code==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[http://homeostasis.scs.carleton.ca/~soma/webfund-2016w/code/analyzeLogs-filecount.zip analyzeLogs-filecount]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/ins&gt;[http://homeostasis.scs.carleton.ca/~soma/webfund-2016w/code/analyzeLogs-filecount.zip analyzeLogs-filecount]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Note this version has node_modules removed; copy this directory from analyzeLogs-sol or run &amp;quot;npm install&amp;quot;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Note this version has node_modules removed; copy this directory from analyzeLogs-sol or run &amp;quot;npm install&amp;quot;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Soma</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=WebFund_2016W_Lecture_23&amp;diff=20918&amp;oldid=prev</id>
		<title>Soma: Created page with &quot;==Video==  The video from the lecture given on April 5, 2016 [http://homeostasis.scs.carleton.ca/~soma/webfund-2016w/lectures/comp2406-2016w-lec23-05Apr2016.mp4 is now availab...&quot;</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=WebFund_2016W_Lecture_23&amp;diff=20918&amp;oldid=prev"/>
		<updated>2016-04-06T03:31:16Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;==Video==  The video from the lecture given on April 5, 2016 [http://homeostasis.scs.carleton.ca/~soma/webfund-2016w/lectures/comp2406-2016w-lec23-05Apr2016.mp4 is now availab...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Video==&lt;br /&gt;
&lt;br /&gt;
The video from the lecture given on April 5, 2016 [http://homeostasis.scs.carleton.ca/~soma/webfund-2016w/lectures/comp2406-2016w-lec23-05Apr2016.mp4 is now available].&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
&lt;br /&gt;
===In class===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Lecture 23&lt;br /&gt;
----------&lt;br /&gt;
&lt;br /&gt;
Scalability&lt;br /&gt;
&lt;br /&gt;
* You replicate your web application, should be&lt;br /&gt;
  &amp;quot;embarassingly parallel&amp;quot; (no direct interaction)&lt;br /&gt;
&lt;br /&gt;
* Communication between servers happens through the&lt;br /&gt;
  backend database&lt;br /&gt;
&lt;br /&gt;
Why not have the web servers talk directly to each other?&lt;br /&gt;
 - you then have to figure out how to do&lt;br /&gt;
   synchronization/concurrency right&lt;br /&gt;
 - that&amp;#039;s what databases are for!&lt;br /&gt;
&lt;br /&gt;
So how in the world do you scale up databases?&lt;br /&gt;
&lt;br /&gt;
First answer: use a minimal solution&lt;br /&gt;
 - only get the functionality that you want&lt;br /&gt;
&lt;br /&gt;
First rule of scalability&lt;br /&gt;
 - you can&amp;#039;t do everything at scale&lt;br /&gt;
&lt;br /&gt;
So, you have to choose what you will do&lt;br /&gt;
&lt;br /&gt;
Why are sacrifices necessary?&lt;br /&gt;
&lt;br /&gt;
latency versus bandwidth&lt;br /&gt;
&lt;br /&gt;
bandwith: bits transferred per second on average&lt;br /&gt;
latency: time to get first bit of response after request&lt;br /&gt;
&lt;br /&gt;
Consider a large truck full of hard disks driving&lt;br /&gt;
across Canada.&lt;br /&gt;
  - very, very high bandwidth&lt;br /&gt;
  - very, very high latency as well!&lt;br /&gt;
    (2 weeks to get first bit of response)&lt;br /&gt;
&lt;br /&gt;
Ideally, you want high bandwidth and low latency&lt;br /&gt;
 - bandwidth you get through parallelism&lt;br /&gt;
 - latency has to be engineered&lt;br /&gt;
&lt;br /&gt;
A &amp;quot;supercomputer&amp;quot; is one with low-latency memory access,&lt;br /&gt;
for LOTS of memory&lt;br /&gt;
  - so it has to have fast interconnects&lt;br /&gt;
  - thus, accesses to different nodes aren&amp;#039;t much&lt;br /&gt;
    slower than local accesses&lt;br /&gt;
&lt;br /&gt;
Challeng for large web apps is having the database&lt;br /&gt;
answer queries with low latency&lt;br /&gt;
&lt;br /&gt;
But some amount of latency is inevitable&lt;br /&gt;
 - speed of light is finite&lt;br /&gt;
&lt;br /&gt;
So if you want fast access to your webserver worldwide&lt;br /&gt;
 - you need to replicate across the globe&lt;br /&gt;
 - be close to your clients&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NoSQL databases became popular because of latency&lt;br /&gt;
concerns&lt;br /&gt;
 - you needed to be as fast as possible,&lt;br /&gt;
 - so strip it to the bone&lt;br /&gt;
&lt;br /&gt;
Use an in-memory key-value store if it is sufficient&lt;br /&gt;
  - lowest latency&lt;br /&gt;
  - least functionality&lt;br /&gt;
&lt;br /&gt;
If you have to, use an SQL database&lt;br /&gt;
  - highest latency&lt;br /&gt;
  - most functionality&lt;br /&gt;
&lt;br /&gt;
Or use something in between (MongoDB)&lt;br /&gt;
&lt;br /&gt;
Once you choose the type of database, you OPTIMIZE&lt;br /&gt;
 - minimize I/O and computation required per access&lt;br /&gt;
   (read or write)&lt;br /&gt;
 - example: query optimization&lt;br /&gt;
 - how you form the query&lt;br /&gt;
   - how database is organized&lt;br /&gt;
&lt;br /&gt;
Count the number of web pages that have the word&lt;br /&gt;
 &amp;quot;amazing&amp;quot; in them&lt;br /&gt;
&lt;br /&gt;
How?&lt;br /&gt;
 - first, need a database with a copy of the web pages&lt;br /&gt;
 - then, you could do linear search through all&lt;br /&gt;
   of the web pages...&lt;br /&gt;
&lt;br /&gt;
I ask this because a web search is a massive challenge&lt;br /&gt;
in query optimization&lt;br /&gt;
&lt;br /&gt;
 - need to limit scope as early as possible in query&lt;br /&gt;
 - organize data so queries are quick to be answered&lt;br /&gt;
    - precompute as much as possible&lt;br /&gt;
&lt;br /&gt;
The best you can do is table lookup. So have the right&lt;br /&gt;
tables ready!&lt;br /&gt;
&lt;br /&gt;
Key tool is making an INDEX&lt;br /&gt;
 - table of search term and pointers to data&lt;br /&gt;
&lt;br /&gt;
E.g., you have a table of customers sorted by ID&lt;br /&gt;
 - have an index of names, so a table of names versus&lt;br /&gt;
   IDs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&lt;br /&gt;
[http://homeostasis.scs.carleton.ca/~soma/webfund-2016w/code/analyzeLogs-filecount.zip analyzeLogs-filecount]&lt;br /&gt;
&lt;br /&gt;
Note this version has node_modules removed; copy this directory from analyzeLogs-sol or run &amp;quot;npm install&amp;quot;.&lt;/div&gt;</summary>
		<author><name>Soma</name></author>
	</entry>
</feed>