“A distributed system is a program that conisists of multiple parts running on more than one computer interconnected via a network”
Connection Oriented (like TCP) creates a connection like a phone call, it is active until one side hangs up
Connectionless Communication(like UDP): Is like sending a letter. Each communication is treated as a single letter addressed and sent to the other party.
We must specific the communication partnet (port and IP) in every send/recieve op
UDP is faster to setup and send, it doesn’t create and hold open a pipe for the entirety of communication.
Port number helps with ensuring we get unique PIDs across multiple machines.
We need a unique machine ID and a unique process ID
“A port number identifies a service provided by a process running on a given machine”
Domain Name System
Gives a name that is easier to remember than an IP address
DNS helps to locate a resource.
?A server farm?
Can be useful on a LAN, it will ask all machines network where a resource is.
“ways of failingn that don’t occur in centralized systems”
Examples:

connection-oriented communications related?
They both rely on communications over a network.
When communicating order, reliability are both factors
What is a timeout? Give an example of where a timeout might be useful in
a distributed system.
A timeout is a specific amount of time to wait for a response back when a communication is sent. It helps us to detect a failure.
This is useful, as we may be waiting on one machine to respond back and that can cause delays.
It is possible for the other side to be down.
A timeout allows for a retry with the same or a different server
Scalability is simply defined as the ability of a system to grow (in scale) to larger sizes without making changes to the system design.
How does this relate to using replicated servers to enhance reliability?
Keeping the contents of replica servers identical.
If we replicate servers to increase reliability, we need to ensure all content is identical and don’t hand out incorrect/stale information to different web clients.
distributed system scalability.
When designing we need to consider:
Process can be though of as a program in execution includes:
processes run on a single machine
A thread is a cheaper alternative to processes
Can having more than on thread in a memory space
a thread is a light-weight process, multiple running on a single machine
A clone of the current running process is made.
It returns either:
This can then be used to continue on with the code or have a clone exec(…) another program.

In order for it to be concurrent is needs to be able to manipulate the program/data independently, which wouldn’t happen with a shared stack.
After a call to start( ), the original thread (the one that called start) and a new thread will both be running
The new thread, once it is started will be running it’s run( ) method. Every newly created thread starts by running this code.
So the thread is created but doesn’t actually start until the start( ) command is recieved.
Correctness is defined to be “The same as any sequential execution of the concurrent programs”
Correctness refers to access and modifying data at the same time (well one at a time)
it doesn’t matter who goes first, as long as one finishes before the other begins
A section of code that acceses shared data

What is RPC? Why does the lack of shared memory between the caller and the callee make RPC harder to implement than LPC?
RPC was originally designed to elimate sending messages (which was unfamiliar). It abstracts/hides the messaging.
An RPC system translates procedure calls into appropriate message passing for the programmer.
Instead of running a procedure call on a local machine, we are making a procedure call on a different machine than the caller.
In short, how do we deal with and pass data of different types. Long answer, see the image.


Wire/network format
Everything is tranlated to a pre-agreed upon machine-architecture-neutral representation for transmission and then from that format upon reception.
It handles the problem of deal with multiple data types and system architectures to sucessfully pass as parameters.

RMI is a more modern (object oriented) version of RPC.
RMI = Remote Method Invocation
Complex arguments to, and results from, a remote method invocation are passed by deep copy rather than by value.
The RMIregistery is required to get a reference to the remote object you want to invoke a method on.
This is an RMI look up server so we can get that reference.
