generated from mwc/lab_server
42 lines
3.1 KiB
Markdown
42 lines
3.1 KiB
Markdown
# Project Server Notes
|
|
|
|
## Checkpoint 1
|
|
|
|
1. Lots of software today connects to remote servers, and can't work offline.
|
|
What are some advantages of using a program or an app which uses a remote
|
|
server? What are some advantages of using a program or an app which is
|
|
completely local?
|
|
|
|
Some advantages of using a program or app which uses a remote server is that you can use/access the program or app from any device as long as you have an internet connection. Another great thing is that any changes you make or any data that you have will sync and save across multiple devices.
|
|
|
|
On the other hand, some advantages of using a program or app which is completlely local is being able to work offline. For example, if you are having difficulty connecting to the internet or have no internet access you can still use the program or app. I also did some researching about privacy concerns and it looks like the local servers increase privacy because the information would only be stored on your own computer- which makes complete sense!
|
|
|
|
|
|
|
|
2. You just ran a server on your own computer, and connected to it as a client
|
|
on the same computer. In what other situations might it be useful to run a
|
|
server on your computer, where you're the only client, on the same computer?
|
|
|
|
Running a server on your computer where you're the only client, on the same computer could be useful as a computer science teacher when testing apps or programs before students use them. Also, we have many Wifi issues in my school, so it could be helpful to not need an internet connection to be productive in class (and out of class for students without internet access).
|
|
|
|
|
|
|
|
## Checkpoint 2
|
|
|
|
3. Choose a program (Steam), web app (Google Docs), or app (Weather) that you use
|
|
frequently. You can't observe the calls this program is making to its server
|
|
(unless you have fancy tools), but you can infer some of the calls based on the
|
|
program's behavior. Describe a few routes which you think may exist for your
|
|
chosen program's backend server.
|
|
|
|
I frequently use Google Docs to create all of my materials for my Algebra 1 class. Although I cannot see the backend, I can infer that some of the routes include GET /documents to retrieve a list of my docs, and POST /documents/new to create a new doc, POST /documents/save which would save updates made to the doc and POST /documents/share to share the document with other users.
|
|
|
|
|
|
|
|
4. In your own words, what is an exception? When might it be useful to handle an
|
|
exception? When is it better not to handle an exception, and instead let the
|
|
program crash?
|
|
|
|
An exception is an error that occurs while a program is running that interrupts the normal flow of execution. It is useful to handle an exception when the error is anticipated and the program can recover from it. For example, if a program can catch the exception and display an error message instead of crashing, it would be very helpful to the user. On the other hand, when an error is not expected, and something goes wrong, the program should crash so that the issue can be fixed rather than hidden.
|
|
|