You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@usergrid.apache.org by ja...@apps4u.com.au on 2015/06/15 08:29:34 UTC

Re: New iOS SDK

HI Rob and to All,

I posted a while back about a new iOS sdks that Ive created and was going to release in February. Now I never meet that deadline as we (my team) wanted to add some features. For example we added in a file based cache that cached REST api request in a json format using a file based system with a interface so user could add any offline cache method they wanted but after building a few apps with the SDK we realised it was not the best approach and we wanted to stay away from CoreData as it not on Android and we were hoping some one would add this to android SDK. So now we have done some test and looked at a few embedded database that cache requests for off line usage and to limit network traffic. 

So after running some of our thoughts we have come to the point where we have decided to use a local database on device we have options to use a NOSQL database .

Now again as this is not just for us we are going to open source it and donate it to usergrid.org So I would like to get some input from users . As there two options for the way this works option one is a polling system so as you make a api request it checks the cache for the results but for this method to work best it need some headers on the rest server. The other option is using a sync manager that keeps the local database in sync with the service but again during testing this also requires some changes to the server. 

Now Ive alway wanted to have this SDK built to usergrid v2 as thats the version with push messaging for now we just back port push messaging from v2 to current master. 

I'm really hoping this is some thing people would want and we are at the point were we need to work with others as to get the best working feature it requires work on both ends . Im able to do all mobile dev and Im can do a bit on the backend but Im not a expert on Cassandra or the Entity manager and we need someone who really understands how Cassandra works (as each server could have different value for a key as it take time to sync database around the cluster). So if anyone who very commutable working on the server and would like to work with me please message back. As this could work like "Couch DB mobile sync" and will be a Game changer for mobile BAAS platforms .


Thanks for any input. 


