Conspiracies: OODB, CORBA, etc...

It really bugs me when people say "technology-X was not adopted because 1) there is a conspiracy against it, or 2) corporations are too slow, stupid, conservative to try anything new, 3) MS tried to kill it, etc". Usually they say this about their pet technology, and they can't believe that there were fundamental problems with the idea, so they invent conspiracies or assume other people are too stupid to appreciate the beauty of the idea. I have more confidence in the intelligence of other people and companies -- so that I think ideas that have failed do so because there is something wrong with them. Usually the problem is that they solve a problem in theory, but they miss some practical details, or they are too complex. Example that come to mind are Object-Oriented Databases, CORBA. Sometimes there is just a terrible flaw in a system that is otherwise great; for example, I will never use Smalltalk again for anything other than prototyping because it is too hard to liberate a program from the clutches fo the development environment. I know that tight integeration is one of the benefits of the Smalltalk environment -- it's great for prototyping -- but I always want to ship my systems, not just debug them.

Rise and Fall of CORBA

I recently got into a little argument with Michi Henning about his article Rise and fall of CORBA. This is too bad, because we mostly agree with each other. I think CORBA is dead too. My only point is that I think it is dead for much more fundamental reasons than he does. That is, I am not sure that tranparent distributed objects are a good idea at all -- which is why I am interested in web services. My paper on this topic, Web Services versus Distributed Objects: A Case Study of Performance and Interface Design, is meant to explain some things to people who think CORBA is great and web servcies are just a bad implementation of distributed objects. The ideas presented shouldn't be surprising to experts, but I hope the presentation is a clear explanation of the issues. Also, the wrappers I develop are ceratinly better than the standard one's you get from Axis -- and they are perhaps a useful model when working in RMI as well.
I posted to a thread on Javalobby: Language Wars Redux - the imminent approach of LINQ (see page 4). Most people just don't seem to understand the issues involved in connecting databases and programming languages... most seem to think that things are fine the way they are, but if that were true why do we have a new OR mapper every year? Also, Java people seem to be very conservative, not even willing to consider that there might be any way to improve Java.

I am hosting a panel on Objects and Databases at OOPSLA in Portland this year, on Oct 24th. Here is the working abstract:

Java and C# have brought Object Oriented Programming to the masses, yet programmers continue to struggle with persistent storage of objects. Juggling object persistence with requirements for simplicity, flexibility, maintainability, transparency, scalability and five-nines uptime can rattle even the most hardened architect. Solutions are still evolving rapidly and increasing in complexity, with no end in sight. At the same time developers continue to experiment with alternatives, both old and new.

This panel will discuss the state of the union between objects and databases, as seen from the trenches, with focus on current trends in object-oriented databases and object-relational mapping.

Panelists include:

* Robert Greene, Versant
* Patrick Linskey, BEA
* Erik Meijer, Microsoft
* Ken Rugg, Progress Software
* Craig Russell, Sun Microsystems
* Bob Walker, GemStone Systems
* Christof Wittig, DB4objects

It should be a lively and interesting discussion. I hope some of you will consider attending. I may add a customer representative or two.

ECOOP program committee


I just got back from the ECOOP program committe meeting in Paris. The meeting went well, but the highlight of the trip was that I accidentally found a Poilane bakery and even asked if I could visit le fournil in the basement. They have a huge woodfired oven, but the room itself was tiny. My French is still good enough after 20 years to get around and have reasonable conversations. I went to dinner with David Bacon.

Dr. Dobb's Journal article on Native Queries

Dr. Dobb's February issue has the article on Native Queries, listed on the main page:

Native Queries for Persistent Objects
By William R. Cook and Carl Rosenberger

Visit to db4objects

I visited db4objects in December. We had a good discussion on object databases and native queries. Here are some photos.

Exclusive Degree

I am sad to say that my Alma Mater major department, Computer Science at Tulane, is being eliminated. I wonder how they can lay off tenured faculty and just shut it down. I have many fond memories of the department. It was a great place to learn and grow.

Review of Native Queries

A very nice review of db4objects and Native Queries by Jeff Brown. This was also picked up by TheServerSide... we'll see if there is any discussion.

Plain Old Java Queries on java.net

