Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Forums

OverviewFelgo 3 Support (Qt 5) › Nasa Space Apps Challenge App

Tagged: 

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #16159

    Felgo User

    Hi to everyone!

    I’m going to participate in the Nasa Space Apps Challenge this weekend and I want to solve this challenge.

    I want to download a KML (XML) file from internet with information about fires available here and show it on a map together with the user position.

    Then, I need a system to allow the current user to post msg on the map and share it in real time with all the other users. The Question is, Can I do it with WebStorage?

    I was thinking in something like this:

    WebStorage{
      property string xmlFile: "<userData>" + xmlData + "</userData>"
      property string xmlData: ""
    
      function addPoint(latitude,longitude,note){
      xmlData += "<point>"
      xmlData += "<latitude>";
      xmlData += latitude;
      xmlData += "</latitude>";
    
      xmlData += "<longitude>";
      xmlData += longitude;
      xmlData += "</longitude>";
    
      xmlData += "<note>";
      xmlData += "note;
      xmlData += "</note>";
      xmlData += "</point>"
      }
    }
    

    Then, the idea is to use a xmlListModel to draw the points using a repeater.

    There is any limit in the size of a variable?

    Do you have any other idea about how to do it?

     

    Thank you!

    #16160

    Günther
    Felgo Team

    Hi

    The WebStorage can be used as a storage that holds data for each user independently or for all users (one storage per application). So when using a per-application storage by setting WebStorage::perUserStore to false, you can access and modify the same data from all devices.

    Just note that the WebStorage is not made for highly concurrent modifications and that you will always have to synchronize the full xml-string for every little change / note that you add. The WebStorage is mainly used for storing key-value pairs of local user data across multiple devices. So using the WebStorage for real-time sharing of messages or big data is definitely not the preferred solution.

    If you need to store the messages, the best way for dealing with such application data is a custom backend service with a solid database solution.
    Another option is to use Felgo Multiplayer features to implement the real-time messages. This solution simply relays messages from one device to the others without storing them (you can store them in a local storage to not loose previous messages, but no per application storage is needed then).

    Of course you can decide yourself which solution to go with that fits your requirements best.

    Hope this was helpful?

    #16162

    Felgo User

    Thank you, Günther

    For now, I think that I’m going to use WebStorage with WebStorage::perUserStorage = false as this is a small project. A custom backend service would be ideal but I can’t develop it in just one weekend.

Viewing 3 posts - 1 through 3 (of 3 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded