echo server using ring buffer event loop