background threading?
I recently wrote a custom service that passes jpeg DATA in an base64 encoded string, and then on the custom service resource end, I manage the data and save the information to an image field.
However, this is taking over ten seconds to complete (and I have a big pipe to go through here in the office--and the mobile data experience takes even longer), and I am wondering if this is going to be acceptable to the users of my mobile app.
Are there any ways, that are known, or methods to create some sort of multi-threading, or putting a service call in a background thread?
@signalpointl, how have you dealt with these issues in your production mobile app experiences?
Thank you & Mahalo very much in advance.
GS
@gs9999 I would imagine there is a Cordova plugin to easily talk to a custom background thread. That plugin probably allows you to send data to the native background thread (i.e. hopefully be able to send the base64 encoded string, or better yet location to the file on the device itself). I haven't done it myself, but I guess that means one has to then write the custom native Android and the custom native iOS code to handle delivering it to Drupal (via Services File Create resource).
I feel your pain on the base64 slow user experience, I'll typically hide the form submit buttons upon submission and throw up a drupalgap_toast() to let them know it is processing. Fortunately it hasn't been too big a problem for my apps, since I'm usually dealing with profile pictures and typical Drupal image usage.
I'd love to learn how to use the File Create Raw resource in Services, that definitely will speed it up.