One problem is finding each other. The client needs to know the DNS
name or the IP of the server. You might use DYNDNS for this. See
http://mindprod.com/jgloss/dyndns.html
Let's say this is a chat application. What you could do is have a
simple chat server. It does not relay messages. All it does it tell
everyone participating in a given chatroom everyone else's IP number.
So every time somebody joins, everyone's applet in that chatroom gets
a message. From then on speakers send multiple copies of the message
to all other chatroom participants, offloading the server. They could
use UDP with everyone listening on the same port. You may lose a
message every now and then, but that would not be critical for chat.
The ability to run a huge chatroom on a dinky server makes up for it.
All it has to do is track which participants are in which chatrooms.
You can prune the traffic back even further by having participants
automatically notify the others when they enter or leave. You could
have a "gc" sweep every once in a while to notify everyone of the
participants to help correct for lost messages.
The disadvantage of this scheme is less anonymity. A hacker could
harvest ip addresses of participants.