epoll-server
Mongoose
epoll-server | Mongoose | |
---|---|---|
3 | 32 | |
8 | 10,602 | |
- | 1.2% | |
3.3 | 9.6 | |
7 months ago | 5 days ago | |
C | C | |
- | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
epoll-server
-
Notes on my incomplete JIT compiler
I also have some epoll server code at https://github.com/samsquire/epoll-server
-
Ask HN: Resources for Building a Webserver in C?
You might find my epollserver interesting.
It multiplexes multiple clients (sockets) over a thread, so you can write an event loop in each thread and serve far more requests per thread than you could if it was one thread per client or one process per client.
https://github.com/samsquire/epoll-server
-
Epoll is fundamentally broken (2017)
I wrote an epoll echo server that multiplexes multiple network connections over threads (multiple users per thread)
https://github.com/samsquire/epoll-server
I also have a 1:M:N (1 scheduler thread, M kernel threads and N lightweight green threads) multithreaded userspace scheduler which multiplexes lightweight threads onto kernel threads and can preempt hot loops with minimal overhead. I rely on the fact that you can change the looping variable from another thread if you use a structure. Preemptive interruption is very useful for the illusion of multitasking. That's why I call it a userspace scheduler.
I think the epoll-server which is kind of similar to what libuv does and the userspace scheduler could be combined into an application server.
I also wrote a multithreaded actor implementation in Java. Threads can communicate with each other between 60 million - 100 million messages a second. The epoll-server uses a multiconsumer multiproducer lockless RingBuffer.
https://GitHub.com/samsquire/multicersion-concurrency-contro...
I think the core fundamentals of building a performant application server should be done once and reused for each application.
I want to also split the threading used by recv and send of a socket so that we have a 1:R/S per socket:N scheduling (1 scheduler thread, 1 Recv thread, 1 send thread per socket). So you can send while you receive and receive while you send. True multiplexing!
Mongoose
-
Coroutines in C
I've found myself at this webpage multiple times while trying to minimize the complexity of APIs in my C projects.
My conclusion for now is that C coroutines are something to be left to the implementer. For example: Mongoose (https://github.com/cesanta/mongoose) uses event callbacks to deal with asynchronousness. It is much more pleasant to wrap a library like this in whatever thread/task primitives your system has rather than try to integrate the mythical cross-platform c couroutine.
-
BCHS stack: BSD, C, httpd, SQLite
I remember using mongoose 15 years back. Today i would have considered mongoose(10k+ stars) which is also a mature c/c++ web server[1] if not the licence.
https://github.com/cesanta/mongoose/tree/master/examples
- New scalable, fault-tolerant, and efficient open-source MQTT broker
- Eu não tinha nada melhor pra fazer, aí comecei a escrever um servidor HTTP em C do zero usando winsock.
-
Experience using crow as web server
Alternatives at the low to medium level of abstraction include civetweb and mongoose, which have a common ancestor. Both of these appear to be C rather than C++, but seem to be production quality and well-documented. Another C library is cpp-httplib, which is probably too low-level for me.
-
libonion or libhttpserver for embedding a webserver in a small application?
Since this is only going to be used internally would Mongoose be worth considering?
-
Selling proprietary library
Here’s an example: https://mongoose.ws/
- [Cpp] Quelle bibliothèque de serveur Web C++ faut-il utiliser de nos jours ?
- How to serve exactly 1 HTML file and 1 JavaScript file, then exit the program?
-
What C source code or library do you use for a local server?
If you are looking for something simple there is mongoose from cesanta, https://github.com/cesanta/mongoose
What are some alternatives?
libreactor - Extendable event driven high performance C-abstractions
libwebsockets - canonical libwebsockets.org networking library
picohttpparser - tiny HTTP parser written in C (used in HTTP::Parser::XS et al.)
C++ REST SDK - The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design. This project aims to help C++ developers connect to and interact with services.
preemptible-thread - How to preempt threads in user space
libcurl - A command line tool and library for transferring data with URL syntax, supporting DICT, FILE, FTP, FTPS, GOPHER, GOPHERS, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, MQTT, POP3, POP3S, RTMP, RTMPS, RTSP, SCP, SFTP, SMB, SMBS, SMTP, SMTPS, TELNET, TFTP, WS and WSS. libcurl offers a myriad of powerful features
assembler - amd64 assembler
POCO - The POCO C++ Libraries are powerful cross-platform C++ libraries for building network- and internet-based applications that run on desktop, server, mobile, IoT, and embedded systems.
loti - Lord of the io_uring: io_uring tutorial, examples and reference
µWebSockets - Simple, secure & standards compliant web server for the most demanding of applications
websrv - A simple C web service and REST framework
SteamVR-for-Linux - Issue tracker for the Linux port of SteamVR