ModeShape

An open-source, federated content repository

NoSQL Matters 2013

Last week I traveled to Cologne, Germany, to attend the NoSQL Matters 2013 conference. There were lots of great talks, including both beginner and intermediate talks about all things NoSQL. It’s also really good to see the audiences have more familiarity with a variety of database technologies, and are more keenly aware that they have to choose wisely from the many different kinds of NoSQL databases out there.

That’s a point we try to make here, too. Sure, there are lots of scenarios where eventually consistent key-value and document databases are a great solution, just like there are still lots of scenarios where relational database technology is still appropriate. But eventually consistent databases can require your application to manage conflicts, and this may or may not be easy. Sometimes, it’s just easier and more natural to write code that relies upon ACID transactions to guarantee strong consistency.

I gave a talk about using ModeShape as a consistent, in-memory, hierarchical database. Again, it was primarily an introductory talk that covered most of the features that distinguishes it from other database technologies, including relational, key-value, document, and even graph databases.

I also attended several really interesting talks. One of them was “Processing a trillion cells per mouse click” by Alex Hall. Alex talked about how Google needs to very quickly process vast amounts of data so that internal tools can enable Google’s employees to interactively drill down into ad click data to look for various usage patterns. The resulting solution uses a variety of interesting techniques to optimize the indexes to support these drill-down queries. You can read more about it in this paper.

Another great talk was given by Simon Willnauer, who showed how easy it is to use ElasticSearch to query and search your data, even when that data might be stored in another system. (We’re considering having ModeShape use ElasticSearch for our indexing and search uses, so this was quite timely.)

Tug Grall gave one of my other favorite talks. He’s from Cloudbase, and this talk focused on how you use Map-Reduce style JavaScript functions to build indexes from your documents. I’ve talked with Tug before, and it was great to see him again.

Kudos to the NoSQL Matters 2013 organizers for doing such a great job organizing and running the conference . The talks were quite good, it was well attended, and the meals and snacks were above par. I also have to say that Cologne is a fantastic city with incredible charm and history. What a great place for a conference!

Filed under: appearances, features, jcr, presentation

JUDCon Brazil 2013

A few weeks ago I was lucky enough to attend the first JBoss Users Conference held in Latin America. I’m not sure there’s a better place than a JUDCon where JBoss users, community members and core developers can get together and talk, work, and socialize.

JUDCon Brazil 2013 was very successful and really well attended — much like the other seven previous JUDCons. I met in person a lot of people that before this I had only known online as part of the JBoss communities or even by reputation. Plus, I was able to meet quite a few of the folks that work at Red Hat in Brazil.

I gave two talks at the conference. The first was about ModeShape 3 and was an introduction to using ModeShape as a consistent, in-memory, hierarchical database. I covered how you can make your content adhere to a schema, be completely schema-less, or something in between. I also talked about sequencing and federation, two features that are unique to ModeShape.

My second talk was an overview of the JBoss Enterprise Data Services (EDS) platform, which one of Red Hat’s supported middleware platforms that allows you to virtualize your existing databases and data services into unified virtual databases. In effect, you can turn the data you have into the information you need, in real-time. Applications see these virtual databases just as regular database, and they use JPA, JDBC, ODBC, or web services (RESTful and SOAP) to query and update the data. But as the applications interact with the virtual database, EDS transparently operates against the actual underlying (and heterogeneous) data stores and services. It really is a very cool piece of technology.

The slides for these talks are not yet online, but hopefully they’ll be available in the next few weeks. When they are, I’ll let you know.

And finally, the big news of the conference was that JBoss announced the new name for JBoss Application Servers: WildFly.

 

Filed under: appearances, features, jcr, presentation

ModeShape 3.2.0.Final is available

