Skip to content

Commit

Permalink
Module 11 (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
jon-bell authored Feb 9, 2024
1 parent f1dd273 commit b971ea0
Show file tree
Hide file tree
Showing 10 changed files with 79 additions and 1 deletion.
41 changes: 41 additions & 0 deletions Activities/Module11 REST Activity.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
layout: page
title: Working with REST / OpenAPI
nav_exclude: true
---
# REST Transcript Activity

In this activity, you will use TSOA to build a REST client for our transcript database.

As usual, download the [starter code]({{ site.baseurl }}{% link Activities/module11-rest-transcript-activity.zip %}) and run `npm install`.

Then, run `npm start` to generate the OpenAPI specification, server boilerplate, and start the development server.
This command will automatically reload the server as you change files in this project.
To stop the server, press control-C in the terminal.

Once you see the message "Listening on 8081", you can access this URL in your browser:
[http://localhost:8081/docs/#/transcript](http://localhost:8081/docs/#/transcript)

You should now see a "Swagger" transcript-server-openapi documentation page, with a few API endpoints defined. Expand the "GET /transcripts" endpoint, click "Try it out", and then "Execute". Now, the field "Response Body" should have text in it like:
```
[
{
"student": {
"studentID": 1,
"studentName": "avery"
},
"grades": [
{
"course": "DemoClass",
"grade": 100
},
{
"course": "DemoClass2",
"grade": 100
}
]
},
```

This demonstrates that this endpoint of your REST API is functional. In the rest of the activity, you will implement the remainder of the routes. Details are in the README page of the starter code.

Binary file added Activities/module11-rest-transcript-activity.zip
Binary file not shown.
Binary file added Slides/Module 11.1 Distributing Processing.pdf
Binary file not shown.
Binary file added Slides/Module 11.1 Distributing Processing.pptx
Binary file not shown.
Binary file added Slides/Module 11.2 Case Studies.pdf
Binary file not shown.
Binary file added Slides/Module 11.2 Case Studies.pptx
Binary file not shown.
Binary file added Slides/Module 11.3 Communication Patterns.pdf
Binary file not shown.
Binary file added Slides/Module 11.3 Communication Patterns.pptx
Binary file not shown.
2 changes: 1 addition & 1 deletion _data/modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
page: /modules/10-ds-1
6a:
name: Distributed System Architectures (Part 2)
page:
page: /modules/11-distributed-systems-2
6b:
name: Tests with Larger Scope
page:
Expand Down
37 changes: 37 additions & 0 deletions lectures/l11.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
layout: module
title: "11 - Distributed Systems (Part 2)"
permalink: /modules/11-distributed-systems-2
parent: Modules
nav_order: 11
lessons:
- title: "Distributing Processing"
ppt: "Module 11.1 Distributing Processing.pptx"
pdf: "Module 11.1 Distributing Processing.pdf"
- title: "Case Studies"
ppt: "Module 11.2 Case Studies.pptx"
pdf: "Module 11.2 Case Studies.pdf"
- title: "Communicaton Patterns"
ppt: "Module 11.3 Communication Patterns.pptx"
pdf: "Module 11.3 Communication Patterns.pdf"
---
### Learning Objectives:
In this module, you will learn to:
* Recognize common software architectures
* Understand tradeoffs of scalability, performance, and fault tolerance between these architectures
* Explain the basic principles of the REST and WebSocket communication patterns


{% include lesson.html %}

### Activity
* Activity: [Transcript REST Server]({{ site.baseurl }}{% link Activities/Module11 REST Activity.md %})


### Resources
* ["Distributed Systems for Fun and Profit"](http://book.mixu.net/distsys/index.html) by Mikito Takada
* Online book chapter: ["Thinking Like a Software Architect"](https://ckaestne.medium.com/thinking-like-a-software-architect-121ea6919871) by Christian Kästner
* Podcast: ["Chris Richardson on Microservice Patterns"](https://www.se-radio.net/2019/06/episode-370-chris-richardson-on-microservice-patterns/) - SE Radio
* Counterpoint podcast: ["Roberta Arcoverde on Stack Overflow's Monolith"](https://hanselminutes.com/847/engineering-stack-overflow-with-roberta-arcoverde)
* ["What is a REST API?"](https://www.sitepoint.com/rest-api/)
* [Socket.io](https://socket.io/) - a library for real-time web applications

0 comments on commit b971ea0

Please sign in to comment.