1 / 19

Distributed Systems

Distributed Systems. Lecture # 3. Administrivia. Projects Design and Implement a distributed file system Paper Discussions Discuss papers as case studies. Paper Discussions. Attended by ~40 students 15% grade (10 + 5) Paper discussion modeled after program committee meetings

Download Presentation

Distributed Systems

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Distributed Systems Lecture # 3

  2. Administrivia • Projects • Design and Implement a distributed file system • Paper Discussions • Discuss papers as case studies

  3. Paper Discussions • Attended by ~40 students • 15% grade (10 + 5) • Paper discussion modeled after program committee meetings • Each Paper presented by 4 students • Motivator (context of work) • Presenter • Advocate • Devil’s advocate • Class discussion and vote

  4. Assignments • Assignments: • One big project • Teams of 5 • Network File System • Both paper design and implementation • Communication (2 weeks: Design and implement) • Naming (2 weeks: design and implement) • Storage: Multiple users (2 weeks: design and implement) • Reliability (make it work in 3 weeks)

  5. Design Documents • 400 words: One pager • Two main sections • What is your design? • What were the alternatives • Only bullet points • A picture is worth a thousand words

  6. Implementation • .. then you implement your design • No copying of code • This is a serious offense! • Use Java: Lots of existing code and libraries • Code submission at the end of the week • TAs will need to see a demo

  7. Layered Communication Application Distributed System (RPC) Socket TCP/IP UDP/IP OS

  8. Sun RPC • What does a Sun RPC request contain? • Wire format • Xid • Call or reply • RPC version • program # • program version • procedure # • auth bits • Marshaled arguments

  9. Marshalling: Sun RPC • Marshaling arguments • "Linearize" data • "Externalize" data: Formats defined by XDR standard Easy for e.g. int -- same representation, though portable byte-order... Collections? include a length. Pointers? Pass by value or reference? • Return Values • How to return? • IDL: In, Out, INOut • RMI: Objects • Recursive packing

  10. RPC: Summary • Synchronous, Blocking • Mimics a procedural call • Involves: • Data transfer: Marshaling • Thread Migration

  11. RPC Components Client Server Stub Skeleton Client Framework Server Framework Network

  12. NFS Transparency • Tension between performance and consistency • Syntax preserved • Not Semantics • File read/write semantics • Only check on open() • Consistency? • Events! • Expose Distribution: Java RMI

  13. Events • Subscribe/notify • Asynchronous • Non-blocking Subscribe Notify

  14. Events • Better performance than polling for larger tasks • Do it, let me know when you are done • Preferred mode of communication for interactive applications: none-blocking • But Harder to program • Synchronization • Spaghetti code

  15. Programming Events Main thread Subscribe Notify Events Handler

  16. Distributed Shared Memory Int x; x = 10; Int x; .. print x; • Consistency? • Deadlock? • DSM abstraction? • Make it explicit X = 10

  17. Tuple-spaces Tuple-space • Explicit DSM • Tuple as the atomic data object • Clearly defined semantics for insert/read/peak

  18. Your distributed file system • What would you use? • Client-server • communication • - Naming of files • Storage of files • Consistency • - Availability Your file system Java Operating System

  19. Your file-system File Server • Communication? • Name Server? • Directories? • Storage • Local file-system? • Consistency of data/names • Fault-tolerance Remote Client

More Related