• Stars
    star
    123
  • Rank 290,145 (Top 6 %)
  • Language
    C
  • License
    Other
  • Created almost 11 years ago
  • Updated almost 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Fork of Tsunami UDP File Transfer Server and Client w/fix to compile on MacOS

NEW STUFFS

This repository contains a couple of additional scripts to help you to build, to deploy or to use Tsunami on Amazon Web Services (AWS)

  • AWS CloudFormation template to create a Tsunami Build Server
  • Bootstrap shell script to download and to build Tsunami on an Amazon EC2 Instance
  • Binaries are available for your convenience

========================================================================

NOTE: below is the original unmodified 2002 README, it does not fully reflect the current status... ;-) After reading this file, also see the COMPILING.txt and USAGE.txt files for newer instructions.

========================================================================

NOTE:

This file is not intended to be comprehensive documentation for the Tsunami protocol or the programs in the Tsunami suite. We are working on formal documentation, but it is not yet ready for public release. Please bear with us -- Tsunami is a young and rapidly evolving protocol, and we're documenting a moving target.

Tsunami is built using the standard GNU autoconf/automake system. To install, use the standard './configure', 'make', 'make install' sequence. (Thanks are due to Jeff Squyres [email protected] of Indiana University's Open Systems Lab for bringing us into the modern age of automated building and configuration.)

Building Tsunami will create the Tsunami client (tsunami), the Tsunami server (tsunamid), and two utilities for benchmarking disk subsystem performance (readtest and writetest).

Later in this file, you'll find details on how Tsunami currently performs authentication.

Please share with us any Tsunami performance data you can offer! Ideally, we'd like to have hardware profiles of the client and server systems (CPU, disk controller, memory size, kernel version, bdflush settings, and so forth), the output of tsunami and tsunamid during file transmission, the output of vmstat on both the client and server, and the protocol parameters used. This data will help us to tune the protocol and make the next release more robust.

And finally, please read the license agreement found in LICENSE.TXT.

If you have any technical questions about the Tsunami protocol, please subscribe to the Tsunami LISTSERV. Instructions can be found on the mailing list home page at:

http://listserv.indiana.edu/archives/tsunami-l.html

========================================================================

The Tsunami protocol

A basic Tsunami conversation works like this:

(1) The client connects to the Tsunamid TCP port (46224 by default). The server forks off a child process to deal with the connection.

(2) The client and server exchange protocol revision numbers to make sure that they're talking the same language. (The revision number is defined in "tsunami.h".)

(3) The client authenticates to the server. This process is described later in this file.

(4) The server is now waiting for the name of a file to transfer to the client.

(5) Once the file name is received, the server makes sure that it can open and read the file. If it can, a positive result byte is sent to the client. If it can't, the server reports failure.

(6) The client and server exchange protocol parameter information.

(7) The client sends the server the number of the UDP port on which the client will listen for the file data.

(8) The server and client both enter their file transmission loops.

========================================================================

The server file transmission loop

while the whole file hasn't been sent yet: see if the client has sent a request over the TCP pipe (*) if it has: service that request otherwise: send the next block in the file delay for the next packet

(*) There are three kinds of request: (1) error rate notification (2) retransfer block [nn] (3) restart transfer at block [nn]

========================================================================

The client file transmission loop

while the whole file hasn't been received yet: try to receive another block if it's the last block: break out of the loop and notify the server otherwise: on every 50th iteration, see if it's been [update_period] since our last statistics update if it has: display updated statistics notify the server of our current error rate transmit our queue of retransmission requests save the block if the block is later than the one we were expecting: put intervening blocks in the retransmission queue if the block is earlier than the one we were expecting: remove the block from the retransmission queue

========================================================================

The retransmission queue

This is a (potentially) sparse array of block numbers that we may need to have retransmitted. Each entry is either 0 or a block number. The size of the array is doubled if it runs out of space. We keep track of the lowest index used and the highest index used and rehome the data to the base of the array occasionally.

If the queue is extremely large (over [threshold] entries), instead of asking for each entry in the queue, we ask to restart the transfer at the first block in the queue.

========================================================================

How Tsunami does authentication

The Tsunami server and Tsunami client both know a shared secret. (Right now it's coded into the Tsunami server as "kitten", but this can be overridden with the '--secret' option.) The client learns the shared secret by giving the user a 'password' prompt and reading it in with echo turned off.

The following sequence allows the client to prove its knowledge of the shared secret to the server:

(1) The server reads 512 bits of random data from /dev/random and sends this data to the client.

(2) The client XORs copies of the shared secret over the random data.

(3) The client sends an MD5 hash of the resulting buffer back to the server.

(4) The server performs the same XOR/MD5 operation on the random data and checks to make sure that they match. If they do, a positive result byte is sent to the client. If they don't, the connection is closed.

========================================================================

Other notes

(1) Everything is endian-independent except for the MD5 code.

(2) Everything does work okay with 64-bit file sizes, using the fopen64() / fseeko64() API.

(3) Porting from Linux shouldn't be hard. The OS-dependent bits are the use of /dev/random and the fixed-size data types defined in <sys/types.h>. Linux uses "u_int32_t", Solaris uses "uint32_t". That sort of thing. Solaris also lacks getopt_long() found in glibc.

(4) This probably does require gcc to build. I use the GNU "long long" datatype quite a bit for manipulating 64-bit values.

(5) The tuning in response to the current error rate is still under active research and development. Future releases may change this code significantly.

(6) Disk-to-disk on the same box is a bad test platform. The scheduling daemon and the behavior of the loopback device make everything go to hell.

(7) The client has a limited amount of online help. Use 'help' to see it.

(8) The server has a limited amount of usage information. Run it with the '--help' option to see it.

More Repositories

1

AWSVPN

Start a private VPN server in the cloud.
Shell
181
star
2

xcodeinstall

A command line tool to download and install Apple's Xcode
Swift
38
star
3

amplify-ios-getting-started

This is the editable material for Amplify's iOS Getting Started guide.
Shell
37
star
4

amplify-datastore-js-e2e

Amplify Datastore React Demo
JavaScript
31
star
5

amplify-mobile-news-blog

iOS and Android code sample for Amplify Mobile GA News Blog
Swift
19
star
6

amplify-react-workshop

Source Code for Amplify React Workshop and Presentation
JavaScript
17
star
7

cdk-load-balance-autoscaling-groups

CDK Example Code to deploy Load Balanced Scaling Groups
HTML
16
star
8

feature-flag-demo

TypeScript
11
star
9

swift-build-agent-sqs

A build agent based on Amazon SQS, written in Swift
Swift
11
star
10

kms-demo

KMS Python Demo
Python
11
star
11

cdk-ipv6

A CDK script o deploy an IPv6 VPC
TypeScript
10
star
12

AMIFinder

CloudFormation Custom Resource to dynamically find valid Windows AMI Ids
Python
8
star
13

bien-demarrer-aws

Bien Démarrer sur AWS
Python
8
star
14

swift-custom-runtime-lambda

Provide an AWS Lambda runtime implemntation for Swift programming language
Swift
8
star
15

amplify-ios-workshop

Repo for Amplify iOS Workshop created for re:Invent 2019
HTML
7
star
16

cdk-vpc-example

CDK code to show how to create instances in a VPC
HTML
7
star
17

sagemaker-jumpstart-demo

The source code used for the Amazon Sagemaker JumpStart demo during AWS Innovate AIML EMEA Conference Feb 24 2021
TypeScript
7
star
18

AWSDNSAuth

Creates AWS Authentication Header for Route 53 API Calls
Python
7
star
19

ecs-demo

HTML
7
star
20

tictactoe-cdk

CDK script for a multi region deployment of the TicTacToe game (available at https://github.com/sebsto/tictactoe-dynamodb)
CSS
6
star
21

alexa-polly

Webservice to transform Polly's output in a format accepted by Alexa SSML
JavaScript
5
star
22

maxi80-alexa

TypeScript
5
star
23

s3sign

Simple script to generate AWS S3 Signed URL
Python
5
star
24

webapp

Sample Web App with Maven for Jenkins Demo
Java
5
star
25

amplify-android-getting-started

This is the editable material for Amplify's Android Getting Started guide.
Kotlin
5
star
26

cdkv2-vpc-example

CDK v2 example to deploy a VPC and EC2 Instances
HTML
5
star
27

mongo-client-side-encryption

a sample code to show how to use AWS KMS and IAM Roles with MongoDB Client-Side Field Level Encryption
JavaScript
5
star
28

earthquake

Cocoa front end for Tsunami UDP
Objective-C
5
star
29

FinderExtra

macOS Finder Extension
Swift
4
star
30

signup-flask-nginx-docker

Sample Signup application running with Flask, nginx, uWSGI
TypeScript
4
star
31

tictactoe-dynamodb

Python
3
star
32

amplify-datastore-swift

This is a sample Swift application to demonstrate Amplify datastore swift library. Offline first, real time data synchronization
Swift
3
star
33

meetup-crawler

A serverless crawler of meetup.com data for analytics purposes
Python
3
star
34

maxi80-backend

Backend API for Maxi80 client apps
Python
2
star
35

aws-training-demo

Scala
2
star
36

swift-lambda-hello-world

Swift
2
star
37

rds-aurora-demo

Demo presented during AWS Innovate online conference - https://pages.awscloud.com/NAMER-field-OE-AWS-Innovate-Databases-and-Analytics-Edition-2019-reg-event.html
Java
2
star
38

babelfish-demo

Sample code for a Babelfish demo
C#
2
star
39

www.stormacq.com

Source code for personal website
HTML
2
star
40

stackoverflow-samples

Random code written to answer stackoverflow questions
Swift
2
star
41

guestbook-demo

Sample NodeJS + MySQL app with CDK deployment script
JavaScript
2
star
42

raspberrypi-ec2control

Python
1
star
43

alexa-typescript-decorators

Sample Hello World project to demonstrate usage of Typescript decorators
TypeScript
1
star
44

UTI

Simple command line utility to change macOS UTI handlers
Swift
1
star
45

SubnetFinder

Custom CloudFormation resource allowing to dynamically find VPC subnet based on tags
Python
1
star
46

amplify-console-demo

Demo for Amplify console pull requests
JavaScript
1
star
47

monotomicro

Monolith to micro services demo
TypeScript
1
star
48

amplify-memories

A sample app using Amplify Swift library
Swift
1
star
49

programmez.com-alexa

Example de code pour un article sur programmez.com
JavaScript
1
star
50

form_data_collect

a simple web service to collect data from HTML form
Python
1
star
51

alexa-oauth-http-proxy

An HTTP Proxy to debug OAuth errors for Alexa Skills
JavaScript
1
star