When to use a persistent storage?

Hi all

I have created applications that use the persistent storage, and I created applications that use a SQLite database.  I also have applications that use both.  My question is this:

Persistent storage should be limited to what it stores?  For example, should persistent storage serve more for purposes of storage of simple things like "font size selected user for the application" and "a hash of default language table and its code of language of the application"?  Alternatively, could also be recommended to act almost like a database, for example when a user does not have an SD card installed - in which case store you several vectors of objects and others?

Is there a possibility of persistent storage is only not available due to limited space?  For example, if the user has a large number of other applications that use the persistent storage?

Finally, I believe that persistent storage is only erased in the event of a battery pull, etc..  Is it also possible to delete in other ways, like a reboot?

Thank you!

I look at the characteristics of the data I store and the characteristics of the options (SQLite, folder on card SD or PeristentStore) and make a decision on this basis.

The highlights for me are

(a) the size of the data

(b) requirement of presence

(c) the use of the data

(d) deletion of data

Working through these:

(a) size

There is a reasonable amount of available devices, as well as more than PeristentStore.  If you have a vector of strings of 10,000, each 100 bytes long, it's always only! MB of storage.  And there are managers of low storage that you can listen to and store your use of the PersistentStore.  But there is more space on an SD card, and no chance to shake the Blackberry is that you use up too much memory (if you use PersistentStore the unit clears things like the old emails that can disrupt your users).

(b) requirement of

Don't forget that your users can remove the SD card and all data

(c) the use of the data

If the data lends itself to using an object of mode, it seems an appropriate way to store it in this form, which means that there is no "Serialization" required to make it a flat file or the conversion into a table.  But things like images, audio files and gain no advantage being stored as object.  So stick them on the SD card.

(d) remove

PersistentStore is deleted when the application is removed, which can be a good thing.

In summary, there is no right answer here, use the best option for the job you have.

With regard to your questions:

"Is there a possibility of persistent storage is only not available due to limited space?

Yesish, as mentioned, it is the low Storage Manager.  But to be honest, you can store megabytes of data in a table like structure in PersistentStore, and as long as you're careful, it will work fine.

"I think that persistent storage is only erased in the event of a battery pull.

No, it remains on a battery pull.  To clear, regular forms are to wipe the device, or remove the application that uses it.

Tags: BlackBerry Developers

Similar Questions

  • Use a persistent storage or other methods to synchronize

    I have a user interface class that communicates with a background class by sending commands with world events to the base class. Two of them also uses a persistent storage.

    A simple method to retrieve return values could be to use a persistent as this storage:

    The user interface does:

    1 clears the back entrance in a persistent storage

    2 send the world event.

    3. going in a loop with a Thread.sleep and check if the back entrance is always empty

    After a number of loops decides that no response will be provided.

    The background task does:

    1 housing starts by accessing persistent storage in order to block with synchronization

    2 performs at the request of action

    3 put the result in the return of persistent storage field

    4 out of sync

    It sorts of handset return results and waiting for results. If the background task is not there the user interface will break out of the loop with a blank back. The only uncontrolled situation would be if the background task fails

    along the way, but then I have other problems. I threw an eye to wait/notify, semaphores and others, but the easiest solution is to use a persistent storage, because it has been used in any case for return information.

    Or expertise in this forum suggest another approach?

    A single Thread.yield is very good indeed, but if you put the user interface in a loop, just treatment Thread.yield () and the test for completion, instead of blocking your Thread event you will be hogging your event Thread and the operating system can get mad that too.

    As to notify the Ui that a message has been processed, Yes, the Observer Interface to do this.

  • How to use the persistent storage

    Hello... Can we use persistent in blackberry webworks storage... I don't want to use SQLite... Any suggestions...

    joygupta wrote:
    Thanks for your reply... you can give a sample of the same...

    Now, things you need to know:

    -creation of Javascript Extension in the development of Blackberry Webworks.

    -How to set up a persistent Java development storage

    You can do a search on Google for more include some documentation and samples.

    As a sample of a documentation:

    http://www.Scribd.com/doc/39084892/lab-building-a-BlackBerry-widget-JavaScript-extension

    or an example of project: http://na.blackberry.com/eng/developers/devbetasoftware/Lab_Widget_Extension.zip

  • All memory load when we read from persistent storage

    for example,.

    Store = PersistentStore.getPersistentObject (PERSISTENT_ID);
    synchronized (store) {}
    If (store.getContents () == null) {}
    _formStore = new Vector();
    store.setContents (_formStore);
    Store.Commit ();
    }
    }
    _formStore = store.getContents ((vector));

    It's reading of persistent and moulding guide so if this vector stores a big data so that we can use memory when reading persistent?

    If anyone knows it please help

    Thank you

    I think that you can store 30 KB per file and by a large amount of records in the record store. In basic, I guess that's what you want, because you don't need to load all of the Bank to get a single record. The downside is that your vector must enter into a byte array and be created from it. I think that there is no NoCopyByteArrayStreams available, but I don't know if they could be used for this purpose.

    Edit: Maybe the record store is itself set up by a PersistentObject. The flagship store is implemented in this way.

  • When you use MS 2003 storage server, backups ESXi virtual machine

    Hello

    I have a test lab that I need to put into production, but I need to get to a backup strategy before I can do that.

    I have a server ESXi (3.5 U3) frontal 5 virtual machines that all is in an ISCSI data store that is hosted using the Microsoft 2003 Storage Server platform.

    One of the virtual machines is a file and print box that has a 500GB partition in the virtual machine, but the virtual machine is located on the ISCSI LUN. What is the best way to save these data, that I can't back up just the LUN because I believe that some of the VM configuration files to sit on the front-end server ESXi?

    The nightly backup is always back up all of the LUN (2 TB) because the virtual machine file will always be 500 GB, as it is in full expansion in the file of the virtual machine, so that the incremental backups wanted to work (or will?).

    If I am running a backup script against the host of the virtual machine that comes will produce a 500 GB backup file as it comes to the size of the virtual machine?

    Any help, suggestions or comments are welcome.

    Thank you

    If the data store for ESXi is located on the iSCSI LUN, backup of the iSCSI LUN is all you need to do.  The configuration of the Virtual Machine is stored there, and VMDK files that make up the disks.  If the 500 GB of space on the file and print box is on a LUN that is separated from the iSCSI data store, then you will need to back up both the data store LUNS and the LUNS of 500 GB.  If the 500 GB is just a VMDK file on the data store, the backup data store should get everything.

  • Error in persistent storage when the application update that happened.

    I've been struggling with the problem for a long time.

    MY application uses a persistent storage to store parameter information.

    But when I update my application from version 1 to version 2, number of items in my configuration page has been changed, which means the new version of the page layout will load and save some new stuff in a persistent storage that did not exist in the old persistent storage.

    Problem occurs when custorms update their request. How can we drag all the old stored information when users start to use the updated application?

    I see these three options:

    (a) the best thing to do is to delete the old application, which will get rid of the old persistent data.

    (b) create a 'version2' of you persisted object with a different name.  In your treatment of startup, you see if there is a version 1 object, and if so, migrate the setting of the object Version in 1 to your new object.

    (c) try to your compatible changes.  There are different ways to do this.  A way that is easy to understand is to persist a string, which is your options encode in XML format.  If you use an XML string, then you can add a new attribute to your new options - but the persistent object remains the same.

    I hope this helps.

  • Persistent storage problem

    Hi all

    I use a persistent storage to store my data.

    Question: Persistent data are automatically get updated while recovery of persistence data and store it in a variable local object and then modify this local variable, observe that the persistent data are also changed without saving my new changes.

    I'm storage array of user defined class in persistent for example myclass [];

    I used to store vector which has been also get updated so I have changes to my class, I'm storage table because I store the list of objects of 'MyClass '. By changing the vector in [myclass] problem has been solved, but now I'm getting same result once again.

    I create a listener in the background that will read persistent data and send only data used to my application in the foreground, but when I do some changes in my local object again once it finds that the data gets reflected in persistent.

    Please let me know what I am doing wrong. I created a library of my persistent classes so that the foreground and background the two application could access.

    Looks like my storage

    Class Myclass implements persistable

    {

    certain types of data from premitive

    MyClass2 [] arrayOfSecondClass;

    }

    class Myclass2 implements persistable

    {

    certain types of data from premitive

    Myclass3 [] arrayOfThirdClass;

    }

    class Myclass3 implements {persistable

    Some data from premitive

    }

    //////////////////////////////////////////////////////////////

    call persistent to save and retrieve data:

    Thank you Peter and James,.

    It's corrected now. Your example simple singleton helped to understand the major concept.

    Kind regards

    Aparna Bloe

  • Local persistent storage takes a long time

    Hi all

    I created an application in which I store locally 1,200 objects (employee information) using the persistent storage of BB model.  For each object store, I have 7 attributes: name, phone, address, email, mobile, area and position. I store this information that once (the first time, the application is launched), but this activity takes about 4 minutes to complete, I think it's a lot of time. Does make sense or I may do something wrong (not effective)? Is there another mechanism to store information on the spot which is the more efficient/FAST?

    Best regards

    Juan.

    It is normal that it takes so long, do so in a separate thread or display a progress on a splash screen bar illustrating indexing.
    If it needs to be done that only once the time needed is not very important IMO.

  • Storage DVR when you use HTTP dynamic streaming

    Hello

    When you use DVR with RTMP streaming flow could / should be registered as a single large file on the server, but when using HTTP streaming stream will consist of many files of chuncked; in this case how the flow will be backup, FMS 4 will bring together the pieces? will unlikely, that pieces of flow be saved? in this case, I wonder what tool could be used to access and make videos of him. What is the exact of the FMS4 behavior when dealing with storage of DVR HTTP streaming?

    Thank you

    I want to correct you here: HTTP Streaming application are served as a segmented files, but recording is great single file whereas you have just one segment - if you gave segmentduration then you would multiple files. I hope this clears your doubts regarding the DVR HTTP Streaming.

  • Register a class in a persistent storage?

    I have a class with many defined configuration variables. These are defined during execution. Is it possible to back up and recover the class in a persistent storage? If so, how?

    The situation you are trying to encode to is easily manipulated with permanent storage.

    If you look at the works of persistent store, you basically store an object in a persistent crack, which is identified by an ID - the ID is along the value.  Anyone who knows the ID can access the object.

    However, to interpret the object, they must have the exact class which was used when the object was stored.  In your case, it's easy as your two 'Applications' will actually use the same class that they are actually just different entry points into the same set of code.

    This requirement for the same class to use, becomes a problem when you have two totally different applications using the same persistent ID.  In this case, both applications have to share a class library that defines the persistent object.

    But back to your situation, what you're trying to work with persistent store.

    To give you more feeling for her, if your application asks the persistent object, it gets a reference to an object in the flash memory.  When your GUI application did the same thing, he will get a reference to the same object.  Then they will certainly share data, and consider it both one and other updates.

    Hope that clears it for you.

  • Workaround for storing persistent objects I have persistent storage?

    I am storing configuration of sorts data in the persistent storage XML definitions and other data of type string.

    These data are read from a server when the application is installed and can also be requested by the user.

    It is stored in a hash table for the simple extraction and hash tables are saved in persistent storage, works well.

    Except for storing images that come in the format of png og files are not persistables. Who discovered the way lasts :-)

    Is there a way around this problem? All this data is delivered in a zip file from the server and everything is unpacked on the SD card. So is it possible to "turn" or "wrap" these png files so they can be stored in a persistent storage? Save them on the SD card are ok for temporary storage, but for 'permanent' storage, I like to keep in a persistent storage.

    arrays of bytes must be persistent.
    You can use http://www.blackberry.com/developers/docs/7.1.0api/net/rim/device/api/system/EncodedImage.html#getDa... to get bytes from an image, and you have already mentioned how to get it back.

    store in sqllite work similar.

  • removeAllelement() method of the vector to remove persistent storage data

    Hello

    I store a vector in the persistent storage when I use removAllelement() vector method to remove all elements from the vector, this command deletes the data from the device of storage.why persistent, behaves like this. I use blackberry 8900 OS 4.6.1.

    the stored object is the same, you are currently handling. If another application is running a validation on a persistent store shops are kept and your empty vector is written in the persistent store, even without you commitment.

    You can copy the stored vector If you want to change it without changing the stored one.

  • Update of persistent storage and application

    Hi all

    is there a way to keep the persistent storage when I update the application on the device/Simulator? At the present time, I have to remove my storage before persistent that I have send a *.cod on the device/Simulator update, otherwise I get the javaloader message that the module is still in use.

    Kind regards

    Carsten

    Yes, and it works. I guess the behavior of everything that I experience is according to the design, in fact, that it makes sense, I have to admit.

    Conclusion:

    Without a persistent store, you can load and delete modules as you want without reinitialization.

    With a store persistent activity the reference must be resolved in a controlled manner, allowing RIM only via a reset after downloading the updated application. Delivery to zero then correctly replaced the old app of the new application and allows access to the preserved persistent store.

    I hope that my conclusions are correct. However, it is inconvenient because the sim card reset takes quite a long time...

    Thanks for your time, LWG!

    Kind regards

    Carsten

  • "VMware ESX Server has no persistent storage."

    I installed VMware ESXi 3.5 installable on a server with an Adaptec RAID 3405 controller. The build number of ESXi is 123629. I've got 4 1 TB drives configured in a RAID 5 array for a total to 2.73. When I install VMware, he sees the RAID array with the right size and installs successfully. However after I reboot and connect with the VI Client I get the message on the server not having is not a persistent storage and no data warehouses are displayed. If I go to storage adapters it shows Adaptec SCSI like vmhba2 with 2.73 TB capacity. However when I add storage and select disk/LUN it shows only 2.73 TB but only 744 GB of available capacity. I've never met this before. How to access the full capacity? I thought maybe it was because I was still on the trial but license using the serial number of the license made no difference. Also after he did the first time I've recreated the RAID array and started with a new installation of VMware. Both times he sees only 744 GB available.

    Maximum supported = 2 TB LUN size, then you need to separate your RAID in 2 volumes, less than 2 TB each

    ---

    VMware vExpert 2009

    http://blog.vadmin.ru

  • Some of my Outlook (hotmail) files are missing when you use Firefox

    When I use Firefox as my browser for my Hotmail e-mail account (Outlook), for the first time this afternoon, some of my personal folders in the left column are missing. But if I use another browser such as Google Chrome or IE9, the files are all there.
    The specific files that are missing are subfolders in the personal file, I created and named trip.
    How can I get them back so that I can continue to use Firefox?

    Therefore, I would appreciate your help.
    Thank you very much in anticipation

    Anthony

    Hi Anthony,.
    If you refresh the files Panel in Firefox or if you search for them, the folders appear actually?

    This occurs after you clear the cache and cookies? Mode or safe mode? Questions to troubleshoot Firefox in Safe Mode

    If you open the developer tools Web console, the folders appear in the html code of the page?

    If the problem persists, please file a bug in the webcompat.com where all the bugs of compatibility were studied.

Maybe you are looking for

  • A99 magnifying glass

    Anyone has any suggestions on a good magnifying glass to the A99 motorway? Thank you Kirk

  • Windows virtual memoria baja

    that means windows virtual memoria baja

  • Problem with the Action Center

    I have a problem with my NVIDIA Graphics Driver and Action Center said he found the solution, but it cannot be downloaded because it could not connect to the internet. The message is this: "Your computer was unable to download the solution at this ti

  • Client connected to the remote access VPN, but got the wrong default gateway

    Hi all I struggled for a few days and really need some help here. My PC (192.168.254.x) is on the same vlan with external interface (192.168.254.171) to my PIX506E. When I run the Cisco VPN client, my PC shows connected and gets the IP address of 10.

  • install the microsoft livecam 1.4 software

    I can't install the microsoft livecam 1.4 software using the CD of drivers available. The message I get is "the program is blocked due to compatibility issues".  I am using windows 7 on my laptop. I tried to follow the steps online but impossible bec