Cutelyst 2.1 Released

Cutelyst a Qt/C++ Web Framework got upped to 2.1. Yesterday I found a bug that although not critical it’s important enough to roll out a new release.

As a new feature we have LangSelect plugin to help with auto detection of user language (Matthias).

And some important bug fixes:

  • Fix compilation with Qt 5.11
  • clazy fixes
  • Fix undefined cutelyst2_plugin symbol of uWSGI plugin
  • Fix for IPv6 address binding
  • Fix StoreHtpasswd::addUser if file doesn’t exist (Bart)
  • Fix parsing when the url encoded (on body or query) has a key without a value but carries the equal sign (?foo=&bar)

Get it https://github.com/cutelyst/cutelyst/archive/v2.1.0.tar.gz

 

Advertisements
Cutelyst 2.1 Released

Cutelyst 2 released with HTTP/2 support

Cutelyst the Qt/C++ web framework just got a major release update, around one and half year ago Cutelyst v1 got the first release with a stable API/ABI, many improvements where made during this period but now it was time to clean up the mistakes and give room for new features.

Porting applications to v2 is mostly a breeze, since most API changes were done on the Engine class replacing 1 with 2 and recompiling should be enough on most cases, at least this was the case for CMlyst, Stickyst and my personal applications.

Due cleanup Cutelyst Core module got a size reduction, and WSGI module increased a bit due the new HTTP/2 parser. Windows MSVC was finally able to build and test all modules.

WSGI module now defaults to using our custom EPoll event loop (can be switched back to Qt’s default one with an environment variable), this allows for a steady performance without degradation when an increased number of simultaneous connections is made.

Validators plugins by Matthias got their share of improvements and a new password quality validator was added, plus manual pages for the tools.

The HTTP/2 parser adds more value to our framework, it’s binary nature makes it very easy to implement, in two days most of it was already working but HTTP/2 comes with a dependency, called HPACK which has it’s own RFC. HPACK is the header compression mechanism created for HTTP/2 because gzip compression as used in SPDY had security issues when on HTTPS called CRIME .

The problem is that HPACK is not very trivial to implement and it took many hours and made KCalc my best friend when converting hex to binary to decimal and what not…

Cutelyst HTTP/2 parser passes all tests of a tool named h2spec, using h2load it even showed more requests per second than HTTP/1 but it’s complicated to benchmark this two different protocols specially with different load tools.

Upgrading from HTTP/1.1 is supported with a switch, as well as enabling H2 on HTTPS using the ALPN negotiation (which is the only option browsers support), H2C or HTTP/2 in clear text is also supported but it’s only useful if the client can connect with previous knowledge.

If you know HTTP/2 your question is: “Does it support server push?”. No it doesn’t at the moment, SERVER_PUSH is a feature that allows the server to send CSS, Javascript without the browser asking for it, so it can avoid the request the browser would do, however this feature isn’t magical, it won’t make slow websites super fast , it’s also hard to do right, and each browser has it’s own complicated issues with this feature.

I strongly recommend reading this https://jakearchibald.com/2017/h2-push-tougher-than-i-thought/ .

This does not mean SERVER_PUSH won’t be implemented, quite the opposite, due the need to implement it properly I want more time to study the RFC and browsers behavior so that I can provide a good API.

I have also done some last minute performance improvements with the help of KDAB Hotspot/perf, and I must say that the days of profiling with weird/huge perf command line options are gone, awesome tool!

Get it! https://github.com/cutelyst/cutelyst/archive/v2.0.0.tar.gz

If you like it please give us a star on GitHub!

Have fun!

Cutelyst 2 released with HTTP/2 support

Apper 1.0.0 is out!

Apper the package/apps manager based on PackageKit has got it’s 1.0.0 version on it’s 10th birthday!

Screenshot_20180220_173026

Following the PackageKit-Qt 1.0.1 I’m now doing an Apper release to match it’s API, Apper source code got ported to Qt5/KF5 but not completed and using some kfsupport classes, now it’s code got modernized to C++11, new Qt connect syntax and no code depends on kfsupport, it is also properly using AppStream now, some performance improvements on the package model.

It’s now a stand alone application (no longer integrated in system settings), this was due 99% of it’s usage being by calling the apper executable and this helped fix a crash due it being a KCM module.

Feature wise I plan to add support to fwupd allowing users to update firmwares with a native tool, but time is short and Cutelyst 2 with HTTP 2 support is my top priority now, but help is welcome!

Download https://download.kde.org/stable/apper/1.0.0/apper-1.0.0.tar.xz.mirrorlist

Apper 1.0.0 is out!

Cutelyst on TechEmpower benchmarks round 15

