QT With Cloud Database
-
Hi,
What exactly do you need ? If you are using the PostgreSQL or MySQL hosting then you should be able to use the usual QtSql plugins. However I wouldn't recommend a direct connection as it would mean exposing your database over internet. Putting a REST API in front of it would improve security and simplify the client side.
-
Hi,
What exactly do you need ? If you are using the PostgreSQL or MySQL hosting then you should be able to use the usual QtSql plugins. However I wouldn't recommend a direct connection as it would mean exposing your database over internet. Putting a REST API in front of it would improve security and simplify the client side.
@SGaist
Thanks for the reply. I will be designing a desktop application where it is able to read and write to a database. However, it should be able to access from any computer in a different computer. So I thought of having a cloudbase database. I was also thinking of using google firebase database. -
Hi All,
I would like to know whether there are any resources (tutorials/videos/courses) I can look into about using QT with cloud based databases such as AWS Cloud Database or Azure SQL Database?
Thank you
Creating a rest/GraphQL/JSON-API is the preferable way to overcome the security problems and specialize the data interface of your application architecture as @SGaist suggested.
But if you need to use a cloud-based database with a remote connection for example in AWS, you can use IAM authentication instead of using database credentials, AWS Secrets Manager to store your database credentials and you can use classical network security methods for example ip restrictions and Network Access Control Lists.
I believe Google Firebase is a different story.
-
Creating a rest/GraphQL/JSON-API is the preferable way to overcome the security problems and specialize the data interface of your application architecture as @SGaist suggested.
But if you need to use a cloud-based database with a remote connection for example in AWS, you can use IAM authentication instead of using database credentials, AWS Secrets Manager to store your database credentials and you can use classical network security methods for example ip restrictions and Network Access Control Lists.
I believe Google Firebase is a different story.
-
@CKurdu
Thanks for the reply. If I use rest/Graph/Json-API, am I able to access my database from any location/network?Are there any resources I can read on to learn how to implement? I am using QT Creator with C++.
Thanks!
You should define what you mean by anywhere. Anywhere in the world is not equal to anywhere in an enterprise internal network.
That said, whether you use a REST interface, GraphQL or direct connection has nothing to do with network availability.
-
@CKurdu
Thanks for the reply. If I use rest/Graph/Json-API, am I able to access my database from any location/network?Are there any resources I can read on to learn how to implement? I am using QT Creator with C++.
Thanks!
Hello @Radio1985,
There are many possibilities for implementing a RESTful API at the backend, and you are accessing a web service API in a cloud environment rather than accessing the database directly. When you start implementing this architecture, you will actually need a backend developer to create a RESTful API in a cloud environment, and you won't have any tasks related to the database. When you use Firebase, you are essentially developing your software as a full-stack developer, so this is a different scenario.
You can create a service that is accessible from anywhere in the world. I mean, theoretically, if you live in China and China has blocked AWS, you won't be able to reach your server.
When you begin developing your REST client in Qt Creator, you have several ways to implement the REST client.
The Qt Way: You can utilize Qt Network Module classes for implementation.
I found an article you can examine: link.
If your application is QML-based rather than widget-based, you can use JavaScript to implement the REST client functions. There is a link on how to implement it: link.
Additionally, there are many C++ libraries that you can incorporate into your project. For example, you can use the CURL library.
I've found that it seems good, but I've never used it: link.
However, I suggest using Qt Way methods.
Kind regards.
-
You should define what you mean by anywhere. Anywhere in the world is not equal to anywhere in an enterprise internal network.
That said, whether you use a REST interface, GraphQL or direct connection has nothing to do with network availability.
-
Hello @Radio1985,
There are many possibilities for implementing a RESTful API at the backend, and you are accessing a web service API in a cloud environment rather than accessing the database directly. When you start implementing this architecture, you will actually need a backend developer to create a RESTful API in a cloud environment, and you won't have any tasks related to the database. When you use Firebase, you are essentially developing your software as a full-stack developer, so this is a different scenario.
You can create a service that is accessible from anywhere in the world. I mean, theoretically, if you live in China and China has blocked AWS, you won't be able to reach your server.
When you begin developing your REST client in Qt Creator, you have several ways to implement the REST client.
The Qt Way: You can utilize Qt Network Module classes for implementation.
I found an article you can examine: link.
If your application is QML-based rather than widget-based, you can use JavaScript to implement the REST client functions. There is a link on how to implement it: link.
Additionally, there are many C++ libraries that you can incorporate into your project. For example, you can use the CURL library.
I've found that it seems good, but I've never used it: link.
However, I suggest using Qt Way methods.
Kind regards.