backend java rest-api socket