Data in a Cloud - Introduction to Qt Cloud Services

Post on 07-Jul-2015

900 views 1 download

Tags:

description

Qt Cloud Services makes it easy to develop connected applications. From small-scale development projects to large-scale enterprise programs. Qt Cloud Services has all you need!

transcript

Data in a Cloud

qt.io on MAR

Qt Developer Days Mobile App uses EDS as a database

Customers & Partners

What is Qt Cloud ServicesEnginio  Data  Storage  Storage  for  Applica/on  Data  Use  with  QtEnginio  Library

Managed  Applica3on  Run3me  Applica/on  Pla<orm  as  a  Service  Support  for  Qt/C++,  NodeJS,  Apache,  PHP,  MongoDB,  MySQL,  Redis…  

Managed  WebSocket  Real-­‐Time  Socket  Connec/ons  with  virtually  unlimited  scalability  Use  with  SDK’s  and  Qt  WebSocket  Client  Library  

Enginio Data Storage (EDS)

Flexible and powerful cloud data storage

with built-in user and data access control

EDS Use Cases• Content storage, sharing and

synchronization • User profiles and access

control • Remote monitoring and control • Usage Statistics • Client-to-Client

Communications • Application settings • N-screen; Embedded, Web,

Desktop, Mobiles…

How to Use with Qt?QByteArray  backendId(EDS_BACKEND_ID);    "EnginioClient  *client  =  new  EnginioClient;  client-­‐>setBackendId(backendId);  "QJsonObject  object;  object["objectType"]  =  QString::fromUtf8("objects.movies");  object["name"]  =  QString::fromUtf8("The  Matrix");  object["year"]  =  1999;  //  Send  the  request  EnginioReply  *reply  =  client-­‐>create(object);

Managed WebSocket (MWS)

Fully managed service implementing a bi-directional, real-time communication

gateway for WebSockets.

Where to use?• Chat applications

• Social feeds

• Multiplayer games

• Collaborative editing

• Sport updates

• Location based apps

• Your killer app

How To Use With Qt?WebSocket  {                  id:  socket                                    active:  true                  onTextMessageReceived:  {                          handleWebsocketMessage(message)                  }        }

//  JavaScript  var  REQUEST_URL  =  “https://mws-­‐eu-­‐1.qtc.io/v1/gateways/MWS_GATEWAY_ID/websocket_uri”function  connectToWebSocket()  {          var  doc  =  new  XMLHttpRequest();          doc.open("GET",  REQUEST_URL  +  "/api/websocket",  true);          doc.setRequestHeader('Content-­‐Type',  'application/json');          doc.onreadystatechange  =  function()          {                  if  (doc.readyState  ===  4)  {                          if  (doc.status  ===  200)  {                                  var  data  =  JSON.parse(doc.responseText);                                  socket.url  =  data.uri                          }                  }          }          doc.send()  }

Managed Application Runtime (MAR)

Scalable,"Multi-language,"Multi-database,"

Application Platform as a Service

MAR Use CasesInternet of Things & Embedded!

• Cloud compute, analyze, metrics and data visualization

• Remote management, APIs and configuration of ”things”

"Websites!

• High-traffic campaign & marketing sites

• Education, Gaming, Personal…

"Customer facing applications!

• Online Applications

• API’s for web, desktop & mobile

What is PaaS?Applica'on*

Data*

Run'me*

Middleware*

OS*

Virtualiza'on*

Servers*

Storage*

Networking*

On#Premises#Yo

u*Manage*

Applica'on*

Data*

Run'me*

Middleware*

OS*

Virtualiza'on*

Servers*

Storage*

Networking*

IaaS$

You*Manage*

Vend

or*Provide

s*

Applica'on*

Data*

Run'me*

Middleware*

OS*

Virtualiza'on*

Servers*

Storage*

Networking*

PaaS$

You*Manage*

Vend

or*Provide

s*

Applica'on*

Data*

Run'me*

Middleware*

OS*

Virtualiza'on*

Servers*

Storage*

Networking*

SaaS#

Vend

or*Provide

s*

