[openamq-dev] help on sending vector via middleware

Malinga malingajava at yahoo.com
Fri Aug 17 12:21:04 CEST 2007


Thank you very very much for the quick reply here are the answers for the question. Hope you will help me on this.

Ok, first you have to decide how you wire-level binary format would look 
like. There are several decisions to be made:

1. Would the strings be zero-terminated or length-prefixed? If binary 
zero may occur in the middle of the string, legth-prefixing is the only 
option.

  It binary 

2. 'int' can have different number of bits depending on the system you 
are using. How many bits you want it to have on the wire?

4 bits


3. Do you want integers in big- or little- endian representation on the 
wire?

im working on the Intel platform so it will be little endian

4. How are negative integers going to be encoded on the wire?

fortunately we dont have negative numbers :) 

5. What binary encoding of floating point numbers would you choose? 
(There is a RFC for that, you may want to check it out, however, I've 
forgot the number...)

and no floats also

Martin

Malinga wrote:
> HI Martin Sustrik i just check your program it works but im really sorry,
> 
> My data structure is
> struct MontageDataStructure{
>     int     SIDE;
>     std::string     EXCHANGE;
>     std::string     SYMBOLE;
>     int     SHARES;
>     double     STRIKE_PRICE;           
> };
> 
> Pls can you tell me how to encode this thing in the wire. Im so sorry i 
> know this is not relating to middleware. Pls help me on this.
> 
> Thanks in adavance.
> -Malinga






       
____________________________________________________________________________________
Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase.
http://farechase.yahoo.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.openamq.org/pipermail/openamq-dev/attachments/20070817/273528ac/attachment.htm 


More information about the openamq-dev mailing list