SlideShare a Scribd company logo
1 of 48
Download to read offline
πp

Anant Narayanan
August 23, 2010
What is πp?
• A fast, simple, distributed, reliable,

versioned, caching network file protocol
Another Protocol?
• The current design of the internet is
based on communicating peers

• Every time content is accessed, clients
are individually handed data from the
server

• Can this approach really scale?
Data Has Changed

• HTTP over TCP does well for the types
of data it was designed to transfer

• HTML5 supports video, but is HTTP

over TCP the best way to transport it?
Authentication
• Access control in any modern web
application is ad hoc and relies on
methods like browser cookies

• HTTP does support basic forms of

authentication (of both client & server)
but nobody seems to be using it!
Anonymity
• Almost every corporate network uses

firewalls to filter all traffic not on port
80, and even HTTP is subject to deeper
packet inspection

• This can’t go on forever, unless we

change the way in which content is
distributed
Decentralization
• Autonomy is a defining feature of the
Internet

• Yet, we observe large amounts of

aggregation of user data towards a few
third party services (Google, Facebook)
Sharing

• The best way to share something today

is to store data on someone else’s server

• This needs to change
Synchronization
• We’re moving away from the paradigm
of several people sharing a single
computer towards several devices
serving a single person

• It’s just a better user experience to
“carry your data with you”
Existing Technology
FTP
• Very limited in use, no versioning or file
metadata support

• Prone to bounce attacks
• Little scope for caching
Coda
• Complex (~90k lines of C++ code)
• Dynamic files unsupported
• No support for versioning despite strong
file sharing semantics
NFS
• Also complex in implementation though
there are several interoperable choices

• No support for dynamic or device files
• Concurrent access for shared files is
disallowed
SMB/CIFS
• Proprietary
• No versioning support
• Single reference implementation
• Only works over reliable transport
(NetBIOS and TCP)
9P2000/Styx
• No support for pipelining requests
• No support for rich file metadata
• Only works over reliable transport
How?
Everything is a file!

• We take the approach of representing

the entire internet as a large distributed
filesystem
Goals
Simplicity
• Both in specification and in
implementation

• Limit feature set to cover 90% of
current use-cases
Flexibility
• This can mean many things, but a few
of them are:

• Don’t limit ourselves to a username/
password authentication paradigm

• Extensible file open modes
• Client endpoint portability
Reliability
• Be only as reliable as is needed
• This means not relying on TCP for
everything

• Data types likes video work much better
when the client has more control over
what pieces (frames) it needs and when
Metadata
• Almost every operating system

implements arbitrary metadata

• Enables a large set of applications:
• Better search and indexing
• Eliminates the need for ctl files
• Wacky: Facebook-esque comments!
Versioning
• Simple form of backup
• Automatically provides an audit trail
• Greatly simplifies caching content
• The problem is reduced to knowing
what the latest version of a file is
Distributed-ness
• Simple form of backup
• Automatically provides an audit trail
• Greatly simplifies caching content
• The problem is reduced to knowing
what the latest version of a file is
Design
Messages
• Request/Response model
• 10 Basic Operations:
• Tsession, Tattach, Tclunk
• Topen, Tclose, Tread, Twrite
• Tcreate, Tremove, Tflush
Messages
• Responses are prefixed with R instead,
with the exception of Rerror

• A single message may contain multiple
requests or responses

• Responses are always in the order of
the requests
Versions
• All non-dynamic files are versioned
• Versions are immutable and committed
on file close

• A ‘version’ is simply a 64-bit timestamp
Two Commit Types
Message Layout
5 data types: u16int, u32int, u64int, data, string
{hdr:data}{len:u32int}{id:u32int}{tag:u32int}K{O1...On}
Session ID Exchange
Tsession
{csid:u32int}{afid:u32int}{msize:u32int}{options:string}
Rsession
{ssid:u32int}{afid:u32int}{msize:u32int}{options:string}
Authentication
• Exact scheme used is left to the client/
server to decide

• The protocol provides an ‘afid’ that the

server will accept regular file operations
(read and write) on to execute a
particular authentication mechanism

• Encryption may also be prepared this
way (key exchange)
Proxying
Tattach
{fid:u32int}{afid:u32int}{uname:string}{aname:string}
Rattach
{afid:u32int}
Proxying
Session Close & Flush
Tclunk
{ssid:u32int}
Rclunk
{}
Tflush
{tag:u32int}
Rflush
{}
File Open
Topen
{fid:u32int}{nfid:u32int}{path:string}{mode:string}
Clone
nfid = fid
Walk
fid = fid/path
Open
File set to open with ‘mode’ and cannot be walked
Ropen
{ftype:u32int}{version:u64int}{len:u64int}
File Close
Tclose
{fid:u32int}{commit:u16int}
Rclose
{version:u64int}
Read & Write
Tread
{fid:u32int}{offset:u64int}{count:u32int}{attrs:string}
Rread
{dat:data}
Twrite
{fid:u32int}{offset:u64int}{dat:data}{attrs:string}
Rwrite
{count:u32int}
Metadata
• Manipulated using Twrite and read
using Tread by use of ‘attrs’

• ‘*’ implies all attributes
• ‘#’ implies a predefined set of values
• Key-value pairs are one per line,
appropriately quoted
Create & Remove
Tcreate
{fid:u32int}{name:string}{perm:u32int}{mode:string}
{ftype:u32int}
Rcreate
{version:u64int}
Tremove
{fid:u32int}
Rremove
{}
Did It Work?
Generator
• Operations and arguments were
changing fast during the design

• 800-line code generator takes a 125 line
JSON description of the protocol and
creates Go and C versions of a message
parsing library

• 300-line Go server helper builds on this
to provide UDP and TCP transports
Quick Test
File Download (Average over 10 attempts)
1 x 600MB
Protocol
πp
FTP
HTTP
NFS

Time
46.970s
47.195s
51.464s
44.945s

600 x 1MB
Protocol
πp
FTP
HTTP
NFS

Time
32.432s
1m18.619s
1m26.156s
44.945s
Some Ideas
• RPC (metadata instead of ctl)
• Wikifs (flexible open modes)
• Video Stream (UDP transport/Tflush)
Thank You!
Leasing
Tlease
{fid:u32int}
Rlease
{expires:u64int}
Trenew
{}
Rrenew
{}
Trevoke
{fid:u32int}
Rrevoke
{}
Reliability
Tack
{tag:u32int}
Tenq
{tag:u32int}
Renq
{tag:u32int}

More Related Content

What's hot

What's hot (20)

Secure socket later
Secure socket laterSecure socket later
Secure socket later
 
HTTPS: What, Why and How (SmashingConf Freiburg, Sep 2015)
HTTPS: What, Why and How (SmashingConf Freiburg, Sep 2015)HTTPS: What, Why and How (SmashingConf Freiburg, Sep 2015)
HTTPS: What, Why and How (SmashingConf Freiburg, Sep 2015)
 
Build RPC for PHP
Build RPC for PHPBuild RPC for PHP
Build RPC for PHP
 
HTTP vs HTTPS, Do You Really Need HTTPS?
HTTP vs HTTPS, Do You Really Need HTTPS?HTTP vs HTTPS, Do You Really Need HTTPS?
HTTP vs HTTPS, Do You Really Need HTTPS?
 
Secure socket layer
Secure socket layerSecure socket layer
Secure socket layer
 
MQTT - Communication in the Internet of Things
MQTT - Communication in the Internet of ThingsMQTT - Communication in the Internet of Things
MQTT - Communication in the Internet of Things
 
TLS/SSL Protocol Design
TLS/SSL Protocol DesignTLS/SSL Protocol Design
TLS/SSL Protocol Design
 
Maximizing Performance with SPDY and SSL
Maximizing Performance with SPDY and SSLMaximizing Performance with SPDY and SSL
Maximizing Performance with SPDY and SSL
 
What is SSL ? The Secure Sockets Layer (SSL) Protocol
What is SSL ? The Secure Sockets Layer (SSL) ProtocolWhat is SSL ? The Secure Sockets Layer (SSL) Protocol
What is SSL ? The Secure Sockets Layer (SSL) Protocol
 
SSL TLS Protocol
SSL TLS ProtocolSSL TLS Protocol
SSL TLS Protocol
 
Are we security yet
Are we security yetAre we security yet
Are we security yet
 
Secure Socket Layer
Secure Socket LayerSecure Socket Layer
Secure Socket Layer
 
