Cutelyst, the C++/Qt web framework just got a new major release.
Under the hood it now has both Qt5 and Qt6 support, but because of this a few things had to be changed, the most important one was QMap usage as a multi-key container had to be changed to QMultiMap, if you used ParamsMultiMap types or auto when assigning there's probably little to do, one major exception is that if you still use Grantlee it might not work well, but Cutelee is there with fixes and is almost ported to Qt6.
Another API changes were on the authentication classes that have some friendly methods for QString passwords, WSGI module is now called Cutelyst::Server, it allows you to embed Cutelyst on other applications or have it as a stand alone executable, allowing for better LTO as you can get all stuff compiled as static libraries.
For the future I'm leaning towards increasing minimum version to Qt 5.12 (sadly means LGPLv2 for Qt5.6 will be gone) to start using QStringView where possible.
SimpleMail is a small Qt library for sending mails, this release makes sure it compiles fine with Qt6, and has some small issues fixed.
I thought this would give me a bit of work but was mostly changing CMakeLists.txt and including one header.
This week I'll start working for KDAB :) and my first task will be porting one app to Qt6, so I decided to do a little of homework and port my own stuff first as you might have noticed (Cutelyst and ASql).
Cutelyst a Qt Web Framework and ASql an asyncronous SQL library for Qt got new releases.
The Cutelyst version 2.14.0 was made in December but was a silent one, I had some issues in production but weren't related to Cutelyst, the .1 release included some contributions by Adriaan de Groot, I also did some changes for Qt 5.15 and Qt6 but for Qt6 a new major version is needed.
Besides a bunch of fixes, a major regression on the plaintext benchmarks got fixed, unfourtunately not in time for round 20, but thanks to ASql you will Cutelyst got a better scoring on SQL related benchmarks
ASql also got a bunch of bug fixes, but most importantly it's now Qt6 ready.
And speaking of Qt6 Cutelyst port is also completed now, after I port most of my own apps I'll do a v3 release which is compatible with both Qt5 and 6.
Cutelyst the C++/Qt Web Framework and ASql the ASync SQL library for Qt applications got new versions.
Thanks to the work on ASql Cutelyst got some significant performance improvements on async requests, as well as a new class called ASync, which automatically detaches the current request from the processing chain, and attaches later on when it goes out of scope.
With the ASync class you capture it on your ASql lambda and once the query result arrives and the lambda is freed and the ASync object gets out of scope and continues the processing action chain.
KDAB's fix on a 10 year old bug raised my attention back to a note on QTcpSocket documentation:
Note: TCP sockets cannot be opened in QIODevice::Unbuffered mode.
Which is actually wrong, according to the source code, Cutelyst has been using buffered mode since always due that, so hopefully this new version will be a bit faster and consume less memory, it's important to notice that once the Kernel tells it's going to block QTcpSocket writes get buffered anyway.
Now talking about ASql you might notice the jump on release versions, this is because I've been experimenting some changes and didn't want to write a post at each new feature.
ASql is now at the closest API I'd like it to be, unfortunately one of my goals that would be to be able to handle it's AResult object to Grantlee/Cutelee and be able to iterate over it's records just once, but the call QVariant::canConvert with QVariantList must succeed and the class be able to be casted to QAssociativeIterable or QSequentialIterable, which I didn't managed to get it working in a way I like.
But AResult has hash() and hashes() methods that convert the data to a format that can be used in templating.
On the plus side I added iterators (if you have experience with iterators please review my code as this was the first time I wrote this kind of code) that also work on for ranged loops, and they also have faster type conversion methods, instead converting the data to a QVariant type, and them using QVariant to get the data out of it, one can just call toInt() which will get the int straight from the result set without checking each time if it's an int.
Added AMigrations which is an awesome database maintenance class that is both simple and helpful to maintain database schemas.
- ACache class to cache special queries
- Support for data inside QJsonValue
- Single Row mode (the lambda get's called once per result)
- Prepared Queries
- Scoped Transaction class
- Notifications - this is my favorite PostgreSQL feature, it's hard to image some other big databases lack such an useful feature.
Oh, and Cutelyst results on TechEmpower already got better thanks to ASql, hoping to see even better results when I update the tests to 2.13 that has Unbuffered and faster async handlying.
Cutelyst a Qt web framework got a new version, this version has one important fix for async apps using FastCGI or HTTP2, also fixes for SO_REUSEPORT, and as a new feature is has support for listen queue backlog on UNIX, sadly QTcpServer doesn't support both of these (I need to find time to write some patches...).
Cutelyst is available for many Linux distributions but doesn't for Debian/Kubuntu, so I'm also adding the CPack deb built will all but uWSGI support for 20.04 amd64.