70 likes | 179 Views
XML-RPC: How Fast ?. Brent Callaghan Sun Microsystems, Inc. My Background. Experience with ONC RPC protocols Participant in ONCRPC WG @ IETF. NFS: high performance, kernel-based NFS version 4 uses ONC RPC over the Internet. XML for Data Marshalling.
E N D
XML-RPC: How Fast ? Brent Callaghan Sun Microsystems, Inc.
My Background • Experience with ONC RPC protocols • Participant in ONCRPC WG @ IETF. • NFS: high performance, kernel-based • NFS version 4 uses ONC RPC over the Internet.
XML for Data Marshalling • Everything is text:<Name>Jane</Name><Age>3</Age> • Convenient for text-oriented transports, e.g. SMTP, HTTP • Readable by humans (great when debugging) • Covenient if data already described by XML
XML for Data Marshalling • Tags and ASCII make it fat w.r.t binary protocols like XDR. • Needs approx twice as many bytes. • Binary args or results need Base64 encoding (as text) • Significant effect on modem or wireless links. • Text takes time to parse • More CPU instructions per transaction implies more CPUs for a given level of service.
HTTP as a Bottleneck • Verbose HTTP headers on every call:POST /StockQuote HTTP/1.1Host: www.stockquoteserver.comContent-type: text/xmlContent-Length: 1094
Direct Connect RPC Server Port 1234 HTTP as a Bottleneck • Calls funnel through web server on port 80. • RPC service needs to be in web server address space. HTTP Server RPC Server RPC Server Port 80 RPC Server Fork/exec
Conclusion • Don’t use XML-RPC for performance-critical apps..