I’m happy to announce that ModeShape 3.2.0.Final is now available. This release took us a longer than we’d hoped, but we’ve fixed an incredible 120 issues, including using JBoss EAP 6.1 (instead of JBoss AS 7.1.1) and upgrading the Infinispan, JGroups, Hibernate Search, Lucene, Tika, and other third party libraries. See our  release notes for more specifics. We recommend everyone using 3.1.3 or earlier upgrade as soon as feasible.

Just to reiterate: this version of ModeShape can be installed on top of JBoss EAP 6.1. See this discussion post for background on what this means for community users.

As usual, the artifacts are in the JBoss Maven repository and on our downloads page. Our getting started guide has instructions, ModeShape 3 documentation and JavaDoc are available, and our code is on GitHub. Join us on our forums or IRC channel to ask questions, and please log any issues in our JIRA.

We had a lot more help this release from our community members that reported and fixed issues. Thanks to the whole community for a job well-done!

Filed under: features, jcr, releases, rest

ModeShape 3.1.3.Final is available

I’m happy to announce that ModeShape 3.1.3.Final is available immediately. It contains almost dozen bug fixes, including several clustering-related fixes; see our  release notes for specifics. We recommend everyone using 3.1.2 or earlier upgrade as soon as feasible.

As usual, the artifacts are in the JBoss Maven repository and on our downloads page. Our getting started guide has instructions, ModeShape 3 documentation and JavaDoc are available, and our code is on GitHub. Join us on our forums or IRC channel to ask questions, and please log any issues in our JIRA.

Thanks to the whole community for a job well-done!

Filed under: features, jcr, releases, rest

ModeShape 3.1.2.Final is available

I’m happy to announce that ModeShape 3.1.2.Final is available immediately. It contains two dozen bug fixes; see our  release notes for specifics. We recommend everyone using 3.1.1 or earlier upgrade as soon as feasible.

As usual, the artifacts are in the JBoss Maven repository and on our downloads page. Our getting started guide has instructions, ModeShape 3 documentation and JavaDoc are available, and our code is on GitHub. Join us on our forums or IRC channel to ask questions, and please log any issues in our JIRA.

Thanks to the whole community for a job well-done!

Filed under: features, jcr, releases, rest

ModeShape Tools for Eclipse

ModeShape Tools is a set of Eclipse plugins for working with ModeShape and JCR repositories. The plugins have been available for a little while, but we wanted to make sure you knew about them.

Editor for CND files

The first plugin we’ll talk about is an Eclipse editor for the Compact Node Definition (CND) format defined in the JCR 2.0 (JSR-283) specification. Although a client application can connect to a JCR repository and programmatically register node types, it is usually easier to place the node type definitions inside a CND file and to use that file to register all the node types contained within it. ModeShape Tool’s CND editor makes it easy to edit such files.

(The JCR 2.0 API does not define how an implementation should support registering node types via CND files, but many of the implementations have a proprietary way to do it. ModeShape extends the javax.jcr.nodetype.NodeTypeManager interface with several “registerNodeTypes” methods that each take a java.io.File, a java.net.URL, or an java.io.InputStream containing CND content. We’re hoping the JSR-333 effort for JCR 2.1 adopts our approach.)

The CND editor is a 2-page Eclipse editor used for editing *.cnd files. The first page is form-based and consists of sections for managing namespace mappings, node type definitions, property definitions, and child node definitions. The second page is a readonly view of the file content.

Take a look at the CND editor with the properties and child node sections collapsed:

CndFormPage

When you select a node type, the editor shows the information about that node type on the right side. This includes the node type’s name, attributes, supertypes, and property and child node definitions. Add, change, or remove a property definition or child node definition by double-clicking the particular row in the section’s table or by using the section’s toolbar. Here’s a view of the editor with the properties and child node sections expanded:

CndFormPage2

The CND editor’s second page is a readonly source view of the *.cnd file. You can control the verbosity of the CND notation by a preference. The source page looks like this:

CndTextPage

