Twister is an application programming interface (API) to write fast packet processing applications. It has been built as an abstraction layer on top of Intel's data plane development kit (DPDK).
Twister API is a simple C programming API built on top of DPDK. It abstracts the complexity of DPDK. The value of Twister lies in reducing the learning curve of DPDK and providing a traditional API - like a normal Linux API - which users would be more comfortable using. Twister is modeled after a well-known library, Libuv, to make it more intuitive for users to use callback routines for applications.
The key challenge is to overcome performance issues in the cloud environment especially in the case of latency sensitive applications to achieve the line rate close to that of the underlying hardware. Virtualized Network Functions (VNFs) running on traditional TCP/IP stack run at a slow rate due to Linux kernel overhead which involves system calls, context switching on blocking I/O, data copying from kernel to user spaceand interrupt handling in kernel.
To avoid this overhead, Intel has introduced a technology called DPDK. With DPDK, all the packet processing is done in user space. This eliminates the need to copy data from the kernel space to the user space as DPDK uses zero copy scheme by putting data, directly from Network Interface card (NIC) queues to application memory. It uses pole mode driver (PMD) because of which there is no interrupt overhead. These functionalities and features pose some complexity and a steep learning curve for network application developers. The developers interested in writing fast packet processing applications need to understand a whole new development model -- which DPDK provides -- which is far from the conventional development model. Twister API is built to overcome the learning curve and make the DPDK's API more generic.
Contribution to the development of Twister was done by Mr. Wenjing Chu and xFlow Research Inc.