In one of my previous posts, I talked about writing a program to transfer huge files (like 10GB or so) from one computer on the internet to another. Without any third party. Now, I have version 0.2 finished. It is very rudimentary and might not work for you out of the box. This proof-of-concept though has the following features built in:
- works through a UPnP enabled internet gateway devices,
- resume support; when the transfer stops, you can continue later,
- md5 chunk hashing; every chunk of the file gets checked for integrity (like BitTorrent does),
- md5 file hashing; the complete file gets checked as well in the end.
It is written in Java and tested on Ubuntu 9.10, with Java version 1.6.0_15.
The program is not done of course. Some things should go into settings, it hasn’t been completely tested and the md5 hashing for huge files (I tested a 1G file) can take a long time. But it is a good start. Important to-dos are:
- security, right now everybody can connect and data is not encrypted,
- user interface enhancements,
- cross-platform tests (Windows/OSX),
- multiple file send.
If you want to try it out, you can find it here:
- MammothCopy-0.3.tar.gz, (more info on this release)
The program is a single window where everything happens. The screen is divided in a few parts: file handling, your own network settings, your partner settings, control buttons, progress meters and a log window.
Depending if you are sender or receiver, you either choose the file you want to send, or the target where to receive it. You should always start with setting these values.
Your network settings
Your own network settings are used as the server side of the connection. MammothCopy support UPnP, so when you are on a home broadband connection with a slightly modern router, you should be fine. All you have to do is click ‘Start’. Then, MammothCopy will try to setup the connection, through the router. When that succeeds, it will fill in the outside IP in the ‘IP address’ box and start the server side of the connection. The port to use is arbritrary; using the default should be fine.
The other side of the connection should ‘connect’ to the server side. Note that server or client side should be thought of separate from sender/receiver. The server can send and receive, just as the client (work should be done to make the UI more intuitive). The partner ‘IP adress’ and ‘port’ should be filled in, with the IP the other side provided. After the client side clicked ‘connect’, the connection should be made. After that, the transfer can start.
Send button/progress meters
Well, that’s easy. just click the ‘SEND!’ button on the sender side (as said, this could be both server or client). Then the two programs will start sending the file in chunks that are each checked for integrity. When the whole thing blows up, that’s okay, just setup the entire thing again, click ‘SEND!’ and the program will continue where it stopped. Unfinished files are marked .mammoth on the file system of the receiver.
The progress meter shows you how far we are now, in chunks and a percentage.
In the bottom of the window, there is a log window. It shows all kinds of info (currently, a lot) telling you what’s going on. Whenever you want to bugreport something, send a copy of that log.
- Person A that wants to receive something starts the program, sets up the target and clicks ‘Start’.
- Person A sends an email (or IM/phonecall/whatever) with IP and port to sender person B.
- Person B starts the program, chooses the file(s) to send, fills in IP and port.
- Person B clicks ‘SEND!’.
- Program sends the file(s).
Sending Really Big Files | Ik doe er niet aan mee · Wednesday January 13th, 2010 at 09:19 PM
[…] MammothCopy version 0.2 […]