Lecture 19: Cloud Computing
Notes By: Connor Fong and Rohit Seth

Basic Cloud Ideas

  • One unit of Computation = one container
  • Power is a problem
    • Low power nodes are a plus
    • Use "sleep mode" when not in use.

Advantages of Clouds

  • Short-term commitment
  • As needed payment
  • Can grow "instantly"
  • Unknown demand (eg. startups)
  • Varying demand (eg. The Superbowl)

Disadvantages of Clouds

  • Who pays? Causes accounting problems!
  • Who controls it?
    • Can it be subleased?
    • How to manage resources?
    • Security issues
  • Software Licensing (eg. charge per core)
  • Data confidentiality. Requires a minimum level of trust with your vendor.
  • Data transfer bottlenecks
    • Sometimes the "Sneakernet" alternative is faster
    • Archiving data (Data mitigation problem)

More Risk

  • Overload risk. What if your network provider is flakey? Multiple providers increases complexity.
  • Global meltdown via DDoS attacks. This is a huge problem!
  • Lock-in: EC2 APIs -> AWS is not very portable
  • Scaling-up risks. Bugs often occur after scaling up in production.

CAP Theorem

  • Consistency - All parts of cloud agree on user-visible state
  • Availability - Questions are resolved quickly
  • Partition Tolerance - Cloud still works when partitioned
You can chose any two, but you can't get all three.

Databases

SQL:

  • Atomicity
  • Consistency
  • Isolation (Serializability)
  • Durability
No SQL
  • Basically
  • Available (Works fine if only reading)
  • Soft state - Eventually stabilizes
  • Eventually Consistent

CAP on Real Clouds

Latency Issues often predominate. What can you do?

  • Retry the operation.
  • Cancel the operation.
  • Wait for the operation to finish.

Partition Recovery

  • Merge changes
  • How do you deal with conflict? Prefer commutative operations
  • Some problems can't be automatically fixed
    • Make manual repairs
    • Compensate users for downtime

Trusted Software

All programs aren't trusted! Therefore, all operations are checked by the underlying system.
Some programs have special rights:

  • The kernel itself
  • uid programs

Trusted Computer Base

This is the part of hardware and software that you must trust. Keep this small! Only trust:

  • The kernel
  • Setuid Programs