Qt wiki will be updated on October 12th 2023 starting at 11:30 AM (EEST) and the maintenance will last around 2-3 hours. During the maintenance the site will be unavailable.

Cloud: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
No edit summary
 
No edit summary
Line 1: Line 1:
==Introduction==
h2. Introduction


The purpose of this page is to gather the information related to using Qt in conjunction with Cloud computing. Some of the content and Qt framework development goals are the same as described in the [http://developer.qt.nokia.com/wiki/Qt_and_Web_Services Qt and Web Services] ''[developer.qt.nokia.com]'' wiki article but with the distinction that the Web Services article focuses more on interfacing most common existing Web Services (such as Facebook, Twitter, DropBox etc.). This page focus should be in using Cloud computing resources as the backend of existing Qt application or creating new Qt based services and applications that utilize for example Cloud storage.
The purpose of this page is to gather the information related to using Qt in conjunction with Cloud computing. Some of the content and Qt framework development goals are the same as described in the "Qt and Web Services":http://developer.qt.nokia.com/wiki/Qt_and_Web_Services wiki article but with the distinction that the Web Services article focuses more on interfacing most common existing Web Services (such as Facebook, Twitter, DropBox etc.). This page focus should be in using Cloud computing resources as the backend of existing Qt application or creating new Qt based services and applications that utilize for example Cloud storage.


==Using Cloud Services from Qt applications==
== Using Cloud Services from Qt applications ==


From the Qt application functionality point of view most interesting Cloud services are related to using Cloud hosted application back-ends or using cloud as the data storage. The Cloud services can be provided by specialized providers, or internally within the organization using the application – same principles and building blocks apply to both. Cloud Services are usually divided into Software as a Service (SaaS), Platform as a Service (PaaS) and Infrastructure as a Service (IaaS). Since Qt is not a web application development framework as such the focus is primarily on Platform and Infrastructure services. The Cloud services typically applicable for Qt based solutions include:
From the Qt application functionality point of view most interesting Cloud services are related to using Cloud hosted application back-ends or using cloud as the data storage. The Cloud services can be provided by specialized providers, or internally within the organization using the application – same principles and building blocks apply to both. Cloud Services are usually divided into Software as a Service (SaaS), Platform as a Service (PaaS) and Infrastructure as a Service (IaaS). Since Qt is not a web application development framework as such the focus is primarily on Platform and Infrastructure services. The Cloud services typically applicable for Qt based solutions include:


'''Platform (PaaS)'''
'''Platform (PaaS)'''<br />* Data storage (Blob, Table Storage and Relational Database Storage)<br />* Queue<br />* Identity and Access Management<br />'''Infrastructure (IaaS)'''<br />* Compute<br />* Network
 
* Data storage (Blob, Table Storage and Relational Database Storage)
* Queue
* Identity and Access Management
 
<br />'''Infrastructure (IaaS)'''
 
* Compute
* Network


Interfacing web applications such as Facebook, Twitter and LinkedIn from Qt application can be considered as SaaS type of access. Naming aside, also that level is important and the Cloud services need to allow this to be accomplished easily.
Interfacing web applications such as Facebook, Twitter and LinkedIn from Qt application can be considered as SaaS type of access. Naming aside, also that level is important and the Cloud services need to allow this to be accomplished easily.
Line 24: Line 15:
If you already have a client-server based application implemented in Qt and want to use distributed and scalable computing environment, the most natural way is to use Virtualized Cloud Computing environment like Amazon EC2 or Azure Compute.
If you already have a client-server based application implemented in Qt and want to use distributed and scalable computing environment, the most natural way is to use Virtualized Cloud Computing environment like Amazon EC2 or Azure Compute.


Many Cloud services expose <span class="caps">REST</span> API’s for managing and accessing the actual service. From Qt perspective <span class="caps">REST</span> based API’s are easier to use in a since Qt already includes almost all needed functionality. There are available Qt implementations also for accessing e.g. <span class="caps">SOAP</span> based services.
Many Cloud services expose REST API’s for managing and accessing the actual service. From Qt perspective REST based API’s are easier to use in a since Qt already includes almost all needed functionality. There are available Qt implementations also for accessing e.g. SOAP based services.


==Cloud services per provider mapping==
== Cloud services per provider mapping ==


As an example of cloud service provider offering let’s investigate two popular cloud services Amazon <span class="caps">AWS</span> and Microsoft Azure.
As an example of cloud service provider offering let’s investigate two popular cloud services Amazon AWS and Microsoft Azure.


{| class="infotable line"
|''. |''. '''Amazon'''|_. '''Azure'''|<br /> | Data Storage - Blob | Simple Storage Service (S3), &quot;REST API&amp;quot;:http://docs.amazonwebservices.com/AmazonS3/latest/API/APIRest.html | Blob storage &quot;REST API&amp;quot;:http://msdn.microsoft.com/en-us/library/windowsazure/dd135733.aspx|<br /> | Data Storage - Table | SimpleDB, &quot;REST API&amp;quot;:http://docs.amazonwebservices.com/AmazonSimpleDB/latest/DeveloperGuide/MakingRESTRequests.html | Azure Table Storage &quot;REST API&amp;quot;:http://msdn.microsoft.com/en-us/library/windowsazure/dd179423.aspx|<br /> | Relational Database Storage| Relational Database Service (RDS), MySQL or Oracle DB, &quot;Getting Started Guide&amp;quot;:http://docs.amazonwebservices.com/AmazonRDS/latest/GettingStartedGuide/| Azure SQL Storage, Microsoft SQL Server, &quot;Introducing SQL Azure Database&amp;quot;:http://msdn.microsoft.com/en-us/library/windowsazure/ee336230.aspx|<br /> | Queue | Simple Queue Service, &quot;WSDL API&amp;quot;:http://docs.amazonwebservices.com/AWSSimpleQueueService/latest/APIReference/Welcome.html | Windows Azure Queues, &quot;REST API&amp;quot;:http://msdn.microsoft.com/en-us/library/windowsazure/dd179363.aspx |<br /> | Identity &amp; Access Management | AWS Identity and Access Management (IAM), &quot;WSDL API&amp;quot;:http://aws.amazon.com/iam/ | Access Control Service (ACS), Several Access control features, See &quot;Overview of Access Control&amp;quot;:http://msdn.microsoft.com/en-us/library/windowsazure/dd582780.aspx for details|<br /> | Authentication in REST API’s | &quot;HMAC-SHA1 (deprecated) or HMAC-SHA256 based signature and AWS Access Key&amp;quot;:http://aws.amazon.com/articles/1928 | &quot;HMAC-SHA256 based authorization header&amp;quot;:http://msdn.microsoft.com/en-us/library/windowsazure/dd179428.aspx |
!
! '''Amazon'''
! '''Azure'''
|-
| Data Storage Blob
|
Simple Storage Service (S3), [http://docs.amazonwebservices.com/AmazonS3/latest/API/APIRest.html <span class="caps">REST</span> <span class="caps">API</span>] ''[docs.amazonwebservices.com]''
|
Blob storage [http://msdn.microsoft.com/en-us/library/windowsazure/dd135733.aspx <span class="caps">REST</span> <span class="caps">API</span>] ''[msdn.microsoft.com]''
|-
| Data Storage Table
|
SimpleDB, [http://docs.amazonwebservices.com/AmazonSimpleDB/latest/DeveloperGuide/MakingRESTRequests.html <span class="caps">REST</span> <span class="caps">API</span>] ''[docs.amazonwebservices.com]''
|
Azure Table Storage [http://msdn.microsoft.com/en-us/library/windowsazure/dd179423.aspx <span class="caps">REST</span> <span class="caps">API</span>] ''[msdn.microsoft.com]''
|-
| Relational Database Storage
|
Relational Database Service (<span class="caps">RDS</span>), MySQL or Oracle DB, [http://docs.amazonwebservices.com/AmazonRDS/latest/GettingStartedGuide/ Getting Started Guide] ''[docs.amazonwebservices.com]''
|
Azure <span class="caps">SQL</span> Storage, Microsoft <span class="caps">SQL</span> Server, [http://msdn.microsoft.com/en-us/library/windowsazure/ee336230.aspx Introducing <span class="caps">SQL</span> Azure Database] ''[msdn.microsoft.com]''
|-
| Queue
|
Simple Queue Service, [http://docs.amazonwebservices.com/AWSSimpleQueueService/latest/APIReference/Welcome.html <span class="caps">WSDL</span> <span class="caps">API</span>] ''[docs.amazonwebservices.com]''
|
Windows Azure Queues, [http://msdn.microsoft.com/en-us/library/windowsazure/dd179363.aspx <span class="caps">REST</span> <span class="caps">API</span>] ''[msdn.microsoft.com]''
|-
| Identity &amp; Access Management
|
<span class="caps">AWS</span> Identity and Access Management (<span class="caps">IAM</span>), [http://aws.amazon.com/iam/ <span class="caps">WSDL</span> <span class="caps">API</span>] ''[aws.amazon.com]''
|
Access Control Service (<span class="caps">ACS</span>), Several Access control features, See [http://msdn.microsoft.com/en-us/library/windowsazure/dd582780.aspx Overview of Access Control] ''[msdn.microsoft.com]'' for details
|-
| Authentication in <span class="caps">REST</span> API’s
|
[http://aws.amazon.com/articles/1928 <span class="caps">HMAC</span>-SHA1 (deprecated) or <span class="caps">HMAC</span>-SHA256 based signature and <span class="caps">AWS</span> Access Key] ''[aws.amazon.com]''
|
[http://msdn.microsoft.com/en-us/library/windowsazure/dd179428.aspx <span class="caps">HMAC</span>-SHA256 based authorization header] ''[msdn.microsoft.com]''
|}


==Requirements for Qt Framework development==
== Requirements for Qt Framework development ==


===Identified enhancements to existing modules===
=== Identified enhancements to existing modules ===


* <span class="caps">JSON</span>
* JSON
** Parsing through QScriptEngine already supported
** Parsing through QScriptEngine already supported  
** Discussion about adding <span class="caps">JSON</span> support to QtCore module in qt-project [http://lists.qt.io/pipermail/development/2011-December/000813.html development mailing list] ''[lists.qt.io]'', and the initial patch has already been [http://codereview.qt.io/#change,13542 merged] ''[codereview.qt.io]''
** Discussion about adding JSON support to QtCore module in qt-project &quot;development mailing list&amp;quot;:http://lists.qt.io/pipermail/development/2011-December/000813.html, and the initial patch has already been &quot;merged&amp;quot;:http://codereview.qt.io/#change,13542  
** <span class="caps">JSON</span> datamode for <span class="caps">QML</span>: [https://bugreports.qt.nokia.com/browse/QTBUG-12117 <span class="caps">QTBUG</span>-12117] ''[bugreports.qt.nokia.com]''
** JSON datamode for QML: &quot;QTBUG-12117&amp;quot;:https://bugreports.qt.nokia.com/browse/QTBUG-12117  
* Hash-based Message Authentication Code (<span class="caps">HMAC</span>)
* Hash-based Message Authentication Code (HMAC)
** <span class="caps">HMAC</span>- SHA256 needed for generating the authorization. [http://developer.qt.nokia.com/doc/qcryptographichash.html QCryptographicHash] ''[developer.qt.nokia.com]'' should be extended to support SHA2 family (especially SHA256) [https://bugreports.qt.nokia.com/browse/QTBUG-2068 <span class="caps">QTBUG</span>-2068] ''[bugreports.qt.nokia.com]'' and there should be a way for creating the message authentication header [https://bugreports.qt.nokia.com/browse/QTBUG-904 <span class="caps">QTBUG</span>-904] ''[bugreports.qt.nokia.com]''. Code snippet for <span class="caps">HMAC</span>-SHA1 in [http://developer.qt.nokia.com/wiki/HMAC-SHA1 DevNet] ''[developer.qt.nokia.com]''
** HMAC- SHA256 needed for generating the authorization. &quot;QCryptographicHash&amp;quot;:http://developer.qt.nokia.com/doc/qcryptographichash.html should be extended to support SHA2 family (especially SHA256) &quot;QTBUG-2068&amp;quot;:https://bugreports.qt.nokia.com/browse/QTBUG-2068 and there should be a way for creating the message authentication header &quot;QTBUG-904&amp;quot;:https://bugreports.qt.nokia.com/browse/QTBUG-904. Code snippet for HMAC-SHA1 in &quot;DevNet&amp;quot;:http://developer.qt.nokia.com/wiki/HMAC-SHA1  
* oAUTH
* oAUTH
** Discussion and planning ongoing. See status: [https://bugreports.qt.nokia.com/browse/QTBUG-6229 <span class="caps">QTBUG</span>-6229] ''[bugreports.qt.nokia.com]''
** Discussion and planning ongoing. See status: &quot;QTBUG-6229&amp;quot;:https://bugreports.qt.nokia.com/browse/QTBUG-6229


===Qt SDK’s for different cloud services===
=== Qt SDK’s for different cloud services ===


Each of the Cloud services need a separate <span class="caps">API</span> implementation (often called as SDK’s). These provider specific <span class="caps">API</span> implementations can be the API’s that the application developer uses or those can be wrapped as plugins for generic Qt Cloud <span class="caps">API</span> or accessed through existing Qt Modules. At concept level for example QFile maps to Amazon S3 Objects and QDir maps to S3 Buckets, however for example the QFile is synchronous whereas Cloud Blob storage <span class="caps">API</span> should be asynchronous.
Each of the Cloud services need a separate API implementation (often called as SDK’s). These provider specific API implementations can be the API’s that the application developer uses or those can be wrapped as plugins for generic Qt Cloud API or accessed through existing Qt Modules. At concept level for example QFile maps to Amazon S3 Objects and QDir maps to S3 Buckets, however for example the QFile is synchronous whereas Cloud Blob storage API should be asynchronous.


===Generic Qt Cloud <span class="caps">API</span>===
=== Generic Qt Cloud API ===


One possible approach would be creating a generic Qt Cloud <span class="caps">API</span> that would hide the Cloud service provider specific implementation. This approach would be similar to [http://simplecloud.org/ Simple Cloud <span class="caps">API</span> initiative] ''[simplecloud.org]''.
One possible approach would be creating a generic Qt Cloud API that would hide the Cloud service provider specific implementation. This approach would be similar to &quot;Simple Cloud API initiative&amp;quot;:http://simplecloud.org/.


===Tools===
=== Tools ===


* <span class="caps">IDE</span> Templates
* IDE Templates
* Sample Applications (Similar as [https://bugreports.qt.nokia.com/browse/QTBUG-13353 <span class="caps">QTBUG</span>-13353] ''[bugreports.qt.nokia.com]'')
* Sample Applications (Similar as &quot;QTBUG-13353&amp;quot;:https://bugreports.qt.nokia.com/browse/QTBUG-13353)
* Documentation
* Documentation

Revision as of 09:21, 24 February 2015

h2. Introduction

The purpose of this page is to gather the information related to using Qt in conjunction with Cloud computing. Some of the content and Qt framework development goals are the same as described in the "Qt and Web Services&quot;:http://developer.qt.nokia.com/wiki/Qt_and_Web_Services wiki article but with the distinction that the Web Services article focuses more on interfacing most common existing Web Services (such as Facebook, Twitter, DropBox etc.). This page focus should be in using Cloud computing resources as the backend of existing Qt application or creating new Qt based services and applications that utilize for example Cloud storage.

Using Cloud Services from Qt applications

From the Qt application functionality point of view most interesting Cloud services are related to using Cloud hosted application back-ends or using cloud as the data storage. The Cloud services can be provided by specialized providers, or internally within the organization using the application – same principles and building blocks apply to both. Cloud Services are usually divided into Software as a Service (SaaS), Platform as a Service (PaaS) and Infrastructure as a Service (IaaS). Since Qt is not a web application development framework as such the focus is primarily on Platform and Infrastructure services. The Cloud services typically applicable for Qt based solutions include:

Platform (PaaS)
* Data storage (Blob, Table Storage and Relational Database Storage)
* Queue
* Identity and Access Management
Infrastructure (IaaS)
* Compute
* Network

Interfacing web applications such as Facebook, Twitter and LinkedIn from Qt application can be considered as SaaS type of access. Naming aside, also that level is important and the Cloud services need to allow this to be accomplished easily.

In cases where you have an existing Qt application that uses a relational database the easiest way to utilize Cloud storage is by using Relational Database Storage services. These services provide the database interface using the same mechanisms as databases usually provide remote access. Of course firewall and other security aspects must be taken into consideration.

If you already have a client-server based application implemented in Qt and want to use distributed and scalable computing environment, the most natural way is to use Virtualized Cloud Computing environment like Amazon EC2 or Azure Compute.

Many Cloud services expose REST API’s for managing and accessing the actual service. From Qt perspective REST based API’s are easier to use in a since Qt already includes almost all needed functionality. There are available Qt implementations also for accessing e.g. SOAP based services.

Cloud services per provider mapping

As an example of cloud service provider offering let’s investigate two popular cloud services Amazon AWS and Microsoft Azure.

|. |. Amazon|_. Azure|
| Data Storage - Blob | Simple Storage Service (S3), "REST API&quot;:http://docs.amazonwebservices.com/AmazonS3/latest/API/APIRest.html | Blob storage "REST API&quot;:http://msdn.microsoft.com/en-us/library/windowsazure/dd135733.aspx%7C
| Data Storage - Table | SimpleDB, "REST API&quot;:http://docs.amazonwebservices.com/AmazonSimpleDB/latest/DeveloperGuide/MakingRESTRequests.html | Azure Table Storage "REST API&quot;:http://msdn.microsoft.com/en-us/library/windowsazure/dd179423.aspx%7C
| Relational Database Storage| Relational Database Service (RDS), MySQL or Oracle DB, "Getting Started Guide&quot;:http://docs.amazonwebservices.com/AmazonRDS/latest/GettingStartedGuide/%7C Azure SQL Storage, Microsoft SQL Server, "Introducing SQL Azure Database&quot;:http://msdn.microsoft.com/en-us/library/windowsazure/ee336230.aspx%7C
| Queue | Simple Queue Service, "WSDL API&quot;:http://docs.amazonwebservices.com/AWSSimpleQueueService/latest/APIReference/Welcome.html | Windows Azure Queues, "REST API&quot;:http://msdn.microsoft.com/en-us/library/windowsazure/dd179363.aspx |
| Identity & Access Management | AWS Identity and Access Management (IAM), "WSDL API&quot;:http://aws.amazon.com/iam/ | Access Control Service (ACS), Several Access control features, See "Overview of Access Control&quot;:http://msdn.microsoft.com/en-us/library/windowsazure/dd582780.aspx for details|
| Authentication in REST API’s | "HMAC-SHA1 (deprecated) or HMAC-SHA256 based signature and AWS Access Key&quot;:http://aws.amazon.com/articles/1928 | "HMAC-SHA256 based authorization header&quot;:http://msdn.microsoft.com/en-us/library/windowsazure/dd179428.aspx |

Requirements for Qt Framework development

Identified enhancements to existing modules

Qt SDK’s for different cloud services

Each of the Cloud services need a separate API implementation (often called as SDK’s). These provider specific API implementations can be the API’s that the application developer uses or those can be wrapped as plugins for generic Qt Cloud API or accessed through existing Qt Modules. At concept level for example QFile maps to Amazon S3 Objects and QDir maps to S3 Buckets, however for example the QFile is synchronous whereas Cloud Blob storage API should be asynchronous.

Generic Qt Cloud API

One possible approach would be creating a generic Qt Cloud API that would hide the Cloud service provider specific implementation. This approach would be similar to "Simple Cloud API initiative&quot;:http://simplecloud.org/.

Tools