Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Highlighted
Developer
Posts: 132
Registered: ‎10-25-2011
My Device: Tour 9630
My Carrier: MTN
Accepted Solution

using PersistentStore or sqlite to cache feeds from server

Hi everyone ?,

I am retrieving feeds from my server at intervals lets say 5 mins and i want to be able to cache this feeds from the server (data interchange is json) , now i am confused will it be wiser to use the sqlite way to store this data or i use the persistentstore , my confusion is the size of the persistent vector against the size of the sqlite database and also performance and efficiency in reaad and write operations , thanks .

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: using PersistentStore or sqlite to cache feeds from server

Some questions to assist in this decision:

a) does it need to be persistent?  In other words, does it need to survive a device restart?

b) How much data are we talking here? > 1 MB? > 10 MB? > 100 MB?

c) How active is this - is it used in every screen interaction or just once at the start?

d) Does this need to survive the user swapping their SD Card?

Developer
Posts: 132
Registered: ‎10-25-2011
My Device: Tour 9630
My Carrier: MTN

Re: using PersistentStore or sqlite to cache feeds from server

Hi peter , thanks for your response I am answering according to your question list above
A) Yes it has to survive a device restart
B) @ least 5mb
‘C)once I get the feeds from my server that is every 5 mins I should be able to cache the feeds
D) not really
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: using PersistentStore or sqlite to cache feeds from server

Downloading 5 MB every 5 minutes seems like quite a lot.  But maybe I am old fashioned.

 

If you are just processing it as a sequential file, you could just stick it on the SD Card yourself,  This will be faster but much less flexible than SQLite.  . 

 

For a file of that size, I would not put it in persistent store if this was for general consumers who might have small Curve devices.  But if you are targeting this to the high end recent phones, then 5 MB is not a worry, and it would be a lot easier. 

Developer
Posts: 132
Registered: ‎10-25-2011
My Device: Tour 9630
My Carrier: MTN

Re: using PersistentStore or sqlite to cache feeds from server

Thanks peter , I am working on d db already