riolet / WAFer

WAFer is a C language-based software platform for scalable server-side and networking applications. Think node.js for C programmers.
GNU General Public License v2.0
690 stars 69 forks source link

nope.c architecture #36

Open riolet opened 9 years ago

riolet commented 9 years ago

Let's have a brief discussion about nope.c architecture. What I have in mind for nope.c is a layered architecture that embodies the Unix philosophy with three main strata:

  1. The core (nope.c): A minimalist HTTP server, mostly focussing on the event loop. We are using select() currently, but we could provide additional event notification systems (poll(),epoll() etc) as drop in replacements.
  2. The shell (nopeutils.c - optional): Provides a programming interface to the core, abstracting over most of the cores operations.
  3. The modules (optional): Provides various enhancements to make it easier to write useful web applications. nope.c does not need many specific nope.c modules as there are thousands of c libraries that nope.c can use natively. That said, we need modules for ssl, multi-part parsing and web sockets.

What are your thoughts?

Charles0429 commented 9 years ago

When considering performance issues, I think some components such as memory pool, connection pool may be added into the project, so what does these components belong to?

truongminh commented 9 years ago

If performance issues are considered vital, connection pool and memory pool should be part of the core.

riolet commented 9 years ago

@Charles0429 and @truongminh, please take a look at the multithreaded branch I am working on.