The flashcards below were created by user
on FreezingBlue Flashcards.
A) Describe precisely what is
meant by a scalable system. Scalability can be achieved by applying different techniques.
What are these techniques?
- A distributed system is
- scalable when it improves is performance after adding resources.
- Scalability is the ability
- of a system, network, or process, to handle growing amounts of work in a
- graceful manner or its ability to be enlarged to accommodate that growth.
- Scaling can be achieved through distribution,
- replication, and caching.
B: Given the bit pattern m=4, p=5 and q=7, show how
Rivest, Shamir, Adelson
algorithm (RSA) works. Encrypt m and decrypt the
result of the encryption
(you must obtain the original m=4)
- Compute n=pXq n= 7 x 5 = 35
- Compute z = (p-1)(q-1) z = 6 x 4 = 24
- Choose an
- integer e s.t. 1 < e < z, e and z share no divisor other than
- Determine d so that ed-1 is exactly divisible by
- z, d=5
- Encryption c = me mod n = 45 mod 35 = 9
- Decryption = cd mod n = 95 mod 35 = 4
C) Outline advantages and disadvantages of pub/sub systems and
- Pros. Loosely coupled. Pub/sub provides better scalability than
- traditional client/server.
- Cons. Publisher and subscriber need to be synchronised on time.
- More specifically many pub/sub systems will try to deliver messages for a
- little while, but then give up. Scalability for large systems is still a
Describe the three-tiered client-server architecture?
- A three-tiered client-server architecture
- consists of three logical layers, where each layer is, in principle,
- implemented at separate machine. The highest layer consists of a client user
- interface, the middle layer contains the actual application, and the lowest
- layer implements the data that are being used.
A) In a structured overlay network, messages are routed
according to the topology of the overlay. What is an important disadvantage of
- overlay network is a computer network which is built on top of another network.
- Nodes in the overlay can be thought of as being connected by virtual or logical
- links, each of which corresponds to a path, perhaps through many physical
- links, in the underlying network.
- problem is that we are dealing only with logical paths. It may very well be the
- case that two nodes A and B which are neighbours in the overlay network are
- physically placed far apart. As a consequence, the logically short path between
- A and B may require routing a message along a very long path in the underlying
- physical network.
B) Describe stateful and stateless servers. Imagine a Web
server that maintains a table in which client IP addresses are mapped to the
most recently accessed Web pages. When a client connects to the server, the
server looks up the client in its table, and if found, returns the registered
page. Is this server stateful or stateless?
- A: It can
- be strongly argued that this is a stateless server. The important issue with
- stateless designs is not if any information is maintained by the server on its
- clients, but instead whether that information is needed for correctness. In
- this example, if the table is lost for whatever reason, the client and server
- can still properly interact as if nothing happened. In a stateful design, such
- an interaction would be possible only after the server had recovered from a
- possible fault.
C) Q: In the text, we
described a multithreaded file server, showing why it is better than a
single-threaded server and a finite-state machine server. Are there any
circumstances in which a single-threaded server might be better? Give an
- A: Yes.
- If the server is entirely CPU bound, there is no need to have multiple threads.
- It may just add unnecessary complexity. As an example, consider a telephone
- directory assistance number for an area with 1 million people. If each (name,
- telephone number) record is, say, 64 characters, the entire database takes 64
- megabytes, and can easily be kept in the server’s memory to provide fast
D)Why are transport-level communication services often
inappropriate for building distributed applications?
- A: They
- hardly offer distribution transparency meaning that application developers are
- required to pay significant attention to implementing communication, often
- leading to proprietary solutions. The effect is that distributed applications,
- for example, built directly on top of sockets are difficult to port and to
- interoperate with other applications.
B: Assume a client calls an asynchronous RPC to a server,
and subsequently waits until the server returns a result using another
asynchronous RPC. Is this approach the same as letting the client execute a
- No, this is not the same. An
- asynchronous RPC returns an acknowledgment to the caller, meaning that after
- the first call by the client, an additional message is sent across the network.
- Likewise, the server is acknowledged that its response has been delivered to
- the client. Two asynchronous RPCs may be the same, provided reliable
- communication is guaranteed. This is generally not the case.
A: Consider the DNS
query shown in figure 1. state what kind resolution it uses? (recursive or
Iterative) and explain why? Consider each step from 1-8 and explain the steps taken to resolve
www.google.com to its IP address.
- The local client asks the local name server for the IP
- address of
- The local name server does not know the IP address of
therefore it asks to the root server.
- The root name server does not know the IP address of
- but it does know the IP address of the name server for TLD so it
this to the local name server.
- The local name server asks TLD name server for the IP
- address of
- TLD name server does not know the IP address of
- but it does know the IP address of ns1.google.com (who may know
mapping) so it tells this to the local name server.
- The local
- name server asks ns1.google.com for the IP address of www.google.com.
- name server is authoritative for its zone so it can supply
- IP address of www.google.com
- 8. The local name server passes the IP
- address of www.google.com to the
B) why is it useful to define interfaces?
- from a software-engineering
- point of view, having precise and unambiguous interface definitions is
- important for understanding and maintaining objects.
- IDL-based definitions come in
- handy for generating stubs.
C) Does a stateless server need to take checkpoint?
- Check pointing is a technique
- for inserting fault tolerance into computing systems. It basically consists of
- storing a snapshot of the current application state, and later on, use it for
- restarting the execution in case of failure.
A) Access to shared Java
objects can be serialized by declaring its methods as
being synchronized. Is
this enough to guarantee serialization when such an
object is replicated?
- No. The problem is that access to each replica is serialized. However,
- at different replicas may be executed at the same time, leaving
- the replicated instance
- variables in an inconsistent state.
B) Outline a simple protocol that
implements at-most-once semantics for an object
- A simple solution is to let a proxy retransmit an
- invocation request, but telling the server
- explicitly that it is a
- retransmission. In that case, the server may decide to ignore the
- request and return an error to the
- client. In a more sophisticated solution, the server can
- cache results of previous invocations and
- check whether it still has those results when receiving a retransmitted
C) What kind of consistency would you use to
implement an electronic stock
market? Explain your answer.
- A: Causal consistency
- is probably enough. The issue is that reactions to
- changes in stock values should be
- consistent. Changes in stocks that are
independent can be seen in different orders.
makes the fail-stop model in the case of crash failures so difficult to
The fact that, in practice, servers simply stop producing output. Detectingthat they have actually stopped is difficult. As far as another process can see the server may just be slow, or communication may (temporarily) be failing.
A) Why do persistent connections
generally improve performance compared
to no persistent connections?
- A: The real gain is in avoiding
- connection setup, which requires a 3-way
- in the case of TCP.
C) Describe and compare
the unstructured and the super peer architectures.
- peer-to-peer systems largely rely on randomized algorithms for constructing an
- overlay network.
- Each node maintains a
- list of neighbours, but this list is constructed in a more or less random way
- Likewise, data items are
- assumed to be randomly placed on nodes
- As a consequence, when a
- node needs to locate a specific data item, the only thing it can effectively do
- is flood the network with a search query