-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Peter Schäfer wrote:
>
>>-----Ursprüngliche Nachricht-----
>>Von: Mark Matthews [mailto:mmatthew@stripped]
>>Gesendet: Montag, 20. Januar 2003 19:03
>>An: Tim Endres
>>Cc: java@stripped
>>Betreff: Re: JDBC Interface for Embedded Server ?
>>
>>
>>-----BEGIN PGP SIGNED MESSAGE-----
>>Hash: SHA1
>>
>>Tim Endres wrote:
>>
>>>>1. It will probably be slower than just embedding a 'normal' MySQL
>>>>server with your application, because of JNI call overhead.
>>>
>>>When you say this, do you mean to embed a MySQL server and connect
>>>to it using JDBC? Do you know anyone who has done this?
>>
>>Yes. I've heard of people doing it, but I don't have a list of names or
>>anything :)
>
>
> OK, here I am ;-)
>
>
>>You can manage server startup/shutdown via Runtime.exec(), and you can
>
>
> This is exactly what I do right now.
> It works pretty well, and is also quite fast.
>
> (have a look here:
> http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/jose-chess/src/de/jose/db/MyS
> QLAdapter.java?rev=1.1.1.2&content-type=text/vnd.viewcvs-markup)
>
> However, I thought that it could be even faster if one could eliminate
> the "network" connection.
>
> JNI requires some overhead, too, but do you really think it would be
> slower than a socket connection ?!?
You would have to do an awful lot of string conversion to work with the
embedded library. Also, you would have to do some pretty heavy-duty
wrapping to reduce the number of JNI calls to get it to be efficient as
possible.
I've used a JNI wrapper to unix domain sockets to test with the driver,
and it was quite a bit slower than TCP/IP sockets, which isn't true for
native code.
-Mark
- --
MySQL 2003 Users Conference -> http://www.mysql.com/events/uc2003/
For technical support contracts, visit https://order.mysql.com/?ref=mmma
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mark Matthews <mark@stripped>
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer - JDBC/Java
/_/ /_/\_, /___/\___\_\___/ Flossmoor (Chicago), IL USA
<___/ www.mysql.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.1.90 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQE+LGO5tvXNTca6JD8RAgjeAKC1wyD04KCyIphuCs3Knw+BD/vOTwCgjXrY
u+W/L2AJWHznpGHgUqiQQC4=
=2Wn1
-----END PGP SIGNATURE-----