Docsity

Distributed Computing and Other Stuff - Lecture Slides | CMSC 433, Study Guides, Projects, Research of Programming Languages

Partial preview of the text

Download Distributed Computing and Other Stuff - Lecture Slides | CMSC 433 and more Study Guides, Projects, Research Programming Languages in PDF only on Docsity!

CMSC 433

Distributed computing and

other stuff

Nov 15th

Open source project

  • By next Tuesday, you need to identify the specific contribution you will make - If a bug fix, identify the bug you will fix - If adding a feature, have the feature substantially implemented
  • Document your progress

ConcurrentPublisher

  • Many ways to do it
    • Several of them correct
  • Deterministic testing was a challenge
    • Harder than we expected
    • Check your graded results against other results, ask for regrade if needed

Chat room

  • There is a Server interface
    • You can register with the server
      • Get back a ServerConnection
  • There are msgs that can be sent to a ServerConnection or to a Client - Command pattern

Why ServerConnections?

  • Stores information we will need to know about a client
  • Acts as an authorization token
    • Unless you have a ServerConnection object, you can’t invoke certain methods on the server

Distributed applications

  • Machines are not all the same
    • But all adhere to same communication protocol
  • Network is “slow”
    • Sending a message takes a lot of time
  • Network is unreliable
    • Machines may join and leave with no warning
    • Part of the network may fail

Remote Procedure Call

  • A remote procedure call is a way for one program to invoke a method in another process or machine - Old, old technique, before OO - But even more common now days

Implementing RPC

  • Issues:
    • How do you make a call?
    • How is the information transmitted?
    • How is it handled in the receiving machine/process?

Transmitting data

  • Lots of different ways to handle transmitting data - See discussion of object serialization
  • Also need to consider the fact that I/O faults happen - Can’t be ignored, particularly in wide area situation

In the receiving machine

  • Use TCP sockets
  • Could have a dedicated TCP connection for each remote proxy, or create a new TCP connection for each invocation
  • Listen for requests, forward to correct object

Multiplexing

  • Could have multiple proxies from the same machine share the same TCP connection - Have to transmit id identifying target with each call
  • Could also multiplex server sockets

Easiest thing to do

  • For each remote proxy
    • Dedicate a TCP connection
    • Have a dedicated remote skeleton on receiving machine - Has a socket and a local object - In a thread, listen for remote requests and translates them into calls on the local object

For P4, we’ll use async msgs

  • When an async method is invoked remotely, we don’t need to wait for method to complete on remote server - And we don’t see a return value or thrown exception
  • In P4, call to Server.register is synchronous, others are asynchronous.