11 ms·
Link to the lithium homepage: https://github.com/matt-42/lithium https://github.com/matt-42/lithium
by matt42 6y ago
Link to the lithium homepage: https://github.com/matt-42/lithium https://github.com/matt-42/lithium
- Flow 6y agoIt's Linux only apparently. Is it the use of some Linux only kernel API that enables it to be slightly faster than the other frameworks?
- matt42 6y agoIt is linux only because it's based on epoll. It could be easily ported to macos and windows but my focus was to get the performances right first.
- jeremyjh 6y agoThere are still a lot of people who develop on MacOS and deploy on linux, so a kqueue port would be valuable even if it were not as well tuned.
- matt42 6y agoa kqueue port should be ok. I'll add an issue for it.
- giancarlostoro 6y agoOne could argue if it works on WSL then it works on Windows for development use cases to deploy on Linux.
- hinkley 6y agoThere are a few libraries that wrap epoll and friends to work more cross platform. How widely do you use it? Everywhere? A few spots?
- matt42 6y agoThe epoll code use is very small, few hundreds of LOC (but is at the very center of the framework since it runs the event loop), actually writing it from scratch was better to understand the mechanism, to optimize it and to adapt it for non blocking sql.
- fluffy87 6y agoCan you do an AMA? Why did you create lithium? How long have you been working on it? What do you do professionally? What are your plans for it?
- matt42 6y agoCan you do an AMA? of course! Why did you create lithium? To see how much C++ can get closer to dynamic langagues typically used for web programming and at the same time make absolutely no compromise on performances. How long have you been working on it? 8 months on lithium, but I already wrote another framework (silicon, which I rewrote from scratch because of slow compilation time). What do you do professionally? I worked for several company, doing different things including, real time image processing, neural nets for photography, web programming, robotics What are your plans for it? No big plans yet, just having fun for now, but I'd like to keep implementing the features if the users ask for it, improve the doc. In the more long term, building websockets would be nice too, and other services on top of it.
- altcognito 6y agoWhat's the real time image processing stuff you work on?
- matt42 6y agoHigh density point tracking and optical flow was a big part of my PhD, here is a demo :) https://www.youtube.com/watch?v=GIUDAZLfYhY https://www.youtube.com/watch?v=GIUDAZLfYhY
- ilovelearning 6y agoImpressive! Two questions. What’s your opinion regarding Rust versus C++? And what robotics stuff have you worked on?
- matt42 6y agoFor Rust vs c++: - I never used rust but I like the language and the safety it provides. - a mainstream package/dependency manager is missing in C++ so rust is clearly better on this point. This is a big problem for the C++ community where code is much less shared than in the javascript community for example. - The other big problem I have with C++ is compile time, I heard that Rust is slow too but I never compared the two. And what robotics stuff have you worked on? I'm building a offline programming tool for industrial robots: http://stara-robotics.com/ http://stara-robotics.com/
- ponytech 6y agoThanks for the link. A web search for "lithium web framework" gave https://li3.me https://li3.me as the first result, which is a PHP framework. Why did you pick such a name if already taken by a similar product?
- matt42 6y agoI was not aware of li3.me and when I realized it, I was too lazy to find a new name..
- yesbutt11 6y agoRe: metamap being zero cost I thought there were no zero cost abstractions in C++? https://youtu.be/rHIkrotSwcc https://youtu.be/rHIkrotSwcc Still, it isn’t RoR or anything JS so it has that going for it.
- matt42 6y agoYes zero cost is subjective. It has a cost at least at compile time. But you can see metamap is a like loop unrolling for objects (if you think loop unrolling is zero cost then metamap too).
- codekilla 6y agoThis looks great. How would you compare to seastar?
- matt42 6y agoSadly seastar has no implementation of this benchmark. I had a quick look at the website and it seams that seastar is much more low level (it does not provide a http parser) and more generic that lithium, which is focused on simplifying the writing of HTTP APIs.