FirstStepWithMySQL

Building on the recent InfoGrid FirstStep example, here is another: FirstStepWithMySQL.

Using the same bookmarking/tagging application as FirstStep, it shows how to persist the same MeshObjectGraph using MySQL as a key-value store. It consists of two apps:

  • the first app initializes the store, and creates a graph of objects
  • the second app retrieves the graph from the store, and traverses the graph to retrieve information.

It’s of course a trivial example, but it illustrates:

  • how easy it is in InfoGrid to keep the same application running against different storage backends with minimal code changes (in the initialization only)
  • some of the advantages of graph databases compared to other types of storage technologies: note how simple it is to traverse the graph in all directions.

Annotated source code is here.

InfoGrid 2.9.3 Released

Available for download here. This is mainly an incremental improvement/bug fix release, except:

  1. new capabilities in the ig-lid project related to what Randy Farmer called the tripartite identity pattern.
  2. new example application: FirstStepWithMySQL (see separate post).

Summary of changes:

  • fixed endless loop when Transaction open at MeshBase die time
  • Moved (Net)MeshObjectIdentifierFactory to .mesh.net packages. That allows is to tighten permissions a bit.
  • Check that localIds are at least 4 chars long. Not having this check created confusing results for users of MeshWorld where the GUI assumes this, but not the graph db.
  • Replaced StringRepresentationParseException with java.text.ParseException in most places.
  • More specific subclasses of LidInvalidCredentialException for better error reporting
  • More resilient when Gpg home dir cannot be created
  • Better TimeStampValue.toString()
  • Make it easier to create “su” Transactions with elevated privileges
  • collect all outgoing data into the same XprisoMessage; this prevents sending more than one message in response to a single incoming message
  • improved abilities to freshen Replicas
  • added ForwardReferenceTest9
  • added DelegatingNetMeshObjectIdentifierFactory as a convenience class
  • Major refactoring in module ig-lid to implement what Randy Farmer called the tripartite identity pattern. Nickname is what he calls Public ID. HasIdentifier is used to represent Login ID. LidPersona represents what he calls Account and also manages the relationships to the other items. There is a corresponding Model.
  • Added identifier-as-entered to LidAuthenticationStatus for better error reporting
  • Re-introduced LidPersona as a major concept
  • TransactionAction now carries a few member variables (MeshBase, MeshBaseLifecycleManager, MeshObjectIdentifierFactory) in order to make the writing of transactional code more concise
  • Split org.infogrid.probe.test into several test modules; makes it better manageable
  • removed a bunch of unnecessary files from ig-vendors; they only take up space and bandwidth
  • fixed multiple ModelBase bug
  • failed to load model under some circumstances when not running under the Module framework
  • added isIdentifiedBy method to org.infogrid.util.HasIdentifier
  • changed MeshObjectSet.contains( MeshObjectIdentifier ) to MeshObjectSet.contains( Identifier )
  • added FirstStepWithMySQL
  • localization for LidAbortProcessingPipelineException