POJQ: Plain Old Java Queries project approved by java.net. This is an open source implementation of Safe/Native queries, launched by Wes Biggs.
Object Database Management Systems portal announced, which features Native Query paper.

Creating EPS on windows

I have had lots of problems clipping pictures. I am surprised that you have not been having problems with your pictures being inside a large white border (the size of the powerpoint slide).
I didn't know you could use EMF. How do you convert it to PS?
What I do is print the picture to a postscript printer but use the "save as file" option. This produces a PS file. THen run this through Ghostview and save as EPS (with automatic cropping). I get the best results when I have a PowerPoint slide embedded inside a Word document!

Native Queries for Persistent Objects, A Design White Paper

Released Native Queries for Persistent Objects, A Design White Paper with Carl Rosenberger

Rapid Technology Transfer

When I defined Safe Queries for Java I thought that it might be an idea that could be applied relatively soon to solving real needs of industry... but I didn't think it would be shipping so quickly. Then I found out about db4objects. They are implementing the idea as a key component of their next product release this fall. We have made some improvements to the idea, described in a new white paper, Native Queries for Persistent Objects written with Carl Rosenberger.

Let me know what you think.

ODBMS.ORG

ODBMS.ORG Launches Educational Portal on Object Databases High-Profile Experts Help Meet Growing Demand for Free Educational Resources on OO Database Technology
We have released a preliminary interpreter for Orc, an Orchestration Language.

A long search

In trying to solve the problem mentioned in the previous post, I did a lot of Google searching. Some things are hard to find, because they can be described a lot of ways but use words that also have many other uses. The ideas "currently running script" and "directory of something" are quite common and can be combined in lots of ways. But I wanted just one partcular meaning, and it took me a while. Eventually I found enough pieces of the answers to put together my solution. Here are the queries I ran:
Google QueryTime
shell-command csh directory-of-shell3:22:15 PM
shell-command csh directory3:22:21 PM
shell directory-of-command3:23:09 PM
shell directory-of-the-command3:23:41 PM
sh unix3:28:06 PM
sh script3:28:29 PM
csh "path to command"3:29:32 PM
csh "path to the command"3:29:57 PM
csh "path of the command"3:31:36 PM
csh "path of the current"3:32:04 PM
csh "path of the current command"3:32:18 PM
csh "path of the current shell"3:32:24 PM
csh "path of the current batch"3:32:32 PM
csh "path of current command"3:32:39 PM
sh path command that is running3:32:52 PM
unix path command "that is running"3:33:14 PM
unix path "file that is running"3:33:36 PM
csh "file that is running"3:34:39 PM
bash "file that is running"3:35:50 PM
shell directory-of-the-command3:36:12 PM
csh jar files3:36:48 PM
csh locate-jar files3:39:43 PM
csh locate-jar3:39:47 PM
csh find-jar3:39:51 PM
csh find-jar same-directory3:40:07 PM
csh jar same-directory3:40:10 PM
bin/sh same-directory3:41:20 PM
unix csh3:44:02 PM
unix csh reference3:44:14 PM
directory-where the command3:51:51 PM
directory-where the command csh3:52:02 PM
csh "path the current command"3:53:51 PM
csh "path to the current command"3:54:00 PM
unix "path to the current command"3:54:07 PM
unix "path to the executing command"3:54:11 PM
unix "path to the executing"3:54:15 PM
sh "path to the executing"3:56:22 PM
path to the executing3:57:06 PM
path to the executing unix3:58:08 PM
unix current process4:00:16 PM
shell current-process4:00:31 PM
shell "path to the executing"4:04:19 PM
shell "to the executing"4:06:06 PM
shell "of the executing"4:06:20 PM
shell "path of the executing"4:08:49 PM
shell "path of the running"4:10:51 PM
shell "path of the running" unix4:10:58 PM
shell "path of the running scriopt" unix4:12:24 PM
shell "path of the running script" unix4:12:26 PM
path "running shell"4:15:39 PM
path-of "running shell"4:15:53 PM
path-of running shell4:16:46 PM
path-to running shell4:16:50 PM
path to running shell4:16:52 PM
path of running shell4:16:55 PM
path of running4:16:59 PM
java relative-to-shell4:17:27 PM
java shell same-directory4:17:44 PM
bash "running shell"4:18:53 PM
bash "path of running"4:19:31 PM
bash "path to running"4:19:45 PM
bash path to shell4:20:06 PM
bash "path to script"4:21:40 PM
bash "path of script"4:22:00 PM
script to identify it's location4:25:29 PM
$0 alias lookup path4:30:54 PM
$0 alias path4:33:04 PM
csh scripting4:37:57 PM
csh scripting first word4:38:22 PM
dirname $04:41:14 PM
fletcher mattox4:43:47 PM
sh shell command files if4:50:20 PM
sh shell command files "if ("4:51:41 PM
sh shell command "if ("4:51:52 PM
introduction shell4:52:23 PM
introduction shell sh4:52:26 PM
introduction shell csh4:53:44 PM
tsh4:54:40 PM
tsh shell scripting4:54:59 PM
sh shell scripting4:55:02 PM
sh builtin variables5:00:50 PM
shell standard variables5:01:37 PM
determin unix os5:02:18 PM
determine unix os5:02:20 PM
command to find unix os5:02:42 PM
command to find unix os version5:02:46 PM
command unix os version5:02:51 PM
command unix os-version5:03:00 PM
sh substring5:04:09 PM
directory of a batch file5:09:48 PM
directory "running batch file"5:09:56 PM
directory "running batch file" -pid5:10:29 PM
directory of running batch file5:10:58 PM
cmd file directory5:11:07 PM
directory "running command" cmd5:11:24 PM
directory "running command"5:11:28 PM
directory "running command" windwos5:11:30 PM
directory "running command" windows5:11:32 PM
directory "of running" command windows5:11:53 PM
command arguments batch files5:12:20 PM
dspx5:15:51 PM
dspx batch5:15:55 PM
windows batch varialbes5:16:17 PM
windows batch variables5:16:19 PM
windows batch variables "~"5:16:32 PM
windows batch no echo off5:19:49 PM
bash variable substring replacement8:11:44 PM
windows shell command8:19:06 PM
location of batch file8:27:11 PM
location of current batch file8:27:25 PM
location of running batch file8:27:28 PM
directory "running batch file"8:27:35 PM
directory "running batch file" -pid8:27:42 PM
find directory "running batch file" -pid8:31:29 PM