Seminar on ECommerce
Seminar on ECommerce Seminar on ECommerce
Seminar on ECommerce
 
Computer networks and network security
Computer networks and network securityComputer networks and network security
Computer networks and network security
 
Experience Using RIR Whois
Experience Using RIR WhoisExperience Using RIR Whois
Experience Using RIR Whois
 
HTTP/2
HTTP/2HTTP/2
HTTP/2
 
Ssl (Secure Sockets Layer)
Ssl (Secure Sockets Layer)Ssl (Secure Sockets Layer)
Ssl (Secure Sockets Layer)
 
Secure Socket Layer (SSL)
Secure Socket Layer (SSL)Secure Socket Layer (SSL)
Secure Socket Layer (SSL)
 
Maximizing SPDY and SSL Performance (June 2014)
Maximizing SPDY and SSL Performance (June 2014)Maximizing SPDY and SSL Performance (June 2014)
Maximizing SPDY and SSL Performance (June 2014)
 
Vital Aspects of SSL Support in MySQL
Vital Aspects of SSL Support in MySQLVital Aspects of SSL Support in MySQL
Vital Aspects of SSL Support in MySQL
 

Similar to πP

SECURE SOCKET LAYER(SSL)_LECTURE SLIDES.pdf
SECURE SOCKET LAYER(SSL)_LECTURE SLIDES.pdfSECURE SOCKET LAYER(SSL)_LECTURE SLIDES.pdf
SECURE SOCKET LAYER(SSL)_LECTURE SLIDES.pdf
NiharikaDubey17
 
D1-3-Signaling
D1-3-SignalingD1-3-Signaling
D1-3-Signaling
Oleg Levy
 
Enterprise Messaging with RabbitMQ.pdf
Enterprise Messaging with RabbitMQ.pdfEnterprise Messaging with RabbitMQ.pdf
Enterprise Messaging with RabbitMQ.pdf
Ortus Solutions, Corp
 
Web essentials clients, servers and communication – the internet – basic inte...
Web essentials clients, servers and communication – the internet – basic inte...Web essentials clients, servers and communication – the internet – basic inte...
Web essentials clients, servers and communication – the internet – basic inte...
smitha273566
 

Similar to πP (20)

SECURE SOCKET LAYER(SSL)_LECTURE SLIDES.pdf
SECURE SOCKET LAYER(SSL)_LECTURE SLIDES.pdfSECURE SOCKET LAYER(SSL)_LECTURE SLIDES.pdf
SECURE SOCKET LAYER(SSL)_LECTURE SLIDES.pdf
 
Networking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGNetworking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOG
 
Kubernetes meetup: Networking for Microservices
Kubernetes meetup: Networking for MicroservicesKubernetes meetup: Networking for Microservices
Kubernetes meetup: Networking for Microservices
 
Part 6 : Internet applications
Part 6 : Internet applicationsPart 6 : Internet applications
Part 6 : Internet applications
 
D1-3-Signaling
D1-3-SignalingD1-3-Signaling
D1-3-Signaling
 
WebRTC DataChannels demystified
WebRTC DataChannels demystifiedWebRTC DataChannels demystified
WebRTC DataChannels demystified
 
Meek and domain fronting public
Meek and domain fronting publicMeek and domain fronting public
Meek and domain fronting public
 
An Introduction To World Wide Web
An Introduction To World Wide WebAn Introduction To World Wide Web
An Introduction To World Wide Web
 
Vpn(virtual private network)
Vpn(virtual private network)Vpn(virtual private network)
Vpn(virtual private network)
 
Windows Communication Foundation (WCF)
Windows Communication Foundation (WCF)Windows Communication Foundation (WCF)
Windows Communication Foundation (WCF)
 
Enterprise Messaging with RabbitMQ.pdf
Enterprise Messaging with RabbitMQ.pdfEnterprise Messaging with RabbitMQ.pdf
Enterprise Messaging with RabbitMQ.pdf
 
Decentralising data distribution
Decentralising data distributionDecentralising data distribution
Decentralising data distribution
 
CS-324-6-3 (1).pdf
CS-324-6-3 (1).pdfCS-324-6-3 (1).pdf
CS-324-6-3 (1).pdf
 
