RESTful p2p file sharing system in javafx