Here’s a few other features of the CND editor:

  • automatic validation of the CND file, with errors displayed in the header section
  • copy and paste CND elements within the same editor or between CND editors
  • automatic URI completion when adding standard (built-in) namespaces
  • the node type section has a search filter to quickly find and select a node type, even when there are hundreds of node types in the file
  • the ability to show/hide property definitions and child node definitions inherited from supertypes
  • attach comments to any CND element
  • Ctrl-space completion and “look ahead” typing for available supertypes and required types.
  • built-in help

You can read more detail about the CND Editor in our online documentation.

The CND Editor can edit any CND files for ModeShape or any other JCR 2.0 repository implementation. It is also possible to just install just this plugin. So even if you’re not using ModeShape, we think you’ll still find the CND Editor very useful.

Publishing files to ModeShape

The second ModeShape Tools plugin provides a way to upload files from your Eclipse workspace to a ModeShape repository. It can publish entire projects, folders, or just selected files. You select the ModeShape server, repository, workspace, and area within the workspace where the file(s) are to be placed.

To use, simply select the files and/or directories you want to publish, and then choose “ModeShape->Publish” from the context menu. You’ll then see a dialog that confirms the details of the publishing request:

PublishWizard

Simply select “Finish” to publish the files to ModeShape.

The publishing tool can also:

  • un-publish (or delete) resources from a publish area of a ModeShape server
  • indicate which files should also be versioned (with “mix:versionable”) when they are published
  • show the output of the publishing operations in the message console view
  • show in a Servers view the repositories, workspaces, and publish areas for multiple ModeShape servers
  • always ignore certain file types from being included in the publishing operations, configured via preferences
  • built-in help

Installation

Each of these features can be installed separately or together by following these steps:

  1. Start up Eclipse 3.7 (Juno), then choose “Help > Install New Software…”
  2. Enter http://download.jboss.org/jbosstools/updates/stable/juno/soa-tooling/modeshape/ and hit “Enter”.
  3. When the site loads, select which feature(s) you want to install, or click the “Select All” button.
  4. Click “Next”, agree to the license terms, and install.

You can read more about ModeShape Tools in our documentation

Want to contribute?

These plugins are open source and are on GitHub, licensed under EPL and LGPL. We’re always looking for contributors to help out. If you would like to contribute, find a bug, want to suggest a new feature, or have any questions, please let us know in our discussion forum and we’ll get you started. The JIRA for these plugins is here.

Filed under: features, news, open source, releases, tools, uncategorized

Structured, unstructured, and everything between

Shane gives a good breakdown of the various ways to classify data as structured or unstructured. He points out that very often data is a mixture of both structured and unstructured data, and he gives several examples.

What I find so interesting about this, however, is how well ModeShape can handle these varieties of data.

ModeShape handles structured data really well. Most data structures are very easily mapped to the nodes and properties that ModeShape uses. And when those nodes also say which node types apply to them, ModeShape can enforce the node structure by validating it against those built-in and/or custom node types and prevent invalid data from being stored.

The other end of the spectrum is unstructured data, and ModeShape handles that beautifully, too. You can store unstructured data in a property using a string value or a binary value. Typically you would use a string value when the data is some form of text, and a binary value in any other cases (or when you don’t want to treat it as text).

But the best part is that ModeShape naturally handles combinations of structured and unstructured data. Recall that ModeShape is a hierarchical database, which means that each database consists of a single tree of nodes, and each node has one or more properties. That hierarchy is by definition structured, though it’s up to you whether ModeShape validates and enforces that structure using node types. But the leaves of that tree — that is the properties and their values — typically unstructured (though property value like dates and even some string values could be considered structured).

ModeShape’s query languages can also deal with both structured and unstructured data. Relationships between nodes, specific properties defined by node types, and the definitions of those properties all are addressable within the query language. But ModeShape queries can include full-text search constraints on both string and binary property values!

ModeShape can search those binary values when it can extract text using the Tika library, which supports many formats, including PDF, Microsoft Office™, RTF, HTML, and many others.

