[Mulgara-dev] simple app for functional groupings

William Mills wmills_92105 at yahoo.com
Wed Mar 12 17:39:04 UTC 2008


Explanation of point one below...  if I define the role "webservers" having the members (www[1-2,4].mulgara.org, www.tucana.org), then I want to be able to retrieve

1)  the short definition of the role, which is (www[1-2,4].mulgara.org, www.tucana.org)
2) enumerate the list of hosts with that role, which is (www1.mulgara.org, www2.mulgara.org, www4.mulgara.org, www.tucana.org)

The problem comes with the reverse mapping of hsotname to role....

I had thought about perhaps making the relationship to the role be the machine expression/regexp, so something like:

(<rolename:webservers>, <machineregexp:www[1-2,4].mulgara.org>, "www1.mulgara.org")

But it shound like you are suggesting that the better way to structure this is:

(<rolename:webservers>, <primitives:contains>, "www[1-2,4].mulgara.org")
(<machineregexp:www[1-2,4].mulgara.org>, <primitives:contains>, "www1.mulgara.org")

It all gets more complicated when a role inherits/contains another role definition, like (<rolename:webservers>, <primitives:inherits>, "imageservers"), or I suppose that could be (<rolename:webservers>, <primitives:contains>, "rolename:imageservers") right?

-bill


----- Original Message ----
From: Paul Gearon <gearon at ieee.org>
To: Mulgara Developers <mulgara-dev at mulgara.org>
Sent: Wednesday, March 12, 2008 9:40:58 AM
Subject: Re: [Mulgara-dev] simple app for functional groupings

On Mar 10, 2008, at 7:49 PM, William Mills wrote:

> I have a relatively simple app I want to play with in Mulgara, which  
> is doing functional groupings of machines.  In it I have:
>
> roles:      a named grouping of other roles, machine expressions,  
> and machine names.
>
> machine expressions:     a regexp like string used to define a list  
> of hostnames, i.e. www{1-4,6}.mulgara.org whih identifies 5 hosts.
>
> machine names:                a simple machine name like  
> www1.mulgara.org
>
> What is the best (if there is one)  RDF way to structure this so  
> that I can easily get
>
> 1)    the short definition of a role, i.e. the minimal set of roles,  
> machine expressions, and machine names
>
> 2)    the full list of host names contained by a role
>
> 3)    for a given host get the list of roles it is a member of.
>
> There are several ways to structure this, and I'm not sure of the  
> pitfalls yet.

The main thing you want to do is to make sure you have a relationship  
(ie. a predicate) for everything you want to search on.  For instance,  
item 3 would want some sort of memberOf property to each role a host  
belongs to.  It doesn't matter which direction it's pointing in, so  
you could have an inverse predicate like hasMember instead, with no  
issues.

Point 2 will require another sort of membership predicate between  
roles and their members.  And point 1 I can't say, because I don't  
really understand the question.  :-)

Regards,
Paul
_______________________________________________
Mulgara-dev mailing list
Mulgara-dev at mulgara.org
http://mulgara.org/mailman/listinfo/mulgara-dev






More information about the Mulgara-dev mailing list