|
Post by rachidi on Feb 9, 2017 20:21:58 GMT
Hi,
On the Tau Technologies github platform, projects rhostore(ruby-on-rails backend server) and store-server (rhoconnect server app) have been updated with examples on how to sync binary files. However, the store project (rhodes application) has not been updated to handle binary files and sync them.
Will you be updating that sample app? If so, when can the update be expected?
Kind Regards, Rachidi
|
|
|
Post by Vladimir Musulainen on Feb 10, 2017 5:31:06 GMT
|
|
|
Post by egghead on Feb 10, 2017 10:16:36 GMT
|
|
|
Post by Vladimir Musulainen on Feb 10, 2017 10:18:08 GMT
egghead, yes, you are right. I fixed it.
|
|
|
Post by rachidi on Apr 3, 2017 5:51:33 GMT
Hi Vladimir, After a close analysis of Tau Technologies sample projects: inventoryDemo-backend, inventoryDemo-mobileApp, inventoryDemo-rhoconnect-server, I would like to clarity about the following. 1) In inventoryDemo-backend, the attributes photoUri and signatureUri have types string. 2) In inventoryDemo-mobileApp, the attributes photoUri and signatureUri have types blob.
However in inventoryDemo-rhoconnect-server, the query method does not explicitly set the blob attributes.
The issue I am having is the fact that synchronization from backend to mobileApp is not working (perhaps due to type differences). However, When I changed the type of attributes photoUri and signatureUri to string in inventoryDemo-mobileApp, synchronization works.
1) Could you please confirm the fact in order to have proper synchronization, the attributes types in backend have to match those in mobileApp? 2) Does the configuration you have in the sample project work from your side out of the box?
Kind Regards, Rachidi
|
|
|
Post by Vladimir Musulainen on Apr 3, 2017 7:14:23 GMT
In short: On mobile, a field declared as blob stores path to the file that located at db/db-files/. When rhoconnect-client synces this record from the device to the server, the client uploads the file to the rhoconnect-server. The rhoconnect-server must implement special method "store_blob" that handles blob file storing. The store_blob method in Inventory-Demo-Rhoconnect-Server stores files at Amazon S3 and returns the url for file downloading. This url is stored in the backend. The url will be used later, when the record will be synced from the server to the client. When rhoconnect-client will sync the record from the server to the mobile device, the file will be tried to download by this url. Rhoconnect-server may implement various approaches for storing blob fields (public file server, database, etc). So the answers on your questions are: 1. No, the backend should not have the same attributes types as on the mobile app. It depends on how the rhoconnect-server and the backend implement blob storing strategy. 2. Yes, it works out-of-box. Note: you must use the latest stable version of rhoconnect-client and rhoconnect gems - several issues connected with storing blobs were fixed. regards Vladimir Musulainen
|
|
|
Post by rachidi on Apr 3, 2017 8:20:02 GMT
Hi, I was still using Rhoconnect 5.5.0. Let me quickly update to Rhoconnect 5.5.18 (which is the latest). Kind Regards, Rachidi
|
|
|
Post by rachidi on Apr 3, 2017 21:30:59 GMT
Hi, I have downloaded and installed rhomobile suite version 5.5.18 for windows. However, I can't run rhosimulator. I am getting the following error: Cannot find RhoSimulator: 'C:/RhoMobileSuite5.5.18/ruby/lib/ruby/gems/1.9.1/gems/rhodes-5.5.18/platform/win32/RhoSimulator/rhosimulator.exe' does not exists
On the other hand, I can run my app on the android device. And I am still experiencing the same synchronization issue. Here are my configurations: 1) On the rails backend server, I have: create_table "site_visits", force: :cascade do |t| t.string "monitoring_and_evaluation_specialist_signature" t.string "monitoring_and_evaluation_manager_signature" end
2) On the rhodes app, I have: class SiteVisit include Rhom::FixedSchema
enable :sync
set :schema_version, '1.0' property :monitoring_and_evaluation_specialist_signature, :blob, :overwrite property :monitoring_and_evaluation_manager_signature, :blob, :overwrite end
On my rhoconnect server, the query method does receive data from backend. However, no data is being created on the mobile app. What I noticed is: If I change the property type to string to match backend, data is created. Could you please assist? Does using FixedSchema have anything to do with it?
Thanking you in advanced. Kind Regards, Rachidi
|
|
|
Post by rachidi on Apr 4, 2017 7:30:03 GMT
Hi, I found the root cause of the issue. Using Rhom::FixedSchema causes the synchronization issue. Using Rhom::PropertyBag works. I have tested both on the sample app and on app. The results are the same.
Furthermore, the Rhomobile Suite exe for windows does not install the RhoSimulator.
Kind Regards, Rachidi
|
|
|
Post by Super Admin on Apr 4, 2017 8:35:50 GMT
|
|
|
Post by Vladimir Musulainen on Apr 4, 2017 10:22:11 GMT
>On my rhoconnect server, the query method does receive data from backend. > However, no data is being created on the mobile app. > What I noticed is: If I change the property type to string to match backend, data is created. Could you please assist? Does using FixedSchema have anything to do with it?
Do "monitoring_and_evaluation_specialist_signature" and "monitoring_and_evaluation_manager_signature" at the backend store public uri for file downloading?
I think, sharing source code with us is the best way for assist. Can you sharing code of mobile app, rhoconnect server and the backend?.
|
|