Introduction to Distributed Computing

202401111212
Status: #idea
Tags: DC

Introduction to Distributed Computing

Types of Systems

  1. Centralised
  2. Decentralised
    • Networked computer system in which processes and resources are necessarily (out of necessity) spread across multiple computers
    • Not designed from the ground up for distribution
    • Forced to integrate systems separated by administrative boundries
      • FL
      • Blockchain - No trust
      • Monitoring and traffic control - Forced to spread due to spatial requirements
    • Eg: Financial services, federated learning, blockchain
  3. Distributed
    • Same but sufficiently (not necessary) spread...
    • Adding nodes for scalability, performance, fault tolerance, availability, security (possibly on demand)
    • We expand a system: Not adding functionality, but adding servers for scale
      • Gmail: Have only IMAP and SMTP, but need more than 2 servers due to sheer number of users
      • CDN (Akamai)
      • NAS: Like Netflix storing its data
    • Two ways to
      1. Integration
      2. Expansion

Are centralised solutions bad?

Warning

Decentralisation is NOT a goal in itself.
If you have a choice, go for a centralised system.

Different perspectives

Goals that you should meet to consider a distributed system

  1. Sharing of resources
    • Make it easy for the user and applications to share resources
    • Why? Cost-effective
  2. Distribution transparency
    • The system should hide the fact that the resources are distributed
    • The distribution should be transparent to the user
  3. Openness
    • Easy to use and integrate with other systems
  4. Scalability
    • Technique by which it transparently adds resources to maintain same level of performance/latency even when number of requests/users increases.

Sharing of Resources

Distribution Transparency

ADD PIC from SLIDE 11
ADD TAABLE from slide 11

Type of Transparency Description
Access Hide differences in data representation and how an object is accessed.
Ex: RPC call
Location Hide where the object is located
Ex: URL
Relocation Hide that an object may be moved to another location while in use
Ex: VM migration (on cloud)
Migration Hide that an object may move to another location
Ex: VM migration, mobile internet (servers do not know about your physical movement)
Replication Hide that an object is replicated
Concurrency Hide that an object may be shared by several independant users
Failure Hide the failure and recovery of an objeect
Note

HashTable in Java is thread-safe. Multiple threads can access it concurrently. It internally uses a lock to ensure consistency.

How much transparency?

Note

You can not distinguish between a slow computer and a crashed one (proof of CAP theorem)

ADD TABLE (Slide 12)

You can't hide communication latency

Researchers are arguing that knowing the distribution, and then using explicit message passing.

If reliability cannot be guaranteed, it is better to do local executions. Copy data before it is used, to the intended recipient. Only after copying, access the data.
Alternative idea: Never update. Create a new version of the data

Scaling

  1. Add more users/processes (size scalability)
    • Compute
    • Formal analysis is possible
      • A centralised service can be modelled as a simple queuing system
Info

Scaling up -> Adding more CPUs
Scaling out -> TODO

  1. Geographical scalability
    • Adding nodes in different geographical locations
    • If a user near you and far from you get the same response time, then it is geographically scalable
    • Problem
      • WAN is inherently unreliable. So, we cannot use a simple client-server model anymore
  2. Administrative scalability
    • No matter which administrative zone the request goes to, the response time must be the same
    • Problems
      • Conflicting policies concerning usage (and payment), management, security, etc.
        • Eg. Using Netflix in different countries. Can't see the same content
        • Counterexamples
          • BitTorrent
          • Skype

Scaling Techniques

Dependability

Securtiy


References