There’s one more way that ModeShape can deal with unstructured data: it can sequence unstructured data (string and binary property values) using built-in or custom sequencers to extract structure and save it as more nodes and properties in the repository. This is ideal for getting at that unstructured data that has the implicit structure defined by the format. For example, if an image is loaded into the repository, ModeShape’s image sequencer can extract the EXIF data in the image (e.g., ISO setting, focal length, aperture, shutter, geo-location, etc.) and save it as properties in the repository. ModeShape has a number of built-in sequencers that can extract this implicit structure from a variety of file formats:

  • DDL files
  • images (JPEG, GIF, BMP, PCX, PNG, IFF, RAS, PBM, PGM, PPM and PSD)
  • audio (MP3)
  • comma-separated and delimited text files
  • Java source and class files
  • Microsoft Office™
  • ZIP archives
  • XML
  • XML Schema
  • WSDL

In summary, ModeShape deals very naturally and easily with data that is part unstructured and part structured. What else could you want?

Filed under: features, repository, techniques

ModeShape 3.1.1.Final is available

It’s been just two weeks since our release of 3.1, and several important issues were identified that we wanted to get fixed as soon as possible. As of tonight, ModeShape 3.1.1.Final is available and contains only bug fixes and some minor build corrections. See our  release notes for specifics.

We recommend everyone using 3.1 upgrade as soon as feasible. If you’re using earlier versions, please consider upgrading.

As usual, the artifacts are in the JBoss Maven repository and on our downloads page. See our getting started guide for instructions, our documentationJavaDoc, and our code on GitHub; use our forums or IRC channel to ask questions, and log any issues in our JIRA. Please consider upgrading to 3.1 if you’re still using ModeShape 2.x or 3.0.

Thanks to the whole community for a job well-done!

Filed under: features, jcr, releases, rest

ModeShape 3.1.0.Final is available

I’m very happy to announce that ModeShape 3.1.0.Final is available immediately in the JBoss Maven repository and on our downloads page. See our getting started guide for instructions. As always, check out our documentationrelease notesJavaDoc, and our code on GitHub; use our forums or IRC channel to ask questions, and log any issues in our JIRA. Please consider upgrading to 3.1 if you’re still using ModeShape 2.x or 3.0.

So what does this release include? Lots of goodness:

  • Federation is back! I as mentioned in my last post, ModeShape can now federate content that exists in external systems and project it into the repository as regular content. Several connectors are provided out of the box: a file system connector (very similar to what was in 2.x) that accesses files and folders on the file system and projects them as ‘nt:file’ and ‘nt:folder’ nodes; and a Git connector that accesses a local Git repository (can be a clone of one or more remotes) and projects the branches, tags, commits and trees within the Git repository as a node structure in the repository. You can even write your own connector, too.
  • Access content through CMIS. This is still a ‘technology preview’, and we’re seeking users that can try it out and give us feedback.
  • Installing ModeShape into an existing JBoss AS7.1.1 installation now also installs CMIS API for all repositories. Federation connectors are configured just like all the other repository components.
  • Deploy ModeShape into application servers and containers other than JBoss AS and EAP with our new JCA adapter.
  • Configuration improvements for large strings, JGroups, and variables.
  • Clustering bug fixes and improvements.
  • We’ve tested ModeShape 3.1 with Infinispan 5.1.2.FINAL and 5.1.8.Final. We’ve also tested with 5.2.0.CR1, but we think ModeShape 3.1 will work with Infinispan 5.2.0.Final when it is available.
  • Improved support for very large numbers of child nodes under a single parent, including with federated nodes.
  • Over 50 issues (bugs, tasks, features, etc.) resolved in this release.

Lots of people contributed to this release. Thank you all very much! Keep up the excellent work.

We’re going to focus our next release on improving performance even more and upgrading the libraries we depend on. We’re also hoping that EAP 6.1 becomes available so that we can support installing ModeShape into it.

