implement EventSource on the relay server
test_relay: refactor