January 15 2015 2:17 AM, rod@rodsimpson.com wrote:
> Jason,  thanks for the update and no need to be hard on yourself. We sincerely appreciate all of
> your hard work!!  
> 
> Rod Simpson
> 
> On Wed, Jan 14, 2015 at 3:20 AM, Jason Kristian <ja...@apps4u.com.au>
> wrote:
> 
>> HI TO ALL,
>> Im sorry Ive been late with the New iOS SDK I did say Id have it done by new year, I’m sorry Ive
>> had a project that run over and Ive been flat out and not had time , Im just sending this to let
>> every know Its nearly done and I’ll have out out by end of this month the latest , I just didn’t
>> want people to think I decided not to release it , thats not the case and I hate people who say
>> they will do something and not do it and Im sure open source projects get that all the time so
>> please forgive me for the time its taken and I’ll have it done soon there is only some test to
>> write as I was stupid and left the writing of the test last which I should of done first.
>> Thanks to all and sorry about delay.
>> Jason Kristian | Director | Apps 4 U Pty Ltd.
>> ph: +61 075699 8109
>> mob: +61 0411 389 392
>> e: Jason Kristian <ma...@apps4u.com.au>
>>> On 19 Dec 2014, at 5:47 pm, Jason Kristian <ja...@apps4u.com.au> wrote:
>>> 
>>> Just convenance It could be one repo with the main SDK and a UI Helpers . IT can all be put in
> to
>>> one that fine as just because the UI Helpers classes are there dose not mean people have to use
>>> them .. And after thinking about it , its probably better to have one as most people will use
> the
>>> table view paging controller as it save you some much code and just about every app has UITable
>>> View with paging. What I can do it keep the Facebook pod decency out of the SDKs pod file and in
>>> the read me we can say if you want to use the log in screen (login UI Helper) with Facebook
> login
>>> that they need to add the Facebook SDK there project pod file that way in won’t install the
>>> dependancy unless needed.
>>> 
>>> Jason Kristian | Director | Apps 4 U Pty Ltd.
>>> ph: +61 075699 8109
>>> mob: +61 0411 389 392
>>> e: Jason Kristian <ma...@apps4u.com.au>
>>> 
>>>> On 19 Dec 2014, at 4:47 am, Rod Simpson <ro...@rodsimpson.com> wrote:
>>>> 
>>>> Jason,
>>>> 
>>>> Separating the SDKs out from the main repo is something we have talked about for a while. Since
>>> you
>>>> are contributing a new SDK, we could start with yours.
>>>> 
>>>> The only concern I have is that we will end up with a lot of repos. Is having 3 repos for this
>>> SDK
>>>> mandatory? Or is it just a convenience?
>>>> 
>>>> --
>>>> Rod Simpson
>>>> T @rockerston
>>>> W rodsimpson.com <http://rodsimpson.com>
>>>> 
>>>> On December 17, 2014 at 11:12:32 PM, Jason Kristian (jasonk@apps4u.com.au
>>>> <ma...@apps4u.com.au>) wrote:
>>>> 
>>>> Hi to every one at usergrid dev and happy Christmas.
>>>> 
>>>> I’m just about done with the new iOS SDK and Ive got a question I would like to ask for input
> on
>>> ..
>>>> What Ive done is added a few helper classes for example
>>>> 
>>>> 1 - I created easy login screen that has Facebook and usergrid login set up ready for the user
>> to
>>>> style like they want.
>>>> 2 - I create a UITableViewController & UICollectionViewController with paging and fetch
>>> controller
>>>> already setup. as most application will use a table view controller to a usergrid collection
> and
>>>> they would need paging setup so I created a UITableViewController & UICollectionView Controller
>>>> with paging out of the box ready for user to style.
>>>> 
>>>> now the login helper class also has a dependancy on Facebook SDK. So I know that every one
> wants
>>> to
>>>> have the SDK’s moved to there own repos so we can take advantage of Cocoapods for iOS ,
> composer
>>>> for php , etc. So My preference would be to have the iOS SDK in three repos
>>>> 
>>>> so repo one would contain the Usergrid-IOS SDK and then the Login helper would sit in its own
>>> repo
>>>> and the UITableViewController & UICollectionView Controller would sit in its own repo so when
>>> using
>>>> for cocoapod I would have a few options.
>>>> 
>>>> options 1 — Usergrid SDK and all helper classes.
>>>> 
>>>> pod ‘Usergrid-SDK-all’
>>>> 
>>>> option 2 — just usergrid SDK
>>>> 
>>>> pod ‘Usergrid-SDK’
>>>> 
>>>> option 3 — the usergrid sdks and the helpers I want.
>>>> pod ‘usergrid-SDK’
>>>> pod ‘usergrid-login’
>>>> pod usergrid-paging’
>>>> 
>>>> I will come up with better names but that should show you what Im planing so instead of one FAT
>>> SDK
>>>> you can either have the SDK and then just install the helpers if wanted . This would be my
>>>> preference so If I did not want the login helper I would not need the Facebook SDK so this way
>>> your
>>>> builds don’t have SDK (cocoapods) unless you need it. If some one thinks that it should all be
>> in
>>>> one SDK let me know why and your reasons as
>>>> this is for every one not just my pref. and happy to change if thats what is wanted. But I
> think
>>>> this will be best option to factor out the helpers only when needed.
>>>> 
>>>> So happy Christmas and New Year to all.
>>>> 
>>>> Jason Kristian | Director | Apps 4 U Pty Ltd.
>>>> ph: +61 075699 8109
>>>> mob: +61 0411 389 392
>>>> e: Jason Kristian <mailto:jasonk@apps4u.com.au <ma...@apps4u.com.au>>

Re: New iOS SDK

Posted by Jason Kristian <ja...@apps4u.com.au>.
Hi , Sorry about late response Ive been over seas , I just got back, 

For details on the server side that would depend on wether a push or pull model was used for getting data to sync with local DB or  CoreData on the mobile device ,  Ive been looking at the work on usergrid 2.0 and as Ive said Im not a expert in Cassandra DB / Entity Manager,  but from what I read the way data will be saved it will be versioned so records don’t over write the previous record (table row).

So I would use a pull model where the mobile device could poll the server for any changed records and then issue a HTTP GET to update the local DB on device for off line usage.

If this type of system was used then all the server would need to expose a api end point that could give me all record in a collection with a update_at or created_at timeStamp after the timestamp I pass in the request.

