[aerogear-dev] Sync Mobile Apps

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[aerogear-dev] Sync Mobile Apps

Daniel Passos-2
Hi Guys

I'm working on a little poc of Android TODO project. I'm Thinking about save and sync tasks on mobile apps. Which best approach? Save all tasks local and sync them of server?

What approach you used in iOS TODO project? What you think about sync tasks?


Att,
Daniel Passos



_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev
Reply | Threaded
Open this post in threaded view
|

Re: [aerogear-dev] Sync Mobile Apps

Marko Strukelj
For a mobile application it's definitely better to try and be as independent of the server as possible. Also you normally want to save all the user input immediately, as user may switch to another task and then return to the app - which has to appear in the same state user left it, even though an OS maybe shut down app's process, and started it afresh later. The need to save data locally is therefore inevitable for good user experience - I would even call it reliability.

This all goes in favor of 'save locally, and sync to the server' approach. And you also need to sync from the server to learn about tasks created via other devices. Local storage should be considered a cache of server side data + some locally created data that has not yet been synced to server. And there may of course be some data that specifically relates to client device and doesn't have to be stored on the server - like application settings maybe ...

IMHO that's the best approach to this type of application.

- marko


----- Original Message -----

>
>
> Hi Guys
>
>
> I'm working on a little poc of Android TODO project. I'm Thinking
> about save and sync tasks on mobile apps. Which best approach? Save
> all tasks local and sync them of server?
>
>
> What approach you used in iOS TODO project? What you think about sync
> tasks?
>
>
> PoC: https://github.com/danielpassos/aerogear-todo-android
>
>
> Att,
> Daniel Passos
>
>
>
>
> _______________________________________________
> aerogear-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>
_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev
Reply | Threaded
Open this post in threaded view
|

Re: [aerogear-dev] Sync Mobile Apps

Daniel Passos-2
IMHO that's the best approach to, but this approach has some problem.

1) The task have a ID. It's created by server. What ID should be created on device? We create 2 ids? One local and other for server?

2) How do I know the task is not synchronized? Use a new field timestamp?

3) If i change task on my device and you change same task on your device or on server. What do we do?

-- 
Daniel Passos

On Friday, September 7, 2012 at 5:54 AM, Marko Strukelj wrote:

For a mobile application it's definitely better to try and be as independent of the server as possible. Also you normally want to save all the user input immediately, as user may switch to another task and then return to the app - which has to appear in the same state user left it, even though an OS maybe shut down app's process, and started it afresh later. The need to save data locally is therefore inevitable for good user experience - I would even call it reliability.

This all goes in favor of 'save locally, and sync to the server' approach. And you also need to sync from the server to learn about tasks created via other devices. Local storage should be considered a cache of server side data + some locally created data that has not yet been synced to server. And there may of course be some data that specifically relates to client device and doesn't have to be stored on the server - like application settings maybe ...

IMHO that's the best approach to this type of application.

- marko


----- Original Message -----


Hi Guys


I'm working on a little poc of Android TODO project. I'm Thinking
about save and sync tasks on mobile apps. Which best approach? Save
all tasks local and sync them of server?


What approach you used in iOS TODO project? What you think about sync
tasks?




Att,
Daniel Passos

_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev
Reply | Threaded
Open this post in threaded view
|

Re: [aerogear-dev] Sync Mobile Apps

Marko Strukelj


----- Original Message -----
>
>
>
> IMHO that's the best approach to, but this approach has some problem.
>
>
> 1) The task have a ID. It's created by server. What ID should be
> created on device? We create 2 ids? One local and other for server?
>
Using a GUID for id would address this problem in is a simple and superior solution IMHO.
 
>
> 2) How do I know the task is not synchronized? Use a new field
> timestamp?
>
This is where we're starting to touch sync layer. The idea is to create a library that handles all that for you. But of course technical details of such a library would be similar to what you would otherwise implement yourself.

I can imagine a set of states an task can be in with regard to synchronization. Once it's create locally we could say it's LOCAL. Once it is successfully pushed to the server we could say it is PUSHED. We may want to sync it back from the server in that case we could say it's SYNCED. This last step may not be necessary as incremental synchronization can be tuned to skip newly created task.

Anyway - I think this would have to be part of a Sync API which we have to design and implement.

>
> 3) If i change task on my device and you change same task on your
> device or on server. What do we do?
>
True. There is more than one option. And we should support multiple approaches in our Sync library. With TODO application you might simply overwrite any previous version based on LastModified timestamp.

>
>
> --
> Daniel Passos
>
>
>
> On Friday, September 7, 2012 at 5:54 AM, Marko Strukelj wrote:
>
>
>
>
> For a mobile application it's definitely better to try and be as
> independent of the server as possible. Also you normally want to
> save all the user input immediately, as user may switch to another
> task and then return to the app - which has to appear in the same
> state user left it, even though an OS maybe shut down app's process,
> and started it afresh later. The need to save data locally is
> therefore inevitable for good user experience - I would even call it
> reliability.
>
>
> This all goes in favor of 'save locally, and sync to the server'
> approach. And you also need to sync from the server to learn about
> tasks created via other devices. Local storage should be considered
> a cache of server side data + some locally created data that has not
> yet been synced to server. And there may of course be some data that
> specifically relates to client device and doesn't have to be stored
> on the server - like application settings maybe ...
>
>
> IMHO that's the best approach to this type of application.
>
>
> - marko
>
>
>
>
> ----- Original Message -----
>
>
>
>
>
>
>
> Hi Guys
>
>
>
>
> I'm working on a little poc of Android TODO project. I'm Thinking
> about save and sync tasks on mobile apps. Which best approach? Save
> all tasks local and sync them of server?
>
>
>
>
> What approach you used in iOS TODO project? What you think about sync
> tasks?
>
>
>
>
> PoC: https://github.com/danielpassos/aerogear-todo-android
>
>
>
>
> Att,
> Daniel Passos
> _______________________________________________
> aerogear-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>
_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev
Reply | Threaded
Open this post in threaded view
|

Re: [aerogear-dev] Sync Mobile Apps

Bruno Oliveira
About GUID generation it might bring some insights about how to easily do it: http://www.youtube.com/watch?v=RPJENzweI-A + extras on security.


-- 
"The measure of a man is what he does with power" - Plato
-
@abstractj
-
Volenti Nihil Difficile

On Friday, September 7, 2012 at 10:24 AM, Marko Strukelj wrote:

Using a GUID for id would address this problem in is a simple and superior solution IMHO.


_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev
Reply | Threaded
Open this post in threaded view
|

Re: [aerogear-dev] Sync Mobile Apps

Matthias Wessendorf
In reply to this post by Daniel Passos-2
Hi Daniel,

On Thu, Sep 6, 2012 at 11:21 PM, Daniel Passos <[hidden email]> wrote:
> Hi Guys
>
> I'm working on a little poc of Android TODO project. I'm Thinking about save
> and sync tasks on mobile apps. Which best approach? Save all tasks local and
> sync them of server?
>
> What approach you used in iOS TODO project? What you think about sync tasks?

nothing there; once I got my baseURL/endpoint done, I will look into that topic.

-M


>
> PoC: https://github.com/danielpassos/aerogear-todo-android
>
> Att,
> Daniel Passos
>
>
>
> _______________________________________________
> aerogear-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>



--
Matthias Wessendorf

blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf
_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev