Freeze and FreezeScript


Freeze provides a persistence service that allows you to store the state of Ice objects in a Berkeley DB database with very little effort. In many cases, a few annotations to the Slice definitions are sufficient. Freeze can automatically retrieve objects from a database on demand, and automatically update them in the database when object state changes.

Freeze provides configurable evictors that make it extremely easy to create an Ice server that acts as a front-end to a database. You can create persistent servants that are stored in the database and have Freeze take care of retrieving and instantantiating servants on demand, as clients require them. Similarly, Freeze takes care of writing updated servants back to the database (either in the background, or in a transaction). An evictor effectively acts as a servant cache with configurable size, so you can control the memory–speed tradeoff as appropriate. (Conceptually, a Freeze evictor is similar to the page-replacement algorithm of a demand-paged operating system.)

Despite its simplicity, Freeze does not remove control from your application. For example, you can explicitly control transaction boundaries.

In addition, Freeze provides a convenient way to store and retrieve arbitrary application data (other than Ice servants) via Freeze maps. At the API level, Freeze maps are similar to C++ Standard Library maps or Java maps, so there is no need to learn a new API for database access—searching for an entry in a map automatically retrieves the entry from the database, and adding an entry to a map automatically stores it in the database.

Applications can choose which fields are indexed to optimize the database for performance-critical data access.


FreezeScript is a scripting language that allows you to easily inspect the contents of a Freeze database. This is useful for debugging, or for applications such as report generators. In addition, FreezeScript provides transformation features that allow you to easily migrate an existing database to conform to a new database schema.

Terms of Use | Privacy © 2014 ZeroC, Inc.