With PaaS, developer can focus just on building great apps. No need to worry about servers, operating system, loadbalancing, network or infrastructure.

How does it work?Managed Application Runtimes

Supported Frameworks

Supported frameworks by 3rd party build packs

Scala, Clojure, Play, Gradle, Grails, PHP, Go, Meteorite, Perl, Dart, Nginx, Apache, Jekyll

Built-in Services

or choose from our cloud based services

Enginio Data Storage"Managed WebSocket

or choose anything with SDK

... Amazon, Azure, Google ...

Developer Friendly Deployment

Deploy using Git – the most common VCS among developers

>  git  push  qtc  master

lanevala@it-l-m0015 ~/Development/qtwebsockets-echoserver-example[master*]$ git push qtc masterCounting objects: 1, done.Writing objects: 100% (1/1), 186 bytes | 0 bytes/s, done.Total 1 (delta 0), reused 0 (delta 0)-----> Qt app detected Installing Qt 5.4.0-beta-2014-09-25_25-----> Setting up Qt 5.4.0-beta-2014-09-25_25-----> Configuring with qmake-----> Compiling with make g++ -c -pipe -O2 -Wall -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -DQT_WEBSOCKETS_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I.qtcs/Qt/5.4/gcc_64/mkspecs/linux-g++ -I. -I.qtcs/Qt/5.4/gcc_64/include -I.qtcs/Qt/5.4/gcc_64/include/QtWebSockets -I.qtcs/Qt/5.4/gcc_64/include/QtNetwork -I.qtcs/Qt/5.4/gcc_64/include/QtCore -I. -o main.o main.cpp g++ -c -pipe -O2 -Wall -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -DQT_WEBSOCKETS_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I.qtcs/Qt/5.4/gcc_64/mkspecs/linux-g++ -I. -I.qtcs/Qt/5.4/gcc_64/include -I.qtcs/Qt/5.4/gcc_64/include/QtWebSockets -I.qtcs/Qt/5.4/gcc_64/include/QtNetwork -I.qtcs/Qt/5.4/gcc_64/include/QtCore -I. -o echoserver.o echoserver.cpp /app/.qtcs/Qt/5.4/gcc_64/bin/moc -DQT_NO_DEBUG -DQT_WEBSOCKETS_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I/app/.qtcs/Qt/5.4/gcc_64/mkspecs/linux-g++ -I/tmp/build -I/app/.qtcs/Qt/5.4/gcc_64/include -I/app/.qtcs/Qt/5.4/gcc_64/include/QtWebSockets -I/app/.qtcs/Qt/5.4/gcc_64/include/QtNetwork -I/app/.qtcs/Qt/5.4/gcc_64/include/QtCore echoserver.h -o moc_echoserver.cpp g++ -c -pipe -O2 -Wall -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -DQT_WEBSOCKETS_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I.qtcs/Qt/5.4/gcc_64/mkspecs/linux-g++ -I. -I.qtcs/Qt/5.4/gcc_64/include -I.qtcs/Qt/5.4/gcc_64/include/QtWebSockets -I.qtcs/Qt/5.4/gcc_64/include/QtNetwork -I.qtcs/Qt/5.4/gcc_64/include/QtCore -I. -o moc_echoserver.o moc_echoserver.cpp g++ -Wl,-O1 -Wl,-rpath,/app/.qtcs/Qt/5.4/gcc_64 -Wl,-rpath,/app/.qtcs/Qt/5.4/gcc_64/lib -o echoserver main.o echoserver.o moc_echoserver.o -L/app/.qtcs/Qt/5.4/gcc_64/lib -lQt5WebSockets -lQt5Network -lQt5Core -lpthread-----> Discovering process types Procfile declares types -> web-----> Compiled slug size is 108M-----> Deploying app Uploading app container ...... done. mar-eu-1-twwto7g0 deployed to http://mar-eu-1-twwto8g1.qtcloudapp.com

