Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 32

LIVE MESH BASED FTP ADAPTER

WINDOWS LIVE MESH

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.

WHAT THE MESH IS


Live Mesh is a data synchronization system from Microsoft that allows files, folders and other data to be shared and synchronized across multiple devices. Once a folder is set for synchronization, it will be available in all devices, and any changes made to the content of the folder will be reflected across all devices. Devices in a sync relationship are collectively referred to as a Mesh.

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

THE FTP ADAPTER

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.

Response is vice versa.

WHY FTP ?
The Advantages

FTP

is Faster

Enables

Multiple Item Upload in a Single Request


Security

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

USE OF HTTP METHODS

FUNCTIONS AVAILABLE

Discovery Listing Create Read Update Delete

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

Authorization: Basic ZGFmZnk6c2VjZXJldA==


Content-Length: nnn ...binary data...

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.

RESPONSE FROM LIVE-MESH SERVER


HTTP/1.1 201 Created Date: Fri, 7 Oct 2005 17:17:11 GMT Content-Length: nnn Content-Type: application/atom+xml;charset="utf-8" Location: http://example.org/media/edit/the_beach.atom <?xml version="1.0"?> <entry xmlns="http://www.w3.org/2005/Atom"> <title>The Beach</title> <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id> <updated>2005-10-07T17:17:08Z</updated> <author><name>Daffy</name></author> <summary type="text" /> <content type="image/png" src="http://media.example.org/the_beach.png"/> <link rel="edit-media" href="http://media.example.org/edit/the_beach.png" /> </entry>

You might also like