Cutelyst a web framework built with Qt is now closer to have it’s first stable release, with it becoming 3 years old at the end of the year I’m doing my best to finally iron it to get an API/ABI compromise, this release is full of cool stuff and a bunch of breaks which most of the time just require recompiling.
For the last 2-3 weeks I’ve been working hard to get most of it unit tested, the Core behavior is now extensively tested with more than 200 tests. This has already proven it’s benefits resulting in improved and fixed code.
Continuous integration got broader runs with gcc and clang on both OSX and Linux (Travis) and with MSVC 12 and 14 on Windows (Appveyor), luckily most of the features I wanted where implemented but the compiler is pretty upsetting. Running Cutelyst on Windows would require uwsgi which can be built with MinGW but it’s in experimental state, the developer HTTP engine, is not production ready so Windows usefulness is limited at the moment.
One of the ‘hypes’ of the moment is non-blocking web servers, and this release also fixes this so that uwsgi –async <number_of_requests> is properly handled, of course there is no magic, if you enable this on blocking code the requests will still have to wait your blocking task to finish, but there are many benefits of using this if you have non-blocking code. At the moment once a slot is called to process the request and say you want to do a GET on some webservice you can use the QNetworkAccessManager do your call and create a local QEventLoop so once the QNetworkReply finish() is emitted you continue processing. Hopefully some day QtSql module will have an async API but you can of course create a Thread Queue.
A new plugin called StatusMessage was also introduced which generates an ID which you will use when redirecting to some other page and the message is only displayed once, and doesn’t suffer from those flash race conditions.
The upload parser for Content-Type multipart/form-data got a huge boost in performance as it now uses QByteArrayMatcher to find boundaries, the bigger the upload the more apparent is the change.
Chunked responses also got several fixes and one great improvement which will allow to use it with classes like QXmlStreamWriter by just passing the Response class (which is now a QIODevice) to it’s constructor or setDevice(), on the first write the HTTP headers are sent and it will start creating chunks, for some reason this doesn’t work when using uwsgi protocol behind Nginx, I still need to dig and maybe disable the chunks markup depending on the protocol used by uwsgi.
A Pagination class is also available to easy the work needed to write pagination, with methods to set the proper LIMIT and OFFSET on Sql queries.
Benchmarks for the TechEmpower framework were written and will be available on Round 14.
Last but not least there is now a QtCreator integration, which allows for creating a new project and Controller classes, but you need to manually copy (or link) the qtcreator directory to ~/.config/QtProject/qtcreator/templates/wizard.
As usual many bug fixes are in.
Help is welcome, you can mail me or hang on #cutelyst at freenode.