How to Use With Qt?lanevala@it-l-m0015 ~/Development/qtwebsockets-echoserver-example[master*]$ git push qtc masterCounting objects: 1, done.Writing objects: 100% (1/1), 186 bytes | 0 bytes/s, done.Total 1 (delta 0), reused 0 (delta 0)-----> Qt app detected Installing Qt 5.4.0-beta-2014-09-25_25-----> Setting up Qt 5.4.0-beta-2014-09-25_25-----> Configuring with qmake-----> Compiling with make g++ -c -pipe -O2 -Wall -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -DQT_WEBSOCKETS_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I.qtcs/Qt/5.4/gcc_64/mkspecs/linux-g++ -I. -I.qtcs/Qt/5.4/gcc_64/include -I.qtcs/Qt/5.4/gcc_64/include/QtWebSockets -I.qtcs/Qt/5.4/gcc_64/include/QtNetwork -I.qtcs/Qt/5.4/gcc_64/include/QtCore -I. -o main.o main.cpp g++ -c -pipe -O2 -Wall -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -DQT_WEBSOCKETS_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I.qtcs/Qt/5.4/gcc_64/mkspecs/linux-g++ -I. -I.qtcs/Qt/5.4/gcc_64/include -I.qtcs/Qt/5.4/gcc_64/include/QtWebSockets -I.qtcs/Qt/5.4/gcc_64/include/QtNetwork -I.qtcs/Qt/5.4/gcc_64/include/QtCore -I. -o echoserver.o echoserver.cpp /app/.qtcs/Qt/5.4/gcc_64/bin/moc -DQT_NO_DEBUG -DQT_WEBSOCKETS_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I/app/.qtcs/Qt/5.4/gcc_64/mkspecs/linux-g++ -I/tmp/build -I/app/.qtcs/Qt/5.4/gcc_64/include -I/app/.qtcs/Qt/5.4/gcc_64/include/QtWebSockets -I/app/.qtcs/Qt/5.4/gcc_64/include/QtNetwork -I/app/.qtcs/Qt/5.4/gcc_64/include/QtCore echoserver.h -o moc_echoserver.cpp g++ -c -pipe -O2 -Wall -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -DQT_WEBSOCKETS_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I.qtcs/Qt/5.4/gcc_64/mkspecs/linux-g++ -I. -I.qtcs/Qt/5.4/gcc_64/include -I.qtcs/Qt/5.4/gcc_64/include/QtWebSockets -I.qtcs/Qt/5.4/gcc_64/include/QtNetwork -I.qtcs/Qt/5.4/gcc_64/include/QtCore -I. -o moc_echoserver.o moc_echoserver.cpp g++ -Wl,-O1 -Wl,-rpath,/app/.qtcs/Qt/5.4/gcc_64 -Wl,-rpath,/app/.qtcs/Qt/5.4/gcc_64/lib -o echoserver main.o echoserver.o moc_echoserver.o -L/app/.qtcs/Qt/5.4/gcc_64/lib -lQt5WebSockets -lQt5Network -lQt5Core -lpthread-----> Discovering process types Procfile declares types -> web-----> Compiled slug size is 108M-----> Deploying app Uploading app container ...... done. mar-eu-1-twwto7g0 deployed to http://mar-eu-1-twwto8g1.qtcloudapp.com

Echoserver listening on port 5000Echoserver got new connectionPing clients 1Echoserver got new pongEchoserver got new message "Does it echo?"

CONNECTED Does it echo?

Does it echo?

Echoserver listening on port 5000Echoserver got new connectionPing clients 1Echoserver got new pongEchoserver got new message "Does it echo?"

Red

isM

ongo

DB

Mon

goD

B

Scalable ArchitectureYour Application Managed    

DatabasesApplica3on  Instances End Users

Configure

Deploy

Scale With Your Business

Git

Push

API

Red

isM

ySQ

L

Envi

ronm

ent V

aria

bles

Load

Bal

ance

r

myawesome.com

Scaling

Console

Command Line Tool

Stdout & Stderr Logging

Next Steps• For Getting Started!

• Go to http://qtcloudservices.com

• Sign-up and try yourself

• Read our documentation

• Give us feedback!

• For Serious Development!

• Cloud KickStart - tailored training & consulting

Thank You!www.qtcloudservices.com!