Qt Contributors Summit 2019 - Qt 6 Network Overview: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 3: Line 3:
=== Qt Network team’s plan of work for Qt 6 ===
=== Qt Network team’s plan of work for Qt 6 ===


*https://bugreports.qt.io/browse/QTBUG-75638 is the parent item to track
https://bugreports.qt.io/browse/QTBUG-75638 is the parent item to track
 
QNetworkAccessManager - protocol removal
* SPDY was removed, now superseded by HTTP/2.


Clean up in QSsl
Clean up in QSsl
* Get rid of a stale OpenSSL backend - only 1.1 and following will be supported
* Got rid of a stale OpenSSL backend - only 1.1 and following will be supported
* Completely remove all the code related to (previously deprecated in 5.13) SSL v2 and SSL v3
* Completely remove all the code related to (previously deprecated in 5.13) SSL v2 and SSL v3 (WIP)


New TLS backend
New TLS backend
* A new TLS back-end was contributed recently, using mbedTLS. We will get it in Qt 6 most probably, but requires quite some work (not in a „ready“ shape yet)
* A new TLS back-end was contributed recently, using mbedTLS. We will get it in Qt 6 most probably, but requires quite some work (not in a „ready“ shape yet)
New possible features and improvements in QSsl
New possible features and improvements in QSsl
* We want to avoid temporary buffers, especially in OpenSSL case (would require something similar to what QDtlsOpenssl does)
* We want to avoid temporary buffers, especially in OpenSSL case (would require something similar to what QDtlsOpenssl does)
Line 16: Line 20:
* New API needed to enable work with session tickets on a server side (somehow provide access to STEK?)
* New API needed to enable work with session tickets on a server side (somehow provide access to STEK?)


A better design for QSslSocket
A better design for QSslSocket (apparently not in Qt 6, due to amount of work/changes needed)
 
* It's QTcpSocket (a subclass of), which also has a 'plainSocket' (which is QTcpSocket), would be nice to make things straighter.  
* It's QTcpSocket, which also has 'plainSocket' (which is QTcpSocket itself), would be nice to make things more straight.  
* Could be similar to QDtls, which is not QUdpSocket at all, but works with QUdpSocket.
* Could be similar to QDtls, which is not QUdpSocket at all, but works with QUdpSocket. A lot of work/changes, probably, not Qt 6.


QNetworkAccessmanager
QNetworkAccessmanager


* Change default redirect policies (work in progress)
* Change default redirect policies (WIP)
* Enable HSTS by default
* Enable HSTS by default (this would require re-thinking the current HSTS store)


Removing bearer management
Removing bearer management
Line 32: Line 35:
* Bearer management is a legacy from S60
* Bearer management is a legacy from S60


So the proposal:
Proposal:
 
* Remove bearer management
* Remove bearer management
* Add requested features afterwards
* Add requested features afterwards
* WIP: Connection Monitoring, done (?) for Darwin and Windows.
* WIP: Connection Monitoring (as it's done (?) for Darwin and Windows)
 
Connections cache in QNetworkAccessManager (in QHttpNetworkConnection).
Overly simplistic and optimistic, as a result in case a cached connection (aka socket) becomes defunct,
QNAM may later try to re-use this connection/socket. This may result in requests never finishing or
taking a significant time before an error noted. So this cache needs something like Connection Monitor.
Also (was not mentioned during the session, but just to make the picture here complete) - we now have
an API in QNAM which can set the timeout for requests.
 
Proposal to move WebSocket
* Not sure why if this module should be in QtNetwork
* Currently not actively maintained (so having it in QtNetwork probably would make things better)
* For Qt6, moving it into QtNetwork or not, needs to be significantly refactored (the JIRA task will be linked later).

Revision as of 09:47, 25 November 2019


Qt Network team’s plan of work for Qt 6

https://bugreports.qt.io/browse/QTBUG-75638 is the parent item to track

QNetworkAccessManager - protocol removal

  • SPDY was removed, now superseded by HTTP/2.

Clean up in QSsl

  • Got rid of a stale OpenSSL backend - only 1.1 and following will be supported
  • Completely remove all the code related to (previously deprecated in 5.13) SSL v2 and SSL v3 (WIP)

New TLS backend

  • A new TLS back-end was contributed recently, using mbedTLS. We will get it in Qt 6 most probably, but requires quite some work (not in a „ready“ shape yet)

New possible features and improvements in QSsl

  • We want to avoid temporary buffers, especially in OpenSSL case (would require something similar to what QDtlsOpenssl does)
  • Trying to make handshake less rough, allowing the underlying TLS library to send proper alert messages (WIP for OpenSSL, more research needed for other backends)
  • New API needed to enable work with session tickets on a server side (somehow provide access to STEK?)

A better design for QSslSocket (apparently not in Qt 6, due to amount of work/changes needed)

  • It's QTcpSocket (a subclass of), which also has a 'plainSocket' (which is QTcpSocket), would be nice to make things straighter.
  • Could be similar to QDtls, which is not QUdpSocket at all, but works with QUdpSocket.

QNetworkAccessmanager

  • Change default redirect policies (WIP)
  • Enable HSTS by default (this would require re-thinking the current HSTS store)

Removing bearer management

  • There has been complaints about it (crashes, high CPU load - depends on a platform)
  • Radio interfaces as bearer are not best option
  • Bearer management is a legacy from S60

Proposal:

  • Remove bearer management
  • Add requested features afterwards
  • WIP: Connection Monitoring (as it's done (?) for Darwin and Windows)

Connections cache in QNetworkAccessManager (in QHttpNetworkConnection). Overly simplistic and optimistic, as a result in case a cached connection (aka socket) becomes defunct, QNAM may later try to re-use this connection/socket. This may result in requests never finishing or taking a significant time before an error noted. So this cache needs something like Connection Monitor. Also (was not mentioned during the session, but just to make the picture here complete) - we now have an API in QNAM which can set the timeout for requests.

Proposal to move WebSocket

  • Not sure why if this module should be in QtNetwork
  • Currently not actively maintained (so having it in QtNetwork probably would make things better)
  • For Qt6, moving it into QtNetwork or not, needs to be significantly refactored (the JIRA task will be linked later).