Professional Documents
Culture Documents
Live Mesh Based FTP Adapter
Live Mesh Based FTP Adapter
Your work computer. Your home laptop. Your Mac. Your mobile phone. Devices live in multiple places. But the files you needand the programs that open themoften dont. Live Mesh changes all that.
SYNC
Have your devices working together. Add each device to your mesh by installing the Live Mesh software, and then choose folders to sync.
SHARE
Live Mesh makes it easy to share your stuff. Invite others to share a Live Mesh folder and keep it in sync on everyones devices as files are added or updated.
ACCESS
When you sign up for Live Mesh, you automatically get your own personal Live Desktop--with 5 GB of free storage. Synchronize files to your Live Desktop, and youll be able to access them using almost any web browser, even remotely
Currently, Live Mesh is running on HTTP protocol. Our objective is to make this service compatible with FTP. The adapter will accept FTP requests, convert them to HTTP, interact with Live Mesh and vice versa.
BASIC ARCHITECTURE
BASIC FLOW
Server catches the request from the client. Interpretation of the request, mapping from FTP to HTTP request. Creation of XML document. Serialization into XOP packages. Send to Live Mesh.
WHY FTP ?
The Advantages
FTP
is Faster
Enables
Increased
Expanded
User Base
FTP
It is a file transfer protocol for exchanging and manipulating files over any TCP-based computer network such as the Internet. A FTP client and a FTP server are required. Two connections are established between the client and the server. One is for data transfer and other is for the control information.
FTP
uses Port 21 for Control Connection and Port 20 for Data Connection. servers by default listen on Port 21 for incoming connections from FTP clients which forms the Control stream on which commands are passed. actual file transfer takes place on the Data Connection.
FTP
The
FTP
FTP COMMANDS
FTP SERVER
FTP CLIENT
SOCKETS
Is a software endpoint that establishes bidirectional communication between a server program and one or more client programs Associates the server program with a specific hardware port on the machine System.Net.Sockets.TcpClient
THREADS
Multi-threaded server creates a thread for each communication it accepts from a client. A thread is a sequence of instructions that run independently of the program and of any other threads. System.Threading.Thread
OUTLINE
Server catches FTP request from client Maps it to corresponding HTTP request An XML doc is created using ATOM protocol Serialization into XOP Send to Live Mesh
ATOM
The name Atom applies to a pair of related standards. The Atom Syndication Format is an XML language used for web feeds, while the Atom Publishing Protocol (AtomPub or APP) is a simple HTTPbased protocol for creating and updating web resources
ATOM COLLECTIONS
Central concept in protocol a resource that contains a set of Member Entries Analogous to folders or directories in a file system. Each collection has a unique URI Adding an entry to a collection yields a new URI All operations done on URIs with GET, POST, PUT, DELETE
FUNCTIONS AVAILABLE
DISCOVERY
To discover the location of the collections in an APP service, the client must request an Introspection Document. Client Server | | | 1.) GET Introspection | |--------------------------------------> | | | | 2.) Introspection Doc | |<-------------------------------------- |
CREATE
Client Server | | | 1.) POST to Collection URI | |----------------------------------------->| | | | 2.) 201 Created @Location | |<-----------------------------------------| | |
POSTING AN ENTRY
POST /edit/ HTTP/1.1 Host: media.example.org Content-Type: image/png Slug: The Beach
XOP
It is an alternate serialization of XML that just happens to look like a MIME package, with an XML document as the root part.