[Development] Future of QWebChannel
Milian Wolff
milian.wolff at kdab.com
Wed Oct 30 17:08:04 CET 2013
Hey all,
quick summary of the meeting that we had today, discussing the future of the
QObject <-> HTML bridging efforts.
# QWebChannel
The KDAB fork of the QWebChannel will be merged back into the "official" Qt-
Labs repository.
It will stick around and I'll work on improving it. It solves the bridging
issue right now and thus can be used directly. Furthermore it has the unique
ability to bridge to any HTML client supporting JavaScript WebSockets.
I will work on merging it and then also improve it some more. This mostly
means adding more examples but also some automated tests and benchmarks.
Then we thought about prototyping some binary transfer protocol in place of
JSON, which could potentially yield a better performance. Esp. the
(de-)stringification of e.g. floats etc. pp. is something that could be
optimized that way.
Once we get a proper QtWebSockets module, the WebChannel module can depend on
it and get rid of its custom server implementation. Especially for SSL
encrypted sockets that would be cool.
# QtWebEngine
Building on the API and experience explored by the web channel, we agreed that
eventually a tightly coupled implementation thereof inside QtWebEngine should
be created.
The advantages we could get here are:
- chrome/frame contexts:
* publish objects once to the chrome and have them stick around
* thus no need to reinitialize e.g. property caches etc. pp. on every page
load
* also allows for better sandboxing, i.e. chrome objects cannot be deleted,
whereas frame objects could be
- direct IPC, i.e. reusing the existing IPC that talks to QtWebEngineProcess
instead of the current websocket based approach.
- increasing performance by doing more on the QtWebEngineProcess C++ side
(instead of on the JavaScript side).
- could use binary JSON for efficient transport and (de)marshalling
- possibly more
# General Notes
The future roadmap will try to be incremental. I.e. get the QWebChannel
useable now (it is already, but soon officially so). Then build on top of it
to get a better and faster implementation thereof into QtWebEngine eventually.
Bye, I'm looking to working with you on this project!
--
Milian Wolff | milian.wolff at kdab.com | Software Engineer
KDAB (Deutschland) GmbH&Co KG, a KDAB Group company
Tel. Germany +49-30-521325470, Sweden (HQ) +46-563-540090
KDAB - Qt Experts - Platform-independent software solutions
More information about the Development
mailing list