Question: My app will pull some json data when it is started and realistically, once the data has been pulled, I really won't need to pull it again for the duration of the user experience. The backend data may update a few times a day at most, so I think I would like to just grab the data upon app start and then use that same data for the duration and give the user an option to manually refresh the data. So, my question is, where/how should I store that data? I've got all of my data structures set up (classes and sub-classes). And there may be 200 or so instances of some of the classes. If I store everything as member variables in my activity\_main class, it won't be available to other activities once the other activities are started. Storing them all in databases could be an option, but it sort of feels like overkill. I really don't need the data to persist between sessions. Is there a way to easily store it in memory and still have it easily accessible to all activities?

Answer: 
You should think about OS killing your app process on low-memory, so backing your data on disk is a good thing to do. Doing so you have an ability to show user data from disk cache while refreshing it in background from server.

Choosing the tool for data storage depends on the way you need to work with data.

Of course, there is an option to use [Realm](https://realm.io/news/realm-for-android/), but you should consider the fact that it is **not** the relational database. So if you have complex domain model with joins and other relational stuff for your business logic, I'd go with something other. It is thread-safe, also has migrations (but, as for me, migrarations are always pain, you just can not do anythig about it). Realm is supposed to be RxJava-friendly now (support added in v0.87) There are some [disadvantages](https://www.reddit.com/r/androiddev/comments/3jyygb/what_are_the_disadvantages_of_realm/)(part of them may already be fixed), but you should consider it before using.

As for more relational approach, there is [SQLBrite](https://github.com/square/sqlbrite) library:

> 
> A lightweight wrapper around SQLiteOpenHelper which introduces reactive stream semantics to SQL operations.
> 
> 
> 

It is not an ORM (but you can add some kind of it on top of SQLBrite if you wish: [see this](https://github.com/sockeqwe/sqlbrite-dao) for more info). In fact, being alone this library is doing one thing (and doing it good) - it provides a mechanism for coordinating and composing the notification of updates to tables(Realm also has such ability) such that you can update queries(in SQL fashion) as soon as data changes. And it respects RxJava!
As an alternative to SQLBrite you can look at [StorIO](https://github.com/pushtorefresh/storio). 

There are also lots of different ORM solutions, like GreenDAO, ORMLite etc. 

But I'm pretty sure, one of the first two libraries (Realm or SQLBrite) will likely help you. So analyze your app, these libs and decide what fits better.

P.S. [Great article](http://blog.danlew.net/2015/06/22/loading-data-from-multiple-sources-with-rxjava/) on how RxJava would help you to work with data from different data sources (in-memory cache + disk cache + network) easily. Might be helpful!
Easiest thing is to do is store the json file in Apps data storage and parse the json every time you need.

But this is **not recommended** as it is costly to parse data every time.

**Best option** is to implement [Realm](https://realm.io/news/realm-for-android/) (Replacement for Sqlite) which is very easy to implement and its amazingly fast.