convert to sinatra http vs sockets