What is VNet ?

VNet is a message-based virtual network written in Java. The VNet server works like a central switch in a star-shaped network. VNet clients connect to the server in order to participate on the network.

How is it distributed ?

The VNet library is a jar file containing the following 3 Java packages:

  • The org.amega.vnet.core package. Contains core classes that are used to implement both the VNet server and VNet clients.
  • The org.amega.vnet.server package. Contains classes implementing the general purpose VNet server. Note that since this is a library, there is no executable classes. The server is controlled via the ServerControl class, and needs a wrapper program to run.
  • The org.amega.vnet.client package. Contains classes that may be embedded in applications to enable them to participate on a VNet network.

VNet Architecture

A VNet system consists of a single VNet server and several VNet clients. The VNet server and the VNet clients form a star-shaped network. All clients connected to the server can see each other and exchange messages via the server; they form a virtual network (and hence the name VNet). The main tasks of the server are to let the clients know who is currently on the network and to route messages sent from one client to another. The server also supports proxy connections between clients.

It is important to note that a VNet client may act as a server for other VNet clients. This means that we do not really need the VNet server to contain any special purpose code. On the other hand, extending the VNet server itself may give better overall performance. The VNet server is designed as a set of embedded servers; Adding new servers is easy :)

Running the VNet server

The VNet library contains classes that may be used to create VNet client applications. It also contains all classes needed to run a VNet server, but since it is trying to keep its pureness as a library it does not contain any executable classes. You therefore need a wrapper program in order to run the VNet server. This wrapper program may be written in Java, or it may be written in C++, using the Java Nativa Interface to control the server. This enables cool stuff like running the VNet server as a service under NT (yes, I have tried it; it worked). The server wrapper program uses the amega.org.vnet.ServerControl object to control the operation of the VNet server. If you make your own server components, just let the wrapper program register them with the ServerControl object on startup.

Since you probably don't want to waste time writing your own customized wrapper program just yet you may download a simple wrapper written in Java. You may find it in the download section a little further down this page.

Licence Terms

The software downloadable on this page is freeware. You may use and re-distribute it as you wish, but you may not take credit for it. Any distribution of this software or software based on this software should give credit to the author: 'Venger [venger@agurk.net]'. I do not take any responsibility for any damage you manage to cause while using this software etc. etc.

Documentation

Javadoc documentation for the VNet library may be found here [no frames].

Download

Compiled Code

  • [VNet library]To install the VNet library simply copy the vnet.jar file into the 'lib/ext' directory directly below your Java Runtime Environment directory. This uses the 'Java Extension Mechanism' to make the VNet library part of your Java Runtime Environment.
  • [Simple Java VNetServer Wrapper] Place the zip file in an empty directory and unzip it. Then edit the files 'vnetserver.pwd' and 'vnetserver.cfg' to your liking (password file and config file). To run the server do 'java -jar vnetserver.jar' or 'javaw -jar vnetserver.jar'. If your JRE does not support running jar files, you might need to extract all the files and run the VNetServer class manually.
  • [ComCenter] a VNet client application for sending text messages, chatting and sending files. Run ComCenter by writing 'java -jar comcenter.jar'. If your JRE does not support running jar files, you might need to extract all the files and run the ComCenter class manually. When running ComCenter against a VNet server, you will need to log in with a valid username/password combination. If you use the server wrapper supplied above, please take a look at the 'vnetserver.pwd' file. Try to run several ComCenter clients against the same VNet server in order to communicate; have fun.

Source Code (because I'm such a nice guy ;)

Feedback

Comments, ideas, questions or your general opinion about VNet may be sent to venger@agurk.net.

[Home][Java Libs]