Coder Social home page Coder Social logo

u20024804 / parcel Goto Github PK

View Code? Open in Web Editor NEW

This project forked from millerjs/parcel

0.0 2.0 0.0 15.86 MB

Combining a UDT network proxy with resumable performant HTTP downloads

License: Apache License 2.0

Makefile 0.85% Shell 0.30% Batchfile 0.01% Python 7.16% C++ 68.52% C 2.33% HTML 20.65% CSS 0.17% Roff 0.02%

parcel's Introduction

Synopsis

A high performance HTTP download client that leverages the speed of UDP without sacrificing reliability.

Parcel is written on top of the UDT protocol and bound to a python interface. Parcel's software is comprised of a parcel-server and a parcel client.

Download and run

For the latest parcel app, visit the downloads here. These binaries are self-contained executables and will not install the app globally on your system.

Installing from source

You can also install from source with:

❯ pip install -e 'git+https://github.com/LabAdvComp/parcel#egg=parcel'

Usage

Proxy your app traffic over UDT!

The idea of the proxy is to tunnel traffic from one LAN to another remote LAN via UDT. You can use this to connect any client to a remote server over a WAN via UDT.

Example

You have the following:

  • Host 1: This is the host with your custom client running on it. You want to listen for incoming local TCP connections on this host and translate them to send remotely over UDT. You should run the parcel-tcp2udt proxy on Host 1. This is represented by LAN 1 in the diagram below.
  • Host 2: This is the host with your custom server running on it. You want to listen for incoming UDT connections on this host and translate them to local TCP. You should run the parcel-udt2tcp proxy on Host 1. This is represented by LAN 2 in the diagram below.
  • You have a client running on host1 (LAN 1)
  • You have a server running on host2 (LAN 2) on port port
  1. Run parcel-tcp2udt host2:9000
    • This will start a proxy that will connect to the udt2tcp proxy which is by default bound to port 9000.
  2. Run parcel-udt2tcp localhost:port
    • This will start a proxy on host2, port 9000 that will listen for incoming UDT connections, translate them to TCP, and send them along to your server on host2:port

Proxy diagram

  • In the diagram above, the arrows relate to the direction of the socket connection, not the traffic. The information transfer is actually bidirectional, i.e. both proxies can send and receive data.
  • This is a drop in replacement for the workflow where the client connects directly to the server over the WAN.
  • Your client connects to the tcp2udt proxy which connects to the udt2tcp proxy which connects to your server. Then information flows back and forth until either the client or server breaks the connection.
  • The proxies can support multiple connections at once in parallel.

HTTP Download

Using: TCP

This is the default option and can be run directly against a REST api without any additional server. Using this method, you are likely to see decreased performance over high latency networks.

Using: UDT

The client can be run in conjunction with a parcel server, or without one. The advantage of running the client with the server (option udt) is the UDT proxy layer. This prevents performance degredation of Wide Area Networks.

The server is given a REST endpoint with access to data. The client connects to the server via UDT and the data is translated to a local TCP connection. Any TCP response is then proxied back using UDT.

Note: The UDT option is not currently bundled with executable binaries, you must install from source.

Example Usage

To use the client interactively

❯ parcel

OR

❯ parcel -t token_file file_id1 file_id2

OR

❯ parcel -u -t token_file file_id1 file_id2

Motivation

TCP is the most widely used reliable network transport protocol. However, over high performance, wide area networks, TCP has been show to reach a bottleneck before UDP.

UDT (UDP Based Data transfer) is a reliable application level protocol for transferring bulk data over wide area networks.

Dependencies

Tests

To run the tests:

❯ pip install pytest
❯ py.test

parcel's People

Contributors

careygister avatar millerjs avatar murphymarkw avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.