How to find the directory of a running shell command

I want to distribute some Java software in a way that is easy to use. The software depends upon some libraries, so I need to set the class path before running Java. I created a simple command ile (for Unix and Windows) to launch the application. I assume the libraries are in the same irectory as the command file, but had a hard time finding out what directory the command file is in. I didn't want the user to have to set up a path or do anything to install: just expand a ZIP file and go.

Eventually I found an answer. Here are the two versions. I have tried it on debian, windows and cygwin. These commands run the class foo.Foo from the foo.Jar, which also uses lib/mail.jar.

-----------------foo.bat for Windows -------------

@ECHO OFF
set dir=%~dp0%
java -cp "%dir%/foo.jar;%dir%/lib/mail.jar" foo.Foo %1
---------------------------------------------------

I out to know what %~dp0% means, but I have to admit I don't. I'll look it up later.


------------------ foo.sh for Unix -------------------

#!/bin/bash
dir=`dirname $0`
os=`uname`
if test ${os:0:6} = "CYGWIN"
then
if test ${dir:1:8} = "cygdrive"
then
dir="${dir:10:1}:/${dir:12}"
fi
java -cp "$dir/foo.jar;$dir/lib/mail.jar" foo.Foo $*
else
java -cp "$dir/foo.jar:$dir/lib/mail.jar" foo.Foo $*
fi
---------------------------------------------------------

Make sure the line endings are correct, and the file has execute access.


Note that java has two kinds of separators for the class path depending on whether it is unix or windows. This by itself is pretty annoying, but it gets worse: when you run cygwin it is a unix OS but it uses the windows separator. Since dirname can return \cygdrive\c\... but this is not understood by Java, I have to change it to c:\... But Java seems to understand / or \ as the separator, which is good. Lots of fun!

I am not sure that these will work everywhere. But it is a start.
They work in these cases:

  • executing the command from an absolute path
  • executing the command via an alias
  • putting the directory on into your system PATH
Shouldn't this be easier?