Portland Doors - PowerPoint PPT Presentation

1 / 8
About This Presentation
Title:

Portland Doors

Description:

Doors is a library for inter-process communication ... you must attach the door first ... The implementation I chose creates a door no one can use ... – PowerPoint PPT presentation

Number of Views:46
Avg rating:3.0/5.0
Slides: 9
Provided by: lda87
Category:
Tags: doors | portland

less

Transcript and Presenter's Notes

Title: Portland Doors


1
Portland Doors
  • A free, open-source implementation of Suns Doors
    API

2
What is Doors?
  • Doors is a library for inter-process
    communication
  • Originally designed by Sun for its products,
    including Solaris
  • Ported to Linux in 1998 by Jason Lango
  • That port is now obsolete
  • At least two other attempts to port it in the
    last ten years

3
How Does a Door Work?
  • Create a door with door_create()
  • Create a file as the mount point, with the
    desired permissions (similar to mount)
  • Attach it to the filesystem with fattach()
  • Open it as a file descriptor, with open()
  • Call it with door_call()
  • The remote process will execute the call
    synchronously and return

4
Changes to This Version
  • Some versions of UNIX, including Linux, do not
    have fattach()
  • For open() and close() to work, there would have
    to be significant design changes
  • Therefore, I created substitutes, named
    door_attach(), door_detach(), door_open() and
    door_close().

5
Security and Compatibility
  • In the original interface, you create a mount
    point with the appropriate permissions first,
    then attach the door to it
  • In this implementation, you must attach the door
    first
  • If the exported door had default permissions,
    there would be a race
  • The implementation I chose creates a door no one
    can use
  • Therefore, you must set its permissions explicitly

6
Implementation Details
  • A door is really a local domain socket with the
    SOCK_SEQPACKET type
  • The internal implementation uses shared memory
  • Each connection spawns a new thread to listen for
    messages
  • Each door call spawns a new thread to handle the
    call

7
Known Bugs and Limitations
  • File descriptor passing not yet supported
  • Each connection can only answer requests in the
    same order that they were received. (Requests
    over multiple connections can complete in
    parallel.)
  • Private server thread pools not yet supported
  • Non-cancellable doors not yet supported.

8
Directions for the Future
  • Kernel support to improve speed, enable full
    source compatibility
  • Give each request a sequence number, enabling
    parallelization
  • Switch server threads to a worker model, with
    pre-allocated buffers
  • Zero-copy mechanism, as in Langos implementation
Write a Comment
User Comments (0)
About PowerShow.com