So to give a example if the device had all collections up to date (1/1/2015  at 3.00pm) then the device could issue a query for each collection asking for all records that were saved after that time and date so that way we would not need to reload each collection but only the changed rows in each collection since the last update.

So by doing this if a user of the mobile application was to open a list of records for a collection and they were on WIFI then the SDK would issue a get request and update the local db in the background but if they had no internet or wifi then the application would fall back to local on Device DB.
I would have this configurable in the SDK as some application may not update there data that often so they will be happy with the device updating the local DB once a day in the background other apps would want to poll the server every hour in the background and issue get requests when the user is actively using there app.

I think this will work best for most application we did a review of over 1400 mobile applications and by far most had data that was not updated that often so I think this would fit most usergrid users and any one who would like a server push model for real time update  have other options to use  or can use activities and messaging. 






> On 27 Jul 2015, at 11:18 PM, Rod Simpson <ro...@rodsimpson.com> wrote:
> 
> Jason,
> 
> This sounds pretty awesome.  Can you be more specific about the changes required to the server-side code? 
> 
> Rod
> 
> 
> 
> -- 
> Rod Simpson
> 
> On June 15, 2015 at 12:30:27 AM, jasonk@apps4u.com.au (jasonk@apps4u.com.au) wrote:
> 
> HI Rob and to All,
> 
> I posted a while back about a new iOS sdks that Ive created and was going to release in February. Now I never meet that deadline as we (my team) wanted to add some features. For example we added in a file based cache that cached REST api request in a json format using a file based system with a interface so user could add any offline cache method they wanted but after building a few apps with the SDK we realised it was not the best approach and we wanted to stay away from CoreData as it not on Android and we were hoping some one would add this to android SDK. So now we have done some test and looked at a few embedded database that cache requests for off line usage and to limit network traffic.  
> 
> So after running some of our thoughts we have come to the point where we have decided to use a local database on device we have options to use a NOSQL database .
> 
> Now again as this is not just for us we are going to open source it and donate it to usergrid.org So I would like to get some input from users . As there two options for the way this works option one is a polling system so as you make a api request it checks the cache for the results but for this method to work best it need some headers on the rest server. The other option is using a sync manager that keeps the local database in sync with the service but again during testing this also requires some changes to the server.  
> 
> Now Ive alway wanted to have this SDK built to usergrid v2 as thats the version with push messaging for now we just back port push messaging from v2 to current master.  
> 
> I'm really hoping this is some thing people would want and we are at the point were we need to work with others as to get the best working feature it requires work on both ends . Im able to do all mobile dev and Im can do a bit on the backend but Im not a expert on Cassandra or the Entity manager and we need someone who really understands how Cassandra works (as each server could have different value for a key as it take time to sync database around the cluster). So if anyone who very commutable working on the server and would like to work with me please message back. As this could work like "Couch DB mobile sync" and will be a Game changer for mobile BAAS platforms .
> 
> 
> Thanks for any input.  
> 
> 
> January 15 2015 2:17 AM, rod@rodsimpson.com wrote:
>> Jason, thanks for the update and no need to be hard on yourself. We sincerely appreciate all of
>> your hard work!!  
>> 
>> Rod Simpson
>> 
>> On Wed, Jan 14, 2015 at 3:20 AM, Jason Kristian <ja...@apps4u.com.au>
>> wrote:
>> 
>>> HI TO ALL,
>>> Im sorry Ive been late with the New iOS SDK I did say Id have it done by new year, I’m sorry Ive
>>> had a project that run over and Ive been flat out and not had time , Im just sending this to let
>>> every know Its nearly done and I’ll have out out by end of this month the latest , I just didn’t
>>> want people to think I decided not to release it , thats not the case and I hate people who say
>>> they will do something and not do it and Im sure open source projects get that all the time so
>>> please forgive me for the time its taken and I’ll have it done soon there is only some test to
>>> write as I was stupid and left the writing of the test last which I should of done first.
>>> Thanks to all and sorry about delay.
>>> Jason Kristian | Director | Apps 4 U Pty Ltd.
>>> ph: +61 075699 8109
>>> mob: +61 0411 389 392
>>> e: Jason Kristian <ma...@apps4u.com.au>
>>>> On 19 Dec 2014, at 5:47 pm, Jason Kristian <ja...@apps4u.com.au> wrote:
>>>> 
>>>> Just convenance It could be one repo with the main SDK and a UI Helpers . IT can all be put in
>> to
>>>> one that fine as just because the UI Helpers classes are there dose not mean people have to use
>>>> them .. And after thinking about it , its probably better to have one as most people will use
>> the
>>>> table view paging controller as it save you some much code and just about every app has UITable
>>>> View with paging. What I can do it keep the Facebook pod decency out of the SDKs pod file and in
>>>> the read me we can say if you want to use the log in screen (login UI Helper) with Facebook
>> login
>>>> that they need to add the Facebook SDK there project pod file that way in won’t install the
>>>> dependancy unless needed.
>>>> 
>>>> Jason Kristian | Director | Apps 4 U Pty Ltd.
>>>> ph: +61 075699 8109
>>>> mob: +61 0411 389 392
>>>> e: Jason Kristian <ma...@apps4u.com.au>
>>>> 
>>>>> On 19 Dec 2014, at 4:47 am, Rod Simpson <ro...@rodsimpson.com> wrote:
>>>>> 
>>>>> Jason,
>>>>> 
>>>>> Separating the SDKs out from the main repo is something we have talked about for a while. Since
>>>> you
>>>>> are contributing a new SDK, we could start with yours.
>>>>> 
>>>>> The only concern I have is that we will end up with a lot of repos. Is having 3 repos for this
>>>> SDK
>>>>> mandatory? Or is it just a convenience?
>>>>> 
>>>>> --
>>>>> Rod Simpson
>>>>> T @rockerston
>>>>> W rodsimpson.com <http://rodsimpson.com>
>>>>> 
>>>>> On December 17, 2014 at 11:12:32 PM, Jason Kristian (jasonk@apps4u.com.au
>>>>> <ma...@apps4u.com.au>) wrote:
>>>>> 
>>>>> Hi to every one at usergrid dev and happy Christmas.
>>>>> 
>>>>> I’m just about done with the new iOS SDK and Ive got a question I would like to ask for input
>> on
>>>> ..
>>>>> What Ive done is added a few helper classes for example
>>>>> 
>>>>> 1 - I created easy login screen that has Facebook and usergrid login set up ready for the user
>>> to
>>>>> style like they want.
>>>>> 2 - I create a UITableViewController & UICollectionViewController with paging and fetch
>>>> controller
>>>>> already setup. as most application will use a table view controller to a usergrid collection
>> and
>>>>> they would need paging setup so I created a UITableViewController & UICollectionView Controller
>>>>> with paging out of the box ready for user to style.
>>>>> 
>>>>> now the login helper class also has a dependancy on Facebook SDK. So I know that every one
>> wants
>>>> to
>>>>> have the SDK’s moved to there own repos so we can take advantage of Cocoapods for iOS ,
>> composer
>>>>> for php , etc. So My preference would be to have the iOS SDK in three repos
>>>>> 
>>>>> so repo one would contain the Usergrid-IOS SDK and then the Login helper would sit in its own
>>>> repo
>>>>> and the UITableViewController & UICollectionView Controller would sit in its own repo so when
>>>> using
>>>>> for cocoapod I would have a few options.
>>>>> 
>>>>> options 1 — Usergrid SDK and all helper classes.
>>>>> 
>>>>> pod ‘Usergrid-SDK-all’
>>>>> 
>>>>> option 2 — just usergrid SDK
>>>>> 
>>>>> pod ‘Usergrid-SDK’
>>>>> 
>>>>> option 3 — the usergrid sdks and the helpers I want.
>>>>> pod ‘usergrid-SDK’
>>>>> pod ‘usergrid-login’
>>>>> pod usergrid-paging’
>>>>> 
>>>>> I will come up with better names but that should show you what Im planing so instead of one FAT
>>>> SDK
>>>>> you can either have the SDK and then just install the helpers if wanted . This would be my
>>>>> preference so If I did not want the login helper I would not need the Facebook SDK so this way
>>>> your
>>>>> builds don’t have SDK (cocoapods) unless you need it. If some one thinks that it should all be
>>> in
>>>>> one SDK let me know why and your reasons as
>>>>> this is for every one not just my pref. and happy to change if thats what is wanted. But I
>> think
>>>>> this will be best option to factor out the helpers only when needed.
>>>>> 
>>>>> So happy Christmas and New Year to all.
>>>>> 
>>>>> Jason Kristian | Director | Apps 4 U Pty Ltd.
>>>>> ph: +61 075699 8109
>>>>> mob: +61 0411 389 392
>>>>> e: Jason Kristian <mailto:jasonk@apps4u.com.au <ma...@apps4u.com.au>>  


