3 ms·
I suppose it's just meant to be easily embeddable into just about anything. It could be used to add webserver functionality into an existing application (think
by udp 15y ago
I suppose it's just meant to be easily embeddable into just about anything. It could be used to add webserver functionality into an existing application (think web control interface for a daemon), or it could even be used to write a complete C/C++ web-application or backend.
I don't want to make any claims about the performance of Lacewing (aside from anything else, it's too early for that) but one would assume a backend written in C/C++ would be a little faster than one written in a scripting language. Although probably quite a pain to write..!
From a technical point of view, I found that most webservers were tuned for high performance on Unix, but on Windows they wouldn't run very well at all. The news earlier about Node.js having Windows support on the roadmap (which is mainly what prompted me to release Lacewing today) suggests that it's worth supporting, and Lacewing has used IOCP and other tricks on Windows from day one.
- jason_slack 15y agowhat about embedding in an iOS app? Any thoughts on this and if Apple will let is pass?
- udp 15y agoIt would certainly be interesting to try - do you know if kqueue is available on iOS? If not, I guess the only thing to do would be writing a select() or poll() fallback for the EventPump class. I might have a look at it sometime. Having said that, I'm not sure how much use the server stuff would be on iOS, and I haven't yet written the Unix implementation of the Client class (not that that will be very much work).
- tptacek 15y agoYes, iOS has working kqueue. I have some reason to believe you can get libevent working on iOS with minimal drama; I think there's at least one app that embeds it. Which, by the way, is what I would suggest you do with your code; if you're so dependent on kqueue that it's a portability issue, you have little to lose and lots to gain by ditching the custom event loop.
- udp 15y agoI support epoll and IOCP, too, and I don't consider event handling something complicated enough to justify bringing in an external library. I quite value the freedom of dependencies Lacewing currently has (except the obvious OpenSSL, etc - although it doesn't use OpenSSL on Windows, it uses native Windows SSL).
- tptacek 15y agolibevent is small enough to simply bake in and embed, which is what I usually do, but if you like your own event library that's fine.
- jasonlotito 15y agoGood Reader seems to use a web server to allow you to upload documents, so I don't think this is an issue.
- benologist 15y agoI downloaded an app that seems to embed an FTP server in itself (comicbook lover), if that passes muster then HTTP might be OK?