There are three kinds of DNS servers:

  • local servers: got local servers to figure out how to reach remote servers. Secondary server wiil download the repilication from the primary server once a day.
  • Authoritative server: store host’s IP and name, translate name for host to its IP, where the IP is eventually stored.
  • Root name servers: they are scaled all around world.

Example: send IP to local server to see if it knows, the local server doesn’t know then send it to the root server, root server asks intermediate name server, then to authoriatvive name server (who takes the responsibility of the IP address), it knows then sends response back.

DNS records

DNS requests are send using UTD, the resolutions based on DNS application.

  • Type=A: give host name , sends back value(IP)

  • Type=NS: look for IP of name server(domain), get back host

  • Type=CNAME: canonical name, back a few different servers

  • Type=MX: mail server, don’t know IP

  • Type=PTR: give IP address, back name or domain of machine, for security

  • white page: give name, get IP back

  • yellow page: give atribute, get name back

Your request can only be answered by a name server.

X.500 Name Tree: you decide the structure, give what and get what back using DNS.

JINI(JAVA-based dicovery service)

Distributed file system

latency scalability
centralized(single server)FS good poor
Distributed good? good

single server issues: too high workload, one server down all down

[Easy implement model] remote access model: send request to server and exexute the request then reply client. All operation are done on server side.

[Hard implement model] upload-download model: client send request “open” to server, server copies the file to client to client chain. “Read” and “write” are manipulated on client machine. If file is done then upload to server. latency and if server is down are avoided, a limit of replication is useful to get btter scalability. DIstirbuted system uses replicatio and partioning to give btter performance.

NFS is the most popular file system.

client-server architectures:

virtual file system : accesses local file and remote file. If it’s remote file ,send it to NFS client. RPC client stub will send “open”/“read” and so on request to RPC server stub. RPC will go and back all the time between client and server.

file handle – local or remote file indicator. VFS structure(for each mounted): has V-node(if local ,v-node=i-node; if remote, v-node = file handle remote file) for each open file, which can use different file handles for different file systems.

NFS version 3:

  • create file if ask
  • client-server communication by iterative
  • mounting files to your home directory

NFS version 4:

  • create after checing if it exist
  • client-server communication by recurcive
  • auto-mounting files on remote mechine, response comes back

name resolution and name service allow you access local and remote files other than moving all files to local machine.

using symbolic links make automounting effieciently, not too much latency.

semantics of file sharing

Centralize model: Process A wants to append text after “ab” with “c”, process B wants to open the file and can see “c” is appended.

A and B running on the different clients but connect to the same remote server. A wants to write file and copy it to its space and append “c”. B wants to open file, but server even knows file is changed but hasn’t recieved the fresh file. Then B only gets copy of original file from server. But this is bad, how to solve this?

  • When A is changing file, file is locked on server side. Then B can’t get the file imediately until it’s updated. Has good performance but not good scalibility.
  • make something weaker, something is seen and something isn’t seen. When A is writting but B can only open and can’t see the change. Only keep the last time modify. (session A, session B semantics)
  • Unix Semantics VS Session Semantics.

refer http://www.cs.jhu.edu/~yairamir/cs418/os7/tsld024.htm

Reference material:
Book: Distributed Systems, Third edition, Version 3.02(2018), Maarten van Steen and Andrew S. Tanenbaum.
Lectures: University of Waterloo, CS 454/654 (Distributed System), 2020 winter term, Professor Khuzaima Daudjee.