Re: New iOS SDK

Posted by Rod Simpson <ro...@rodsimpson.com>.
Jason,

This sounds pretty awesome.  Can you be more specific about the changes required to the server-side code? 

Rod



-- 
Rod Simpson

On June 15, 2015 at 12:30:27 AM, jasonk@apps4u.com.au (jasonk@apps4u.com.au) wrote:

HI Rob and to All,

I posted a while back about a new iOS sdks that Ive created and was going to release in February. Now I never meet that deadline as we (my team) wanted to add some features. For example we added in a file based cache that cached REST api request in a json format using a file based system with a interface so user could add any offline cache method they wanted but after building a few apps with the SDK we realised it was not the best approach and we wanted to stay away from CoreData as it not on Android and we were hoping some one would add this to android SDK. So now we have done some test and looked at a few embedded database that cache requests for off line usage and to limit network traffic.  

So after running some of our thoughts we have come to the point where we have decided to use a local database on device we have options to use a NOSQL database .

Now again as this is not just for us we are going to open source it and donate it to usergrid.org So I would like to get some input from users . As there two options for the way this works option one is a polling system so as you make a api request it checks the cache for the results but for this method to work best it need some headers on the rest server. The other option is using a sync manager that keeps the local database in sync with the service but again during testing this also requires some changes to the server.  

