I am not familiar with the libraries you referring to nor I have messed with XML (thank god).�

I dont care which is faster I only care which is fast enough.�

I have never benchmarked my sockets but they always have been fast enough for my needs.�

I have found a benchmark here http://www.opendmx.net/index.php/Pipe_vs_Unix_Socket_Performance�.�

10 seconds for 512 MB does not sound bad to me at all. But then if you want much higher speeds for even bigger data, then sockets are not for you. The data I have played with is in the range of kbs.�

Though I fear that smalltalk will be the bottleneck way before sockets will be. Unless you using a C library via nativeboost or another FFI. �


On Mon, Nov 25, 2013 at 11:47 PM, Jan Vrany <jan.vrany@fit.cvut.cz> wrote:
On 25/11/13 20:12, kilon alios wrote:
I don't see a problem. Sockets provide a way to communicate, sockets
nowadays are used almost everywhere. They have their limitations but its
a viable , very fast and simple solution.

OK, let's make an experiment and we'll see :-)

Here's the code that parses XML using Xerces on VM that
runs both Smalltalk and Java:

=======================
factory := JAVA javax xml parsers SAXParserFactory newInstance.
parser := factory newSAXParser getXMLReader.
parser setContentHandler: JavaExamples::CDDatabaseHandler2 new.
[
� � parser parse: build_xml.
] on: JAVA java io IOException do:[:ioe|
� � Transcript showCR: 'I/O error: ', ioe getMessage.
� � ioe printStackTrace
] on: UserNotification do:[:un|
� � Transcript showCR: un messageText.
� � un proceed.
]
=======================

The handler:

https://bitbucket.org/janvrany/stx-libjava/src/e5fc3aaad7a2a9f06ba1f28e2144eb0acfb1ec13/examples/CDDatabaseHandler2.st?at=development


Now, you implement solution using sockets or any other kind
of RPC.

Then lets write a benchmark and check what's simpler and what's
faster. I would be very interested in results.

Anyway, we're getting bit offtopic I guess. If you want to do proposed
experiment, drop me a private message (unless the list shows
interest :-)

Best, Jan

P.S.: If you like the challenge, then consider small modification
of the code above **without** `un proceed` at the end of handler
of UserNotification.