![]() |
Computer Science 461Distributed Computing and NetworkingFall 1997 |
|
AcmeNet is a software environment for writing programs that send and receive packets across the Internet. All of the programming assignments in COS 461 use AcmeNet. We provide you with the basic AcmeNet software; as you do the assignments you'll build up more layers of software to provide increasing levels of power and convenience.
AcmeNet uses Internet protocols, so AcmeNet processes can communicate across the campus or across the world. AcmeNet packets are transferred using the Internet's Unreliable Datagram Protocol (UDP). AcmeNet is written in Java, and you will do the programming assignments in Java.
In order to understand the workings of AcmeNet, there are three concepts you have to understand: addresses, network interfaces, and packets.
An address is just a place on the network where a process can live. Think of it like a mailing address; if you know somebody's address you can send things to them. AcmeNet addresses are represented by the Java class AcmeNet.Util.NetAddress. An address consists of a machine name (like "phoenix.princeton.edu") and a port number on that machine. Port numbers uniquely identify the different programs on a machine that might be trying to use the network at the same time.
When you create a network interface, you can either ask AcmeNet to choose an address for you, or you can insist on having a particular address. If you insist on an address, you might not get it --- there might be another process at that address already. So unless you have a good reason to demand a particular address, you're better off letting AcmeNet choose the address. (If you choose your own address, port numbers between 9000 and 10000 tend to be good.)
The purpose of a network interface is to let you send and receive data across the network. If you don't have a network interface, you can't use the network.
Every network interface has a unique address. When you send data across AcmeNet, you don't send it to a person or to a program --- you send it to a network interface. Similarly, your network interface delivers to you all of the packets that are sent to it.
The most basic AcmeNet network interface is implemented in the class AcmeNet.Util.NetworkInterface. We have provided you with the code for this class, as part of the AcmeNet Utility Library. As the semester goes on, you will extend this basic network interface class to build network interfaces that are more powerful.
A packet is a bunch of bytes that gets sent across the network. An AcmeNet program can build a packet and then hand it to a network interface to send it. When the packet reaches its destination, the destination network interface inserts the packet into an arrived-packets queue. The destination program will eventually remove the packet from the queue and then consume the packet.
Let's follow the life-cycle of a packet in a bit more detail. Assume that process A (at address A_addr, with network interface A_ni) wants to send a packet to process B (at address B_addr, with network interface B_ni).
On-line documentation is available for all of the public classes in AcmeNet. This will be updated as necessary during the semester.
The AcmeNet code is available on-line on the CIT Sparcs in /u/cs461/Code/*. As the semester goes on, we will add code to these directories. For example, when a new assignment begins, we will generally make available some useful classes that will help you with the assignment. Also, after we are done grading an assignment, we will make code for a sample solution available.
New releases of the AcmeNet software will be announced in the course newsgroup.
Last modified: Wednesday, September 24, 1997 10:04 AM