On the design of application protocols door