Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

A free server/database over the Internet to be used for QML apps



  • Hi all,

    Is there any free (even limited) server to send and save data on it from one side and then send that data on it for some other devices on the other side? In simple language, to work as an intermediate platform and be able to work as a realtime database/server.



  • @tomy said in A free server/database over the Internet to be used for QML apps:

    realtime database/server

    You may be able to use a free account on cloud services to do this. Or perhaps even a google document. I think if your usage is below a threshold on AWS it might not cost anything. You will have to research this.



  • hi @tomy
    what type of data do you need to send ?
    see maybe Firebase



  • @LeLev
    Huh, that is not a bad solution for storing data. For myself I was thinking of setting up node.js on my webserver that I pay $10/month for. But if my usage is low enough firebase would be a better solution and probably a lot more secure than a "roll your own" would be. Of course I was also thinking of a computing resource as well. So maybe not a perfect fit.



  • Thank you for all the replies.

    Using Firebase in Felgo (not QML) is not that hard (if enough time is dedicated for understanding it, for the first time). But when it comes to using it in QML (Qt Creator without Felgo) I don't know of any straightforward tutorial/example that can be normally understood by devoting a working-day time.


  • Lifetime Qt Champion

    @tomy https://forum.qt.io/topic/92650/how-to-connect-to-databases-in-qml
    I don't think you can communicate with databases (I assume you mean SQL databases) directly in QML, but you can do so in C++ and for that you have support in Qt.
    There are many free/open source databases like PostgreSQL, MariaDB, ...



  • @LeLev

    Data may be of these types generally: strings, integer or floating-point numbers, and images. Can these all be done on Firebase?

    @jsulm Thank you for your answer.
    The data types are mentioned above. Each item includes that data and the app must show them in a table, page scrolling down/up etc. Now which of these do you recommend for me better? Or which one is easier to do the task with. I like Qt, QMl, and C++ but know almost nothing about SQL! :(



  • @tomy said in A free server/database over the Internet to be used for QML apps:

    Can these all be done on Firebase?

    google said yes



  • @tomy said in A free server/database over the Internet to be used for QML apps:

    strings, integer or floating-point numbers, and images.

    I think the general rule for databases is "if you can stream it, you can store it". Qt has support for serializing most objects. So most objects can be streamed.


  • Lifetime Qt Champion

    @tomy Do you really want to store images in a SQL database? It is possible using BLOB, but not efficient. You can store the images in a filesystem and store the information where to find them in the database.



  • @jsulm
    No. Honestly speaking, I have zero desire of being dealt with QSL etc, because I know nothing about them, so imagine how tough would be the project on that for me.

    Here is the project:
    Simply, I want to develop an app for Android devices, front-end with QML and back-end with C++, when installed and logged in successfully, it can send packages to a free database, say, Firebase, (with write/read access) and when not logged in, it has only read access to the packages. Each package is actually a set of data: a text, an int number and an image denoting a product (for instance: Name of product: "laptop TH 950", Price: $ 550, Picture: "The laptop’s image").

    One solution is using Firebase, but it's hard considering this example.
    The other solution which is yet using Firebase, is in Felgo. However, the problem with this is Felgo requires a license key for using the Firebase plugin!

    All in all, in my QML project I have to find either an easier way to use Firebase, or another real-time database for it. Any idea, please?


  • Lifetime Qt Champion

    @tomy If I understand you correctly the backend is on a server, right? In this case there is no need (and you really should not do that!) to expose the Firebase directly to the Internet to access it from the clients. This is usually done via a REST API. That means: SQL server is NOT accessible from the Internet, instead a web server provides a REST API which clients can access and this API communicates with SQL server and what else is involved. It is dangerous to expose SQL databases directly to the Internet!



  • @jsulm

    No the back-end is just computations in cpp files in my project. Look please, that I simplified the task from two QML projects to one with the same functionality.

    There are two buttons: User and Admin.
    When Admin is clicked, it requires info to log in the database, to read & write the packages.
    When User is clicked, the user will be directed to the database with only read access to the packages.

    What I need is to handle a way to be able to communicate from my project to the database. It's possible to use Firebase from Felgo, but as I said, Felgo requires a license key for that. If I can use QML instead of Felgo, no license is needed because the services I need are free by default on Firebase.


  • Lifetime Qt Champion

    @tomy If the backend is running on same machine (even in same app?) then why do you need a SQL server?!
    Just use SQLite which is already integrated in Qt.

    "What I need is to handle a way to be able to communicate from my project to the database" - https://doc.qt.io/qt-5/qtsql-index.html



  • @jsulm

    If the backend is running on same machine (even in same app?) then why do you need a SQL server?!

    I never said I want to use SQL, sorry. I don't want local storage either. And there's only one app/project. The back-end part in cpp in the app is for more computations- there might be more buttons and work on the app to do.

    I think I don't need any SQL, MySQL, SQLite etc.
    It looks that is hard for me to convey my thoughts.


Log in to reply