Live Mesh Based Ftp Adapter

Embed Size (px)

Citation preview

  • 7/29/2019 Live Mesh Based Ftp Adapter

    1/32

    LIVE MESH BASED FTP

    ADAPTER

  • 7/29/2019 Live Mesh Based Ftp Adapter

    2/32

    WINDOWSLIVEMESH

    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.

  • 7/29/2019 Live Mesh Based Ftp Adapter

    3/32

    WHATTHEMESHIS

    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 collectivelyreferred to as a Mesh.

  • 7/29/2019 Live Mesh Based Ftp Adapter

    4/32

    SYNC

    Have your devices working together. Add each

    device to your mesh by installing the Live Meshsoftware, and then choose folders to sync.

  • 7/29/2019 Live Mesh Based Ftp Adapter

    5/32

    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.

  • 7/29/2019 Live Mesh Based Ftp Adapter

    6/32

    ACCESS

    When you sign up for Live Mesh, you automatically

    get your own personal Live Desktop--with 5 GB offree storage. Synchronize files to your Live

    Desktop, and youll be able to access them using

    almost any web browser, even remotely

  • 7/29/2019 Live Mesh Based Ftp Adapter

    7/32

  • 7/29/2019 Live Mesh Based Ftp Adapter

    8/32

    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.

  • 7/29/2019 Live Mesh Based Ftp Adapter

    9/32

    BASIC ARCHITECTURE

  • 7/29/2019 Live Mesh Based Ftp Adapter

    10/32

    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.

  • 7/29/2019 Live Mesh Based Ftp Adapter

    11/32

    WHY FTP?The Advantages

  • 7/29/2019 Live Mesh Based Ftp Adapter

    12/32

    FTP is Faster

    Enables Multiple Item Upload in a

    Single Request

    Increased Security

    Expanded User Base

  • 7/29/2019 Live Mesh Based Ftp Adapter

    13/32

    FTP

    It is a file transfer protocol for exchanging andmanipulating 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 andother is for the control information.

  • 7/29/2019 Live Mesh Based Ftp Adapter

    14/32

    FTP uses Port 21 for Control Connection and

    Port 20 for Data Connection.

    FTP servers by default listen on Port 21 for

    incoming connections from FTP clients whichforms the Control stream on which commands

    are passed.

    The actual file transfer takes place on the Data

    Connection.

  • 7/29/2019 Live Mesh Based Ftp Adapter

    15/32

    FTP

  • 7/29/2019 Live Mesh Based Ftp Adapter

    16/32

    FTP COMMANDS

  • 7/29/2019 Live Mesh Based Ftp Adapter

    17/32

    FTP SERVER

  • 7/29/2019 Live Mesh Based Ftp Adapter

    18/32

    FTP CLIENT

  • 7/29/2019 Live Mesh Based Ftp Adapter

    19/32

    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

  • 7/29/2019 Live Mesh Based Ftp Adapter

    20/32

    THREADS

    Multi-threaded server creates a thread for each

    communication it accepts from a client.

    A thread is a sequence of instructions that runindependently of the program and of any other

    threads.

    System.Threading.Thread

  • 7/29/2019 Live Mesh Based Ftp Adapter

    21/32

  • 7/29/2019 Live Mesh Based Ftp Adapter

    22/32

    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

  • 7/29/2019 Live Mesh Based Ftp Adapter

    23/32

    ATOM

    The name Atom applies to a pair of related

    standards.

    The Atom Syndication Format is an XML languageused for web feeds, while the Atom Publishing

    Protocol (AtomPub or APP) is a simple HTTP-

    based protocol for creating and updating web

    resources

  • 7/29/2019 Live Mesh Based Ftp Adapter

    24/32

    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

  • 7/29/2019 Live Mesh Based Ftp Adapter

    25/32

    USE OF HTTP METHODS

  • 7/29/2019 Live Mesh Based Ftp Adapter

    26/32

    FUNCTIONSAVAILABLE

    Discovery

    Listing

    Create

    Read Update

    Delete

  • 7/29/2019 Live Mesh Based Ftp Adapter

    27/32

    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 |

    |

  • 7/29/2019 Live Mesh Based Ftp Adapter

    28/32

    CREATE

    Client Server

    | |

    | 1.) POST to Collection URI |

    |----------------------------------------->|

    | |

    | 2.) 201 Created @Location |

    |

  • 7/29/2019 Live Mesh Based Ftp Adapter

    29/32

    POSTINGAN 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...

  • 7/29/2019 Live Mesh Based Ftp Adapter

    30/32

    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.

  • 7/29/2019 Live Mesh Based Ftp Adapter

    31/32

    RESPONSE FROM LIVE-MESHSERVERHTTP/1.1 201 Created

    Date: Fri, 7 Oct 2005 17:17:11 GMTContent-Length: nnn

    Content-Type: application/atom+xml;charset="utf-8"

    Location: http://example.org/media/edit/the_beach.atom

    The Beach

    urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a

    2005-10-07T17:17:08Z

    Daffy

  • 7/29/2019 Live Mesh Based Ftp Adapter

    32/32