Write/Read sequence of Ice structss to/from file

rbockrbock Roland BockOrganization: MetafeedProject: Session CacheMember
Hi,

I have a sequence of ice objects in python and want to dump them to a file. Later I want to read in the sequence again.

What is the best way to do that? cPickle is terribly slow.

Since Ice has to perform similar operations when sending sequences over sockets, I assume that there have to be appropriate methods?

Thanks and regards,

Roland

Comments

  • mwilsonmwilson Mark WilsonOrganization: Integrated Computer Solutions, Inc.Project: TBDMember ✭✭✭
    Look at Dynamic Ice.
  • mesmes CaliforniaMark SpruiellOrganization: ZeroC, Inc.Project: Ice DeveloperAdministrators, ZeroC Staff ZeroC Staff
    Look at Dynamic Ice.
    Dynamic Ice would be a solution in some language mappings, but unfortunately not yet in Python. I'm afraid I can't offer a better alternative to cPickle at the moment.

    Regards,
    Mark
  • rbockrbock Roland BockOrganization: MetafeedProject: Session CacheMember
    mes wrote: »
    Dynamic Ice would be a solution in some language mappings, but unfortunately not yet in Python. I'm afraid I can't offer a better alternative to cPickle at the moment.

    Regards,
    Mark

    Thanks for looking into it. After experimenting a bit with dumping the Ice structs as python code, I think I am going to use C++ and the streaming interface for this.

    BTW: It might be useful for Ice Objects to inherit from a common abstract base class (similar to PEP 3141 -- A Type Hierarchy for Numbers).

    Cheers,

    Roland
Sign In or Register to comment.