Simple interval builder and a server-side longpolling facility