Skip to content

Commit

Permalink
Merge pull request #108 from scalableinternetservices/lecture2updates
Browse files Browse the repository at this point in the history
pre lecture 2 updates
  • Loading branch information
zwalker authored Oct 1, 2024
2 parents 5cdaa7b + b1c6ce9 commit d61a148
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 18 deletions.
25 changes: 11 additions & 14 deletions _includes/class_info.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,16 @@
## Instructor

- [{{site.instructor}}]({{site.instructor_url}})
- <{{site.instructor_email}}>
- [email](mailto:{{site.instructor_email}})

## UCSB TA

- TBD
<!-- - Bhavye Jain -->
<!-- - <bhavyejain@ucsb.edu> -->

## Appfolio TA

- TBD
<!-- - Shubham Talbar -->
<!-- - <shubham_talbar@ucsb.edu> -->
- Maximilian Medearis
- [email](mailto:maximilian.medearis@appfolio.com)

{% if site.piazza_url %}
Please use [Piazza]({{site.piazza_url}}) for class-related correspondance.
Expand All @@ -32,20 +29,19 @@ Please use [Piazza]({{site.piazza_url}}) for class-related correspondance.
- 9:00am -- 10:50am PT
- {{site.class_location}}


### Office Hours

- TBD
<!-- - TBD
<!-- In-person
In-person
- Wednesday 10 -- 11am, Phelps 2510
- Thursday 3 -- 4pm, Phelps 2510
- Tuesday 8am -- 9am, Phelps 3526
- Thursday 8am -- 9am, Phelps 3526 -->

Virtual

- Thursday 2 -- 3pm, link in [Piazza]({{site.piazza_url}})
- Friday 1 -- 2pm, link in [Piazza]({{site.piazza_url}}) -->
- Tuesday 4 -- 5pm, link in [Piazza]({{site.piazza_url}})
- Friday 4 -- 5pm, link in [Piazza]({{site.piazza_url}})

### Initial tasks due before

Expand Down Expand Up @@ -126,5 +122,6 @@ _[Available online](https://hpbn.co/)._
Note: The online version is slightly more up-to-date.

[The Ruby On Rails Tutorial](https://www.railstutorial.org/book)
_[Complete 3rd edition available online](https://3rd-edition.railstutorial.org/book)_
<!-- _[Complete 3rd edition available online](https://3rd-edition.railstutorial.org/book)_ -->
Optional
Note: This book is only useful once we get to the primary project.
8 changes: 5 additions & 3 deletions schedule.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The following schedule is subject to change, and many slide links are not yet ac

### Topics

- Course Introduction
- Course Introduction - [slides](/slides/2024f/01_course_introduction/index.html)

### Tasks

Expand All @@ -35,7 +35,7 @@ The following schedule is subject to change, and many slide links are not yet ac

### Topics

- Hypertext Transfer Protocol (HTTP)
- Hypertext Transfer Protocol (HTTP) - [slides](/slides/2024f/02_http/index.html)
- HTTP Servers
- Application Servers

Expand All @@ -60,6 +60,7 @@ The following schedule is subject to change, and many slide links are not yet ac
- Architecting for High Availability

### Tasks

- Complete [Project 1](/project1/)
- Begin [Project 2](/project2/)
- Read [SEDA: An architecture for well-conditioned, scalable internet services](http://nms.lcs.mit.edu/~kandula/projects/killbots/killbots_files/seda-sosp01.pdf) by M Welsh, D Culler, E Brewer
Expand All @@ -79,6 +80,7 @@ The following schedule is subject to change, and many slide links are not yet ac
- Pair Programming / Mobbing

### Tasks

- Complete [Project 2](/project2/)
- Begin [Project 3](/project3/)
- (Optional) Find a teammate for [Project 3](/project3/)
Expand Down Expand Up @@ -206,7 +208,7 @@ The following schedule is subject to change, and many slide links are not yet ac

### Topics

<!-- - #### Wednesday December 6: Zoom Guest Lecture -->
- Guest Lecture (Tu 12/3)
- Scalable Machine Learning Inference

### Tasks
Expand Down
55 changes: 54 additions & 1 deletion slides/2024f/02_http/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,12 @@

> When might you want to use HTTP HEAD?

???

* To check if a resource exists
* CHeck the size of a resource
* To check if a resource has changed (last-modified)

---

# HTTP Method/Verb Misuse
Expand All @@ -210,6 +216,14 @@
```http
GET /post/5?action=hide
```
???

Common Problems:
* Using GET for actions that change server state
* Using POST for idempotent actions
* Using PUT for creating resources
* Using DELETE for non-idempotent actions
* Using GET to send data to the server, not prohibited but not recommended

--

Expand Down Expand Up @@ -425,6 +439,23 @@

> What security concerns may exist with cookies?

???

Uses of cookies:
* Authentication
* Session state
* Personalization
* Tracking
* User preferences
* Shopping cart
* Advertising
* Analytics

Security concerns:
* Cross-site scripting
* Stolen cookies (stolen session)


---

# Other HTTP Headers
Expand All @@ -446,6 +477,18 @@
`X-` prefixed headers are not part of the official specification and may later
become _standardized_.

???

* ETAG - Entity Tag, a unique identifier for the resource used for caching
* Date - Date of the response
* Last-Modified - Date the resource was last modified
* Cache-Control - Cache control directives, used to indicate boundaries of caching (e.g., no-cache, max-age)
* Age - Age of the resource in the cache

* Content-Security-Policy - specifies where resources can be loaded from
* Strict-Transport-Security - Forces the browser to use HTTPS
* X-Frame-Options - Prevents the resource from being embedded in an iframe

---

class: center inverse middle
Expand Down Expand Up @@ -680,7 +723,7 @@ <h1>HTTP is easy!</h1>

# More Speed

A single web page may have tens of resources. In practice obtaining each
A single web page may have tens or even hundreds of resources. In practice obtaining each
resource serially over the same TCP connection is too slow.

> What can be done to get more speed?
Expand Down Expand Up @@ -746,6 +789,16 @@ <h1>HTTP is easy!</h1>

.center[![Chrome Network Table](developer_tools_waterfall.png)]

???

Stop here for demo of chrome developer tools and network tab:

Visit a website and open the developer tools. Look at the network tab

* /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --user-data-dir="/tmp/no_http_3_profile"
* chrome://flags/
* /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --user-data-dir="/tmp/no_http_2_profile" --disable-http2

---

class: center middle inverse
Expand Down

0 comments on commit d61a148

Please sign in to comment.