The Application Level Framing (ALF) principle states that information should be packetized by the application into Application Data Units (ADUs), each of which should be at the same time a unit of transmission, a unit of control, and a unit of processing. This paper describes a communication system architecture based on the ALF principle, which then attempts to maximize what might be gained from using ADUs. In this architecture, protocols are tailored to application requirements, i.e. to ADU types. In a first approximation we consider three specific requirements, namely in-order delivery, reliable delivery and real-time delivery. ALF based systems promise performance gains, however implementing them in practice might be a complex task. Therefore we have developed a compiler that automatically generates ALF based communication systems starting from formal specification of applications. We have used this compiler to generate protocols tailored to three specific applications. Experimental results show that the gains are linked to application "complexity".