CS-324-6-3 (2).pdf
CS-324-6-3 (2).pdfCS-324-6-3 (2).pdf
CS-324-6-3 (2).pdf
 
Module 5 Application and presentation Layer .pptx
Module 5 Application and presentation Layer .pptxModule 5 Application and presentation Layer .pptx
Module 5 Application and presentation Layer .pptx
 
Alfresco DevCon 2019: Encryption at-rest and in-transit
Alfresco DevCon 2019: Encryption at-rest and in-transitAlfresco DevCon 2019: Encryption at-rest and in-transit
Alfresco DevCon 2019: Encryption at-rest and in-transit
 
Reinventing anon email
Reinventing anon emailReinventing anon email
Reinventing anon email
 
From Device to Data Center to Insights: Architectural Considerations for the ...
From Device to Data Center to Insights: Architectural Considerations for the ...From Device to Data Center to Insights: Architectural Considerations for the ...
From Device to Data Center to Insights: Architectural Considerations for the ...
 
From Device to Data Center to Insights
From Device to Data Center to InsightsFrom Device to Data Center to Insights
From Device to Data Center to Insights
 
Web essentials clients, servers and communication – the internet – basic inte...
Web essentials clients, servers and communication – the internet – basic inte...Web essentials clients, servers and communication – the internet – basic inte...
Web essentials clients, servers and communication – the internet – basic inte...
 

More from Anant Narayanan

More from Anant Narayanan (20)

Enterprise Scale Knowledge Graphs
Enterprise Scale Knowledge GraphsEnterprise Scale Knowledge Graphs
Enterprise Scale Knowledge Graphs
 
Building an Intelligent Assistant
Building an Intelligent AssistantBuilding an Intelligent Assistant
Building an Intelligent Assistant
 
WebRTC: A Practical Introduction
WebRTC: A Practical IntroductionWebRTC: A Practical Introduction
WebRTC: A Practical Introduction
 
Message Passing vs. Data Synchronization
Message Passing vs. Data SynchronizationMessage Passing vs. Data Synchronization
Message Passing vs. Data Synchronization
 
Firebase: Tales from the Trenches
Firebase: Tales from the TrenchesFirebase: Tales from the Trenches
Firebase: Tales from the Trenches
 
WebRTC: An Overview
WebRTC: An OverviewWebRTC: An Overview
WebRTC: An Overview
 
Error Handling in WebRTC
Error Handling in WebRTCError Handling in WebRTC
Error Handling in WebRTC
 
WebRTC Demystified
WebRTC DemystifiedWebRTC Demystified
WebRTC Demystified
 
WebRTC: User Security & Privacy
WebRTC: User Security & PrivacyWebRTC: User Security & Privacy
WebRTC: User Security & Privacy
 
Firefox Architecture Overview
Firefox Architecture OverviewFirefox Architecture Overview
Firefox Architecture Overview
 
Next Generation Browser Add-Ons
Next Generation Browser Add-OnsNext Generation Browser Add-Ons
Next Generation Browser Add-Ons
 
An Overview of Distributed Debugging
An Overview of Distributed DebuggingAn Overview of Distributed Debugging
An Overview of Distributed Debugging
 
A Brief Incursion into Botnet Detection
A Brief Incursion into Botnet DetectionA Brief Incursion into Botnet Detection
A Brief Incursion into Botnet Detection
 
Mozilla Weave: Integrating Services into the Browser
Mozilla Weave: Integrating Services into the BrowserMozilla Weave: Integrating Services into the Browser
Mozilla Weave: Integrating Services into the Browser
 
about:labs
about:labsabout:labs
about:labs
 
Distributed File Systems: An Overview
Distributed File Systems: An OverviewDistributed File Systems: An Overview
Distributed File Systems: An Overview
 
Innovating with Mozilla Labs
Innovating with Mozilla LabsInnovating with Mozilla Labs
Innovating with Mozilla Labs
 
Glendix: The Why and the How
Glendix: The Why and the HowGlendix: The Why and the How
Glendix: The Why and the How
 
Mozilla Prism
Mozilla PrismMozilla Prism
Mozilla Prism
 
Making Gentoo Tick
Making Gentoo TickMaking Gentoo Tick
Making Gentoo Tick
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Recently uploaded (20)

What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 

πP