Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fastest way to send packets between two connected computers?

(I did search prior to asking, but I could only find fastest Java IPC techniques)

What is the fastest way in Java to send a packet between two computers in Java (connected by one ethernet cable), on Windows and Linux (if the answer varies per OS)?

I have guessed UDP would be faster than TCP (due to TCP's three-way handshake scheme), but are there any other considerations which need to be made?

Are we limited to sockets (Unix-specifc answer?) or are there alternatives? What technologies can be used to send/receive the UDP as fast as possible?

Likewise, are there particular high-performing ways to receive and read the data sent from another computer?

like image 954
user997112 Avatar asked Apr 20 '12 23:04

user997112


People also ask

What is the fastest data transfer method?

FASP® – which standards for Fast, Adaptive, and Secure Protocol – is the fastest, most secure high-speed file transfer technology available today.

What transmits data packets from one computer network to another?

Ethernet provides a basic facility to transmit a packet between two computers connected by the ethernet cable.

What is the most common way of sending and receiving files between two computers?

FTP Client Software. An FTP Client is a software designed to transfer files back-and-forth between a computer and a server over the Internet.

Can you directly connect two computers to transfer files?

Two computers can be easily connected to share the files between them or to share the internet, printer between them. The process is usually simple and can be done with a few hardware devices and a bit of software knowledge.


1 Answers

Well, there's not much between TCP/UDP if you ignore the connect/disconnect latency. If your protocol can keep a TCP conection up and disable inappropriate, latency-inducing optimizations like the Nagle algorithm, I don't see why TCP should be struck off as a solution, though there is the slight complication of requiring a protocol on-top to exchange any message larger than one byte.

Most network rate and latency performance are usually limited by phy and route constraints anyway. Looking at one packet between two peers, it doesn't matter too much what IP protocol you use since the dodgy routers, c-limited satellite links, congested fibers, noisy and retransmit-ridden microwave/wifi/3G links, and rubbish last-mile copper will stuff you up anyway.

like image 93
Martin James Avatar answered Nov 15 '22 01:11

Martin James