java implementation of swarm