Home Help Center

Replace Freeze by PostgreSQL

Hello,

I have started to study ICE for a few days in order to use it
in new developments. I am happy to note that the source codes are
clear and comprehensible !
I will have nevertheless a small question:
Is it possible to use ICE with a relational data base like PostgreSQL
in the place of Freeze? Currently, my company uses MICO like ORB and
PostgreSQL as bases data.

Jean-Michel

Comments

  • marcmarc FloridaAdministrators, ZeroC Staff Marc LaukienOrganization: ZeroC, Inc.Project: The Internet Communications Engine ZeroC Staff
    You cannot replace Berkeley DB in Freeze, but you can write a new persistence service that uses PostgreSQL, using Freeze as an example.

    Freeze is tightly coupled with Berkeley DB (and the next version will even be more tightly coupled), in order to achieve optimal performance. If we would use a database abstraction interface, we couldn't make use of many of Berkeley DB's features, and thus Freeze would be much slower.
  • bernardbernard Jupiter, FLAdministrators, ZeroC Staff Bernard NormierOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Of course it is possible to use Ice with any database -- simply use in your servants both Ice and your database APIs. I want to be sure nobody reads this thread and gets a different impression!

    Ice also offers a persistence mechanism, Freeze, with 3 layers (from lower to higher):
    * The Freeze Database API, a thin layer on top of Berkeley DB. It would not make sense to port or attempt to port this layer on top of any other database.
    * The Freeze Map, a persistent associative Map. It would be possible to port this layer to another database; however the locking behavior may be slightly different depending on the underlying system.
    * The Freeze Evictor, which provides automatic persistence for Ice objects. Since it's quite high level, it would be the easiest to port to another database without affecting code using this service.

    Currently these 3 layers are very tightly coupled, so porting for example the Freeze Evictor to PostgresSQL would not be possible without significant API changes. I am working on improving this for the next Ice release.

    Cheers,
    Bernard
Sign In or Register to comment.