Omneity: Progress report


Little to report. This week has been substantially dedicated to work on the Development Support Framework, but earlier in the week I did spend some time refactoring parts of Omneity’s data layer.

The main changes are to the way clients access the underlying database. Rather than direct access through the interface of the DataSourceManagerImpl clients will use a Connection provided by the DataSourceManagerImpl in response to a connect()—so DataSourceManagerImpl acts as a Connection factory.

These Connection objects then take objects offering the Statement interface (created directly using, for example, SPARQLQuery or GremlinStatement, or indirectly using a Statement builder like SPARQLBuilder or GremlinBuilder). The Connection object offers execute() methods that operate on these Statement objects to query or update the underlying data source.

This approach is significantly cleaner as it decouples implementation details from the DataSourceManagerImpl and abstracts them through Connection objects.

The upshot of all this is that, theoretically, the underlying data sources (database and Adapters) can be replaced without consequence to the client code. It also means that Connections act as scope limiters on the underlying data, allowing client code to query data within the scope of an Adapters Connection rather than the global scope of the agent’s local database.

The one ‘trick’ necessary to make life easier on Adapter writers it that Connections returned are proxies for underlying Adapters. The scope limitation is performed by the DataSouceManagerImpl, not the Adapter. This saves the Adapter from having to write special code to handle what are essentially database queries.

About these ads

,

  1. #1 by Monica on September 15, 2012 - 7:53 am

    First off I want to say superb blog! I had a
    quick question which I’d like to ask if you do not mind. I was interested to know how you center yourself and clear your thoughts before writing. I’ve had trouble clearing my thoughts in getting my
    thoughts out. I truly do enjoy writing but it just seems like the first 10 to 15 minutes are lost simply just trying to figure out
    how to begin. Any suggestions or tips? Kudos!

    • #2 by Mark on September 15, 2012 - 8:56 am

      Monica: if you only ‘waste’ 10 to 15 minutes then you’re doing much better than I.

      Depending on the subject I may spend only a few minutes writing a post or it may take several days of writing, rewriting, editing, drafting, redrafting… Well, you get the idea.

      I generally have a long list of ‘draft’ posts that are partially written. I revisit this list periodically and finish the post to publish. So what you see may have been in preparation for a long time before I post it.

      All the best with your writing.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: