Alex, the whole point of using XML is to avoid using binary data in an 
RPC situation and to tag the data and thus make extensions less 
traumatic.  The radix change overhead is insignificant compared to the 
network cost and the bonus is complete freedom from endian dilemmas.

The biggest performance improvement we get is by careful use of sockets 
and avoiding process and thread creation and deletion.  For example 
using sendfile or TransmitFile avoids multiple levels of buffer shadowing.

Our RPC implementation is fast and robust and not bloated like XML/RPC.

Alex Katebi wrote:
> Yes I need to do it as 8 byte buffer. Convert the endianess to the network
> then back to host for 8 byte integer.
> I think XML is great for command validation and CLI auto typing, help etc.
> Besides parsing issue, XML can not handle binary data directly.
> 
> 
> On Tue, Jun 10, 2008 at 12:31 PM, John Stanton <[EMAIL PROTECTED]> wrote:
> 
>> Can you explain how you are trying to write to the socket and how you
>> are receiving?
>>
>> If you use write or send you just supply a pointer to the value and a
>> length to write, viz - written = write(sokfd, (char *)fptr, 8); where
>> fptr is a pointer to your floating point number.
>>
>> We use Sqlite embedded as RPCs but actually encapsulate the data as XML
>> and send floating point or other numbers in text form so that there can
>> never be byte ordering or format issues.  SQL also maps quite nicely to
>> XML.  The downside is the complexity of the XML parser at the receive end.
>>
>> Alex Katebi wrote:
>>> I am trying to implement remote procedure calls (RPC) for SQLite API to
>> be
>>> used in my application.
>>> In particular sqlite3_column_double( ) returns a floating point double.
>>> How can I write this double value into a TCP socket?
>>> I have tried writing 8 bytes as integer values but the received valued at
>>> the other end of the socket is incorrect.
>>> I don't have a lot of experience with real numbers. Can someone help?
>>>
>>> Thanks,
>>> -Alex
>>  > _______________________________________________
>>> sqlite-users mailing list
>>> sqlite-users@sqlite.org
>>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>> _______________________________________________
>> sqlite-users mailing list
>> sqlite-users@sqlite.org
>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to