Now, drop what you’re doing and start using ModeShape 3.1!

Filed under: features, jcr, releases, rest

Federate external data into ModeShape

I’m really excited to announce that ModeShape 3.1 (due out in a few days) will re-introduce the ability to federate data from external systems into ModeShape repositories. That might sound kind of esoteric, but let’s look at some simple scenarios that show how powerful this is.

federation

(Long-time readers might recall that ModeShape 2.x had federation, but due to time constraints we didn’t bring the feature along when we moved to the new architecture in 3.0. We’re now fixing that, except that federation in ModeShape 3 is massively improved compared to what it was in 2.x! In fact, federation in 3.0 is so different, you should probably forget everything you know about federation in ModeShape 2.x.)

Scenario 1: Federating files

Imagine that you have a ModeShape repository (aka database), and it contains all of the data that your application needs. Your application can upload files, but they get stored in ModeShape along with the rest of your content. But you also have a separate file system that is directly accessed and exposed by your web servers. You now want your application to allow users to browse those files and, perhaps, simply pick one so that your application can automatically create a link. Your application already can work with “nt:file” and “nt:folder” nodes, but since that other file system isn’t managed by ModeShape, you have to write new logic to access regular files and folders.

Federation changes this dramatically. You can have ModeShape connect to that separate file system and project the files and folders as “nt:file” and “nt:folder” nodes inside the existing ModeShape repository. In other words, ModeShape will act as though there is an “nt:folder” node inside the repository, but it actually is dynamically created because there is a folder on the separate file system. As your application accesses the name and children of that “nt:folder” node, ModeShape transparently and dynamically maps those requests onto the corresponding file system operations. So your application can continue to work with “nt:file” and “nt:folder” nodes, but ModeShape does all the work of really accessing the files and folders on the separate file system.

Scenario 2: Federating Git repositories

Consider another similar scenario in which the external file system is actually a Git repository, and you want to be able to navigate and access the files and folders in any commit, branch or tag. Again, you could change your application to directly access Git, but that’s quite a bit of work. After all, your application is already accessing most of its content directly from ModeShape.

With federation, ModeShape could access the Git repository and expose not only the files and folders as “nt:file” and “nt:folder” nodes, but it can also expose the Git-specific information on those files and folders, like what was the last commit that changed them. And, you’d also like to be able to navigate (as nodes) the commits (e.g., history), branches, and tags in the Git repository.

How does federation work?

The first thing to understand is that ModeShape does not copy the data from the external system into the repository. Instead, ModeShape (with the help of connectors) dynamically creates nodes upon demand to represent the external data. If the external data doesn’t change too often or is okay to be slightly out of date, then you can optionally have ModeShape cache the nodes in-memory. But either way, the external system remains the owner of its data.

Secondly, federation is transparent to clients. Once federation is configured, the repository’s regular content and federated content all looks to client applications like regular content.

Thirdly, a repository does not use federation by default; you have to configure it for each repository. To do that, a repository configuration must specify:

  1. how ModeShape is to communicate with the external system (e.g., which connector implementation is to be used)
  2. the properties that the connector needs to talk with a particular external system (e.g., an external source)
  3. where and how the data in the external system is to be projected into the repository

All of this is defined inside the “externalSources” area of a repository’s configuration file. Here’s a simple JSON repository configuration that defines one external source called “downloads” and another called “sourceCode”:

{
  "name" : "MyRepository",
  "workspaces" : {
    "predefined" : [ "ws1", "ws2" ],
    "initialContent" : {
      "default" : "resources/initialContent.xml"
    }
  },
  "externalSources" : {
    "downloads" : {
      "classname" : "org.modeshape.connector.filesystem.FileSystemConnector",
      "directoryPath" : "/opt/downloads",
      "readonly" : true,
      "cacheTtlSeconds" : 5,
      "projections" : [ "default:/files/downloads => /" ]
    },
    "sourceCode" : {
      "classname" : "org.modeshape.connector.git.GitConnector",
      "directoryPath" : "data/repo",
      "remoteName" : "origin,upstream",
      "queryableBranches" : "master",
      "cacheTtlSeconds" : 5,
      "projections" : [ "default:/sources/ => /" ]
    }
  }
}

