Skip to content
clarus edited this page Sep 23, 2014 · 23 revisions

It seems hard and even impossible to have fully asynchronous system API on widespread operating systems such as Linux. Asynchronous calls can be emulated using one thread per call, but threads are expensive.

Waiting for this problem to be properly solved, we will design an asynchronous and OS independent API, interacting with the OS through a proxy. The proxy communicates with the application using a pipe, and tries to be as less blocking as possible.

Simple API

We describe here a simple API which will be used to start with.

Output messages

  • Log.write message
  • File.read file_name
  • TCPClientSocket.write id message
  • TCPClientSocket.close id
  • TCPServerSocket.bind port
  • TCPServerSocket.close id

Input messages

  • File.read file_name content
  • TCPClientSocket.accepted id
  • TCPClientSocket.read id content
  • TCPServerSocket.bound id

References

Clone this wiki locally