in reply to Re: Sending Storable strings over http
in thread Sending Storable strings over http

I have indeed developed byte order problems, but am not sure how to fix. The windoze client gets the blob, which was generated with freeze rather than store, and sends it using SOAP. The SOAP server gets this and stores it OK, but when I try to retrieve and thaw the blob, I get error "Byte order is not compatible at blib/lib/Storable.pm"

Is this fixable by transforming the frozen blob before sending?

  • Comment on Re^2: Sending Storable strings over http

Replies are listed 'Best First'.
Re^3: Sending Storable strings over http
by GrandFather (Saint) on Dec 05, 2005 at 00:43 UTC

    Can you nstore/retreive rather than freeze/thaw? Seems likely a protocol designed for memory use won't tansport well (freeze/thaw).


    DWIM is Perl's answer to Gödel
      Well existing stuff in the database is frozen. I guess I could thaw, then nstore, then send. But if I were going to thaw the blob, I guess I would just send the thawed structure via SOAP, re-freeze it on the remote system, and store it. I'm hoping there is some way to transfer it directly without all that transformation.
        Sounds like you have, er, "legacy data" in your database. Happens all the time, e.g. when applications that assumed an 8-bit encoding for text suddenly need to become Unicode aware. Typically you need to migrate that data, and often but not always that means some downtime.

        The most important thing in these cases is to know which records are in which state: ideally they should all be in the same state, then you update it in an atomic process. Usually this is a pain , but if you can't easily tell which data is in what state, it's a much greater pain :/