Archived

This forum has been archived. Please start a new discussion on GitHub.

redis

Hi, all! I want to implement a key/value system. Since redis doesn't support object, so i want to get the serialized data from ice , which then be saved in redis. the question is, how can i get the serialized binary data and how to deserialize it to object after retrieving from redis? thanks!

Comments

  • buptstehc wrote: »
    Hi, all! I want to implement a key/value system. Since redis doesn't support object, so i want to get the serialized data from ice , which then be saved in redis. the question is, how can i get the serialized binary data and how to deserialize it to object after retrieving from redis? thanks!

    in the Overview of the Ice Protocol - Ice 3.4 - ZeroC, saying that "The Ice protocol is suitable for building highly-efficient event forwarding mechanisms because it permits forwarding of a message without knowledge of the details of the information inside a message. This means that messaging switches need not do any unmarshaling and remarshaling of messages — they can forward a message by simply treating it as an opaque buffer of bytes".

    is there any api or service to work with this?
  • Check out Chapter 35, "Dynamic Ice"
  • mwilson wrote: »
    Check out Chapter 35, "Dynamic Ice"

    thanks! I have another question . there is a client and server both written by ice. the client sends a object to server, then server deserialize the received object and save the binary buffer. the stream interface in "Dynamic Ice" seems to require extract or insert object's property one by one. so i want to know is there any api can get the binary buffer before ice deserialize the object?
  • The --stream option to slice2cpp (or whatever) will generate Ice code for you to create and extract from binary buffers.
  • mwilson wrote: »
    The --stream option to slice2cpp (or whatever) will generate Ice code for you to create and extract from binary buffers.

    thanks! that is exactly what i want.