persistence

best way to persist data in .NET Web Service

I have a web service that queries data from this json file, but i don't want the web service to have to access the file every time. I'm thinking that maybe i can store the data somewhere else (maybe in memory) so the web service can just get the data from there the next time it's trying to query the same data. I kinda understand what nee...

Has anyone moved to NHibernate 2.0 in a production environment?

If so, have you run into any immediate gotchas? ...

What's the best way to persist data in a Java Desktop Application?

I have a large tree of Java Objects in my Desktop Application and am trying to decide on the best way of persisting them as a file to the file system. Some thoughts I've had were: Roll my own serializer using DataOutputStream: This would give me the greatest control of what was in the file, but at the cost of micromanaging it. Straig...

Persistent DB Connections - Yea or Nay?

I'm using PHP's PDO layer for data access in a project, and I've been reading up on it and seeing that it has good innate support for persistant DB connections. I'm wondering when/if I should use them. Would I see performance benefits in a CRUD-heavy app? Are there downsides to consider, perhaps related to security? If it matters to you...

What are the best books for Hibernate & JPA?

My team is about to build a new product and we are using Hibernate/JPA as the persistence mechanism. There are other book posts on stackoverflow, but I couldn't find one that matched my needs. My manager will be purchasing books for our team to use as a resource so... What are the best books about Hibernate and JPA? (Please list each...

How do I persist the value of a label through a response.redirect?

Here's the situation: I have a label's text set, immediately followed by a response.redirect() call as follows (this is just an example, but I believe it describes my situation accurately): aspx: <asp:Label runat="server" Text="default text" /> Code-behind (code called on an onclick event): Label.Text = "foo"; Response.Redirect("Def...

Class library with support for several persistence strategies

I am developing a C++ class library containing domain model classes, and I would like to add support for instantiating these classes from various persistence mechanisms, i.e. databases and file. The user of the class library should be given an interface(?) against which to program a class that can transfer the data from/to the persistenc...

How do I handle data which must be persisted in a database, but isn't a proper model, in Ruby on Rails?

Imagine a web application written in Ruby on Rails. Part of the state of that application is represented in a piece of data which doesn't fit the description of a model. This state descriptor needs to be persisted in the same database as the models. Where it differs from a model is that there needs to be only one instance of its class a...

Persistence of std::map in C++

Do you know any easy or simple way to make a map object (from the STL library) persistent (i.e. write it to a file) so that you can recover its state later when the program in run later ?? Thanks for your help ...

What are the differences between the different saving methods in Hibernate?

Hibernate has a handful of methods that, one way or another, takes your object and puts it into the database. What are the differences between them, when to use which, and why isn't there just one intelligent method that knows when to use what? The methods that I have identified thus far are: save() update() saveOrUpdate() saveOrUpdat...

Persistence: Data Trees stored as Directory Trees

I was wondering as to the practicalities of storing an in memory tree structure as directory tree for persistence purposes. In my case he target filesystem will be ZFS, and once the structure has been created it will be accessed by multiple processes infrequently. How performant is using a Directory Tree as a mechanism of persistence fo...

User Persistence: asp.net caching:

I'm working with caching and persistence for the first time. I have a user object that handles all my user data. Persisting this from page to page I'm planning on using a cookie with a token that then returns the user-object from the cache. What's the best way to implement this. The two ideas/solutions that appear to me are: 1) Cache...

Generating a globally unique identifier in Java

Summary: I'm developing a persistent Java web application, and I need to make sure that all resources I persist have globally unique identifiers to prevent duplicates. The Fine Print: I'm not using an RDBMS, so I don't have any fancy sequence generators (such as the one provided by Oracle) I'd like it to be fast, preferably all in mem...

How to use Data Access Objects for serialized & relational database data access

Hi all, I am developing a C++ domain model class library which should provide some facilities or a framework (i.e. interface classes etc) for writing/reading class instance data to/from both a binary file and a RDBMS. The basis for this library is an application that uses a RDBMS, and there are several methods which instantiate a class ...

Persistence framework?

I'm trying to decide on the best strategy for accessing the database. I understand that this is a generic question and there's no a single good answer, but I will provide some guidelines on what I'm looking for. The last year we have been using our own persistence framework, that although limited has server as well. However it needs some...

The best way of storing an image/sound inside a class?

I'm developing a kind of an exchange format between instances of an application so that user could save information to file and restore it later. The whole 'exchange format' is a single class that gets serialized and written to disk. How would you suggest to store graphical/sound information inside that class? I'd like to avoid just put...

Object Oriented Model on top of LINQ to SQL

I'm playing a bit with LINQ to SQL and overall it's a much better option than what Microsoft had before (DataSet), but it seems that object-oriented capabilities are still limited. Since we currently use a custom persistence framework that created a OO model on top of DataSet, I'm looking to port the framework to a new version building a...

Do I have to close() every EntityManager?

I have just started migrating my homegrown persistence framework to JPA. Given that the persistence frameworks hide a lot of the plumbing, I'm interested in knowing if NOT closing EntityManagers will create a resource leak, or if the frameworks will collect and close them for me. I intend in all places to close them, but do I HAVE to? ...

Has Object Prevalance (Prevayler, Madeleine) been used in a Production System?

Has Object Prevalance mechanisms been used in an actual Production system? I'm referring to something like Prevayler or Madeleine The only thing I've found is Instiki, a wiki engine. But since they started they've switched to SQLite. (The actual instiki page is down) ...

YAML serialization library for C++?

YAML seems like a great format for configuration files & data binding persistent objects in human-readable form... Is there a C++ library that handles YAML? Does Boost::Serialization have plans for a YAML option? EDIT: I would prefer an OO library. ...