3 ms·
I'm so happy Java can't load libpq you won't believe. Because it means that Postgresql API gets reimplemented as a crispy JVM code that never crashes my JVM. If
by guard-of-terra 14y ago
I'm so happy Java can't load libpq you won't believe.
Because it means that Postgresql API gets reimplemented as a crispy JVM code that never crashes my JVM.
If we would live in the world where a Java program would use libpq and libxml and libldap and whatever, it would be so much less stable, introspective and consistent that it won't be Java anymore. It would be a particularly ugly kind of Python.
And yes, it would crash when you use threads. Since all those C libraries pretend that threads don't matter. Guess what, our Java program has 500 threads and feels fine.
- dschiptsov 14y agoTechnically, an instance of JVM is mere a user process, which, by definition, must obey "laws" for user processes. This could be end of story - the idea that something "reliable" could be implemented as a single user level process is, well, naive. btw, you still must call libc.so and libpthread.so As for pthreads, guess what, they are also bad decision, as long as they are not isolated as processes supposed to be, and crash of one thread messes up rest 499. People who did some research, like developers of Erlang, found that neither one-process model or threaded-threaded process model is even applicable when you need a reliable system. So, again, jvm.exe is mere yet another .exe.)