initial server gateway implementation.