11 Replies Latest reply on Oct 13, 2011 9:28 AM by John Heywood

    Pushing device data...

      So RhoElements seems to solve a lot of problems and Version 2  (sometime in the first half of next year) seems to solve even more issues (device compatability / sync services) - but there is the problem today of "I wrote a data collections app. How do I get this data to a PC and able to be synchronized with other devices?"


      It seems like you don't have very many options if you're working in a disconnected environment using Web SQL on the device:

      1) Web Services : when you do have connectivity - you send data to a web services page and load it into a master DB.

      2) FTP : You could FTP the sqlite database, but you then need to read it on the other side, reconcile it, and then have a way to push it down to the devices again.

      3) ?


      Does RhoElements support the File IO parts of HTML5 ?


      Any other ideas on how you could tackle the data sync issues today?

        • Re: Pushing device data...
          Darryn Campbell

          Hi, you're right that RE version 2 will add a lot more powerful synchronisation with your backend server.


          With RE 1 you can use the networkEvent to detect whether you have network connectivity or not.  When you are offline you can store data locally using ODAX or (preferably) WebSQL; when you regain your network connection you can read out of this database and send the data to your back end (e.g. via AJAX to a Web Service).


          Like you say, you could also FTP the .db file but that would be a lot more work.


          RhoElements does not currently support the File IO parts of HTML5 and will not do in the next version.  We are looking at integrating this functionality before version 2 is released.

            • Re: Pushing device data...


              but if you use Rhoelements in conjunction with another JS framework that manage HTML5 File IO, you should still be able to do whatever you want.

              I do not see Rhoelements as a full JS framework, as many of them exists, and they are of very good quality.

              But using RE as a JS layer to the Moto device feature, is how i see it useful.

              • Re: Pushing device data...

                Got'cha. We'd like to use RhoElements to also do smaller applications where a full blown web server/database server may not be part of the picture. For example : We develop an application that could scale up to a web server environment - but we'd also like to scale down to where the 'application' is stored on the devices, using WebSQL for the backend and then find a way to communicate with another smaller database platform on the PC that helps with the exchange and management of that data between devices.



                • Re: Pushing device data...
                  Brian Reed

                  In a potential customer application for RE, we have a location with no wireless connectivity(very noisy rf environment).  The application would work offline using WebSql to store data and then the terminal would be placed in an ethernet cradle and make a web service call to update a database on a server.  You said "you can use the networkEvent to detect whether you have network connectivity or not".  Will this event detect the available cradle ethernet connection while the device is in the cradle?

                    • Re: Pushing device data...

                      This is a similar circumstance to what we run into all the time.


                      So - I *think* you can use the 'Network Module' in RhoElements to check and see if the server is there. If the device is docked and has permission to access the network - it should be successful and then you can initiate the communication with the web service.


                      You just need to make sure that not only are your users docking the device, but that they pair/setup the device with mobile device center (if you're using vista or 7) or 'connect without setting up device'.


                      That *should* work.


                      EDIT- My hope is that in the future we'll be able to detect an activesync connection (which we may be able to do - I need to experiment) and write a CSV/Excel file to the PC from RhoElements. That would help us significantly.