Question

I have a client requirement of not to use an RDBMS, but instead do everything using in-memory data-structures If the server is restarted then the application state will revert to the last state saved.

I don't have any idea of using in-memory data , I used to work with MySQL ,but not in memory If anyone could please guide me a bit about this , any tutorial or something

Below are some examples ...

     public Object save(Object object, Class c) {
    database.ofy().put(object);
    return object;
}

public void delete(Long id, Class c) {

    database.ofy().delete(c, id);   
}

public Object findById(String id, Class c) {
    return database.ofy().find(c, id);
}

public Iterable<Object> findAll(Class c) {
    Iterable<Object> models = database.ofy().query(c).fetch();
    return models;

    }

}

Thanks

Was it helpful?

Solution

you can use sqlite, which has hooks to a lot of languages.

the default use for sqlite is for file-based, but it can easily be used in-memory.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top