Query with several indexes

Chris Muller chris at funkyobjects.org
Wed Feb 21 04:34:56 UTC 2007


Hi Hilaire, thanks for the detailed information, I now have a much
clearer picture of the situation.

You may be aware that Magma uses an "object protocol," (serialized
objects).  The protocol is defined by:

  MagmaRepositoryController>>#protocol

This method answers an Array of all the types of objects which may be
communicated back and forth between clients and server.  The protocol
is dictated by the server, and clients download it when they initially
connect.

As you can see in the method above, part of the protocol is calculated:

  MagmaCollectionIndex allSubclasses asArray

The MagmaCollectionIndex hierarchy is needed on the server for query
processing; i.e., to calculate hash keys, etc.  It is needed in the
protocol for whenever a new index is added to an existing
MagmaCollection.  You have created a custom index, bravo.  But I now
see this critical piece of information missing in the documentation
page about creating your own index type.  All index types are part of
the Magma server protocol, *and* also are required on the server for
proper query processing on the server.

So when your client sent a new type of object in a request that is not
part of the protocol, it is a MalformedRequest and the server rejects
it.  This message associated with this is, "class id not found" and can
actually be found by finding the id it is looking for on the client
serializer.

Now, the error-handling associated with rejection of a malformed
request has a problem in that it did not send the error back to the
client, it instead halted in the server.  I have been aware of this
issue and fixed it in the new version of Magma with the security (which
is not yet released).

When you clicked Abandon in the server, it was the process which pops
requests off the queue so it is no longer running, so thats why no more
requests could be submitted.

You absolutely can add indexes to "old" MagmaCollections, well after
they have many thousands of elements.  That is not a problem.  However,
the code for the index type (MaCompetencyIndex) must be present on the
server before you start the server.

You said you tried that, but then got an error, 'attempt to index
non-existent element in an ordered collection'.  Are you sure, after
loading MaCompetencyIndex into the server, you restarted the server and
reconnected the client?  If so, send me the stack trace for this error
and maybe it will reveal..

As I said, this is not mentioned in the documentation so you could not
possibly have known this.  I will be sure to fix the documentation.

> Using OBDB turns to be quite complex.

Well, I don't find it very ironic that the "RDBMS" part of Magma
(MagmaCollections and indexes) where all this confusion originated, not
the strict ODBMS part..  :)

I'll look at your other posts too..

Regards,
  Chris


More information about the Magma mailing list