Each external source is identified by a unique name that you assign, and specifies the name of the connector implementation class and other connector-specific properties. A connector is simply a subclass of the “org.modeshape.jcr.federation.spi.Connector” class that contains that logic of how to create nodes that represent external data and, optionally, how to update the external data based upon changes to the nodes. We’ve designed the SPI so that you can easily create your own subclasses of Connector (or ReadOnlyConnector if the connector should never update data in the external system).

Let’s look at this configuration file a bit more. The “downloads” external source (line 10) defines several other properties:

  • the “directoryPath” is the location on the local file system of the top-level directory that is to be accessed by the connector; we use an absolute path here, though relative paths also work.
  • the “readonly” property specifies that ModeShape should never update any of the files or folders on the file system (yes, the FileSystemConnector is capable of creating, updating, and deleting files and folders on the file system in response to applications creating, updating, or deleting the corresponding nodes in the repository).
  • the “cacheTtlSeconds” is the time in seconds (5 in our case) that the nodes created by the connector to represent external files/folders should be cached.
  • the “projections” field is an array of string values that define the paths of the “federated” nodes that will represent the objects in Git. Our value of “default:/files/downloads => /” means that the top-level directory of the external source (that is, the “/opt/downloads” folder) should be projected as a node at “/files/downloads” in the “default” workspace. (Note that we’re also specifying that the “default” workspace should be populated with nodes described by the “resources/initialContent.xml” file. It’s here that we’d define the node type and any properties for the “/files” node.)

The file system connector will create a structure that mirrors the files and folders on the file system. So if the “/opt/downloads” directory contained the following:

aircraft
aircraft/Boeing
aircraft/Boeing/747.jpg
aircraft/Boeing/787.jpg
aircraft/Airbus
aircraft/Airbus/A380.jpg
aircraft/Airbus/A380.jpg
aircraft/Airbus/A320.jpg

then we would then have the following nodes inside the “default” workspace:

/files   (primary type “nt:unstructured”)
/files/downloads   (primary type “nt:folder”)
/files/downloads/aircraft   (primary type “nt:folder”, represents “/opt/downloads/aircraft”)
/files/downloads/aircraft/Boeing   (primary type “nt:folder”, represents “/opt/downloads/aircraft/Boeing”)
/files/downloads/aircraft/Boeing/747.jpg   (primary type “nt:file”, represents “/opt/downloads/aircraft/Boeing/747.png”)
/files/downloads/aircraft/Boeing/787.jpg   (primary type “nt:file”, represents “/opt/downloads/aircraft/Boeing/787.png”)
/files/downloads/aircraft/Airbus   (primary type “nt:folder”, represents “/opt/downloads/aircraft/Airbus”)
/files/downloads/aircraft/Airbus/A380.jpg   (primary type “nt:file”, represents “/opt/downloads/aircraft/Airbus/A380.png”)
/files/downloads/aircraft/Airbus/A320.jpg   (primary type “nt:file”, represents “/opt/downloads/aircraft/Airbus/A320.png”)

Note how the “/files” and “/files/downloads” nodes exist in the workspace, but the “/files/downloads/aircraft” node is dynamically projected to mirror the “/opt/downloads/aircraft” folder. If the “/opt/downloads/aircraft” folder were to be removed, then the “/files/downloads/aircraft” node would automatically be removed as well.