Now Ive alway wanted to have this SDK built to usergrid v2 as thats the version with push messaging for now we just back port push messaging from v2 to current master.  

I'm really hoping this is some thing people would want and we are at the point were we need to work with others as to get the best working feature it requires work on both ends . Im able to do all mobile dev and Im can do a bit on the backend but Im not a expert on Cassandra or the Entity manager and we need someone who really understands how Cassandra works (as each server could have different value for a key as it take time to sync database around the cluster). So if anyone who very commutable working on the server and would like to work with me please message back. As this could work like "Couch DB mobile sync" and will be a Game changer for mobile BAAS platforms .


Thanks for any input.  


January 15 2015 2:17 AM, rod@rodsimpson.com wrote:
> Jason, thanks for the update and no need to be hard on yourself. We sincerely appreciate all of
> your hard work!!  
>  
> Rod Simpson
>  
> On Wed, Jan 14, 2015 at 3:20 AM, Jason Kristian <ja...@apps4u.com.au>
> wrote:
>  
>> HI TO ALL,
>> Im sorry Ive been late with the New iOS SDK I did say Id have it done by new year, I’m sorry Ive
>> had a project that run over and Ive been flat out and not had time , Im just sending this to let
>> every know Its nearly done and I’ll have out out by end of this month the latest , I just didn’t
>> want people to think I decided not to release it , thats not the case and I hate people who say
>> they will do something and not do it and Im sure open source projects get that all the time so
>> please forgive me for the time its taken and I’ll have it done soon there is only some test to
>> write as I was stupid and left the writing of the test last which I should of done first.
>> Thanks to all and sorry about delay.
>> Jason Kristian | Director | Apps 4 U Pty Ltd.
>> ph: +61 075699 8109
>> mob: +61 0411 389 392
>> e: Jason Kristian <ma...@apps4u.com.au>
>>> On 19 Dec 2014, at 5:47 pm, Jason Kristian <ja...@apps4u.com.au> wrote:
>>>  
>>> Just convenance It could be one repo with the main SDK and a UI Helpers . IT can all be put in
> to
>>> one that fine as just because the UI Helpers classes are there dose not mean people have to use
>>> them .. And after thinking about it , its probably better to have one as most people will use
> the
>>> table view paging controller as it save you some much code and just about every app has UITable
>>> View with paging. What I can do it keep the Facebook pod decency out of the SDKs pod file and in
>>> the read me we can say if you want to use the log in screen (login UI Helper) with Facebook
> login
>>> that they need to add the Facebook SDK there project pod file that way in won’t install the
>>> dependancy unless needed.
>>>  
>>> Jason Kristian | Director | Apps 4 U Pty Ltd.
>>> ph: +61 075699 8109
>>> mob: +61 0411 389 392
>>> e: Jason Kristian <ma...@apps4u.com.au>
>>>  
>>>> On 19 Dec 2014, at 4:47 am, Rod Simpson <ro...@rodsimpson.com> wrote:
>>>>  
>>>> Jason,
>>>>  
>>>> Separating the SDKs out from the main repo is something we have talked about for a while. Since
>>> you
>>>> are contributing a new SDK, we could start with yours.
>>>>  
>>>> The only concern I have is that we will end up with a lot of repos. Is having 3 repos for this
>>> SDK
>>>> mandatory? Or is it just a convenience?
>>>>  
>>>> --
>>>> Rod Simpson
>>>> T @rockerston
>>>> W rodsimpson.com <http://rodsimpson.com>
>>>>  
>>>> On December 17, 2014 at 11:12:32 PM, Jason Kristian (jasonk@apps4u.com.au
>>>> <ma...@apps4u.com.au>) wrote:
>>>>  
>>>> Hi to every one at usergrid dev and happy Christmas.
>>>>  
>>>> I’m just about done with the new iOS SDK and Ive got a question I would like to ask for input
> on
>>> ..
>>>> What Ive done is added a few helper classes for example
>>>>  
>>>> 1 - I created easy login screen that has Facebook and usergrid login set up ready for the user
>> to
>>>> style like they want.
>>>> 2 - I create a UITableViewController & UICollectionViewController with paging and fetch
>>> controller
>>>> already setup. as most application will use a table view controller to a usergrid collection
> and
>>>> they would need paging setup so I created a UITableViewController & UICollectionView Controller
>>>> with paging out of the box ready for user to style.
>>>>  
>>>> now the login helper class also has a dependancy on Facebook SDK. So I know that every one
> wants
>>> to
>>>> have the SDK’s moved to there own repos so we can take advantage of Cocoapods for iOS ,
> composer
>>>> for php , etc. So My preference would be to have the iOS SDK in three repos
>>>>  
>>>> so repo one would contain the Usergrid-IOS SDK and then the Login helper would sit in its own
>>> repo
>>>> and the UITableViewController & UICollectionView Controller would sit in its own repo so when
>>> using
>>>> for cocoapod I would have a few options.
>>>>  
>>>> options 1 — Usergrid SDK and all helper classes.
>>>>  
>>>> pod ‘Usergrid-SDK-all’
>>>>  
>>>> option 2 — just usergrid SDK
>>>>  
>>>> pod ‘Usergrid-SDK’
>>>>  
>>>> option 3 — the usergrid sdks and the helpers I want.
>>>> pod ‘usergrid-SDK’
>>>> pod ‘usergrid-login’
>>>> pod usergrid-paging’
>>>>  
>>>> I will come up with better names but that should show you what Im planing so instead of one FAT
>>> SDK
>>>> you can either have the SDK and then just install the helpers if wanted . This would be my
>>>> preference so If I did not want the login helper I would not need the Facebook SDK so this way
>>> your
>>>> builds don’t have SDK (cocoapods) unless you need it. If some one thinks that it should all be
>> in
>>>> one SDK let me know why and your reasons as
>>>> this is for every one not just my pref. and happy to change if thats what is wanted. But I
> think
>>>> this will be best option to factor out the helpers only when needed.
>>>>  
>>>> So happy Christmas and New Year to all.
>>>>  
>>>> Jason Kristian | Director | Apps 4 U Pty Ltd.
>>>> ph: +61 075699 8109
>>>> mob: +61 0411 389 392
>>>> e: Jason Kristian <mailto:jasonk@apps4u.com.au <ma...@apps4u.com.au>>