On Valentines day TechEmpower released the results of fifth round of it’s benchmarks tests on web frameworks, it took almost a year since round 14 and I really hope round 16 comes out sooner.

Since this round took a long time and was scheduled to be release many times last year I decided not to update Cutelyst to avoid not having the chance to fix any issues and have broken results. Cutelyst 1.9.0 and Qt 5.9 were used, both had some performance improvements compared to round 14, and thus you can see better results on this round compared to 14, most notably the JSON tests went from 480K request/second to 611K req/s, also due this old Cutelyst release jemalloc was again not used due a bug we had in CMake files that didn’t link against it.

In this round some  other frameworks also done their optimizations and a few managed to do better than Cutelyst, even though we were faster in all tests compared to the last round. It might be even related to some OS tuning as most results seemed to went up a bit, however if you put the filter on “FullStack” frameworks Cutelyst is leading in most tests.

TreeFrog framework had results in TechEmpower long before I wrote the tests for Cutelyst, but due errors on TreeFrog tests on last rounds this was the first round where you can compare the results of two Qt Web Frameworks.

For the next round I expect the results to be even better now that we will properly use jemalloc, and our epoll dispatcher got a better implementation, I also plan to use Cutelyst 2 and try increasing some buffers as the servers have plenty of RAM that I didn’t care on using.

If you want to know more about Cutelyst visit https://cutelyst.org/ and give us a Star on GitHub (we are now past 300!!) https://github.com/cutelyst/cutelyst

Cutelyst on TechEmpower benchmarks round 15

print-manager 0.4.0

This last month I decided to do some work on print-manager, it’s code dates back to 2010, so it’s 8 years old now, my last commits where on 2014, after that Jan Grulich did the KF5/Qt5 port and last year I tried to do some improvements but only managed to do a single commit.

Basically it took my attention when I plugged in a printer last year after a distro reinstall and it crashed kded, so last month I took some time to work on it again. Reducing the bug count from 54 to 22, there are still some bugs which I’d like to fix but I don’t have time anymore and they are not easy to reproduce. To highlight some of the improvements:

  • Code now uses Qt5 new connection style on every place possible
  • Code is very strict on building when casting from ascii, removed deprecated usage of Qt5.9<, use of for range loops and initialize lists
  • kded code a bit simpler & safer
  • Wayland add-printer icon fixed
  • one Plasma startup crash
  • and many other bug fixed

So I’m back to working on the stuff I usually do, but if you can there are still some important/valid bugs one could take care, please feel free to try to fix them I’ll do my best in reviewing  your changes

UPDATE: print-manager is part of KDE Applications so all of these will be on the upcoming 18.04.

print-manager 0.4.0

PackageKitQt 1.0.0 and 0.10.0 released!

Happy new year every one!

PackageKitQt is a Qt Library to interface with PackageKit

It’s been a while that I don’t do a proper PackageKitQt release, mostly because I’m focusing on other projects, but PackageKit API itself isn’t evolving as fast as it was, so updating stuff is quite easy.

It haven’t seems a proper release in a while, it got several patches from other contributors, including the Qt5 port, so 0.10.0 is for that, the 1.0.0 release is to match PackageKit 1.0.0 API, while 0.10.0 works with that some signals and methods where removed from PackageKit which where useless in PackageKitQt.

Add to 1.0.0 release the complete Offline updates interface some API cleanups, missing enums and a performance improvement on parsing package ids.

Due the complexity and effort used to roll a release, from now on releases will be done with tags on GitHub, so packagers stays tuned 🙂

https://github.com/hughsie/PackageKit-Qt/archive/v1.0.0.tar.gz

https://github.com/hughsie/PackageKit-Qt/archive/v0.10.0.tar.gz

PackageKitQt 1.0.0 and 0.10.0 released!

Cutelyst 1.12.0 released

The year is about to end and so is Cutelyst v1 series, I wasn’t planning for another release this year but Matthias added some nice new features that I decided to roll 1.12 in 2017 branching 1.x.x series and master is now officially Cutelyst 2 with no stable API/ABI until 2.0.0 is tagged.

HTTP/2 support will hopefully be part of Cutelyst 2.0.0, there aren’t any drastic changes in v2, most important thing is fixing MSVC builds and removing deprecated API.

Back to this release it includes a new CSRF protection plugin, with a Grantlee tag similar to what Django has. Add to this many fixes and the epoll event loop dispatcher is now even faster and got many fixes, performance wise it’s great advantage is when dealing with many simultaneous connections, it can lead to 2-3 times faster than default glib one.

https://github.com/cutelyst/cutelyst/archive/v1.12.0.tar.gz

Happy new hacking year!

Cutelyst 1.12.0 released