The “sourceCode” external source is pretty similar, but it access a local Git repository:

  • the “classname” specifies that the “org.modeshape.connector.git.GitConnector” connector implementation be used. This class will be included in ModeShape 3.1.0.Final. This connector is read-only.
  • the “directoryPath” is the location on the local file system of the top-level directory that contains a valid Git repository (e.g., it contains a “.git” directory); we use a relative path here.
  • the “remotename” is the name (or comma-separated list of names) of the remote(s).
  • the “cacheTtlSeconds” is the time in seconds (5 in our case) that the nodes created by the connector to represent Git’s files, folders, commits, tags, and branches should be cached.
  • the “projections” field specifies where in the repository the Git nodes should appear. Our value of “default:/sources => /” means that the top-level directory of the external source (that is, the Git repository folder) should be projected as a node at “/sources” in the “default” workspace.

The Git connector doesn’t really work with a local working directory of the Git repository. Instead, it basically exposes all of the commits, branches, and tags (plus the files and folders in each). It does this by mapping Git functionality onto some special nodes:

  • The “branches” node is a container under which all branches can be found.
  • The “tags” node is a container under which all tags can be found.
  • The “commits” node is a container under which all commits appear, with the most recent commits appearing first in the children.
  • The “branches/{branchName}” nodes represent the information about each branch, including the commit ID and references to the node representing the commit.
  • The “tags/{tagName}” nodes represent the information about each tag, including the commit ID and references to the node representing the commit.
  • The “commits/{branchOrTagOrCommit}” nodes show the history of commits for the given branch/tag/commit.
  • The “commits/{branchOrTagOrCommit}/{commitId}” shows the details of a specific commit in the history of a particular branch/tag/commit.
  • The “commit/{branchOrTagOrCommit}” shows the details of the specified commit
  • The “tree/{branchOrTagOrCommit}” is a container for the files and folders within the specified branch, tag or commit.

Thus in our repository, all the Git information is projected under “/sources”, so a number of nodes would appear in our repository:

  • A node representing each branch appears as children under “/sources/branches” (e.g., “/sources/branches/master”)
  • A node representing each tag appears as children under “/sources/tags” (e.g., “/sources/tags/release-1.0″)
  • A node representing each commit appears as children under “/sources/commits” (e.g., “/sources/commits/bbfa3f3d76b0…”)
  • A node structure (with “nt:file” and “nt:folder” descendant nodes) representing the workspace (with its files/folders) for each commit, branch and tag appears as children under “/sources/tree” (e.g., “/sources/tree/master/pom.xml”)

By the way, you can control with the projections which subset of the nodes exposed by the connector should be projected into the repository. For example, if you wanted to expose only a specific branch (e.g., “master”) in the Git repository under the “/sources” node, you could change the projection rule to be “default:/sources => /tree/master”.

Programmatically creating projections

ModeShape’s public API now contains a new FederationManager class that can be used to programmatically create and remove projections. However, external sources still must be configured via the JSON configuration file.

Custom connectors

As we mentioned earlier, we provide two connectors out-of-the-box in 3.1. We do plan to add a few more, but we’ve always expected the some developers would want to create their own custom connectors. Hopefully our SPI is simple enough that doing so is very straightforward. So if you’re interested in this, please take a look and give us feedback on our forums. The SPI should be pretty stable, but if we find some glaring problems, we may need to change the SPI slightly before the 3.2 release; after that, however, we’ll lock down the SPI.

Summary

We described a few ways that federating content from external sources into your ModeShape repository can be quite useful, and we also took a very detailed look into how federation is configured. In reality, however, we just skimmed the surface of what is actually possible with ModeShape federation.

Stay tuned for more on the 3.1 release later this week.

Filed under: features, federation, jcr

ModeShape is

a lightweight, fast, pluggable, open-source JCR repository that federates and unifies content from multiple systems, including files systems, databases, data grids, other repositories, etc.

Use the JCR API to access the information you already have, or use it like a conventional JCR system (just with more ways to persist your content).

ModeShape used to be 'JBoss DNA'. It's the same project, same community, same license, and same software.

ModeShape

Topics

Follow

Get every new post delivered to your Inbox.