[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-developers] CCE Libraries



Federico Siri wrote:

> > You have the right idea.  CCE is not actually network-aware (security)
> 
> Can you better explain what do you mean by "not network-aware"? I cannot understand
> what kind of operations you can do using CCE, the documentation is not very clear on
> this. Is any demo CCE program available somewhere?


CCE receives connections on a UNIX domain socket, not a network socket. 
The belief is that "things" that will manage the system will be ON the
system.  Rather than build security into CCE so it could do safe
(encrypted) network traffic, we opted to make it only take local
connections and you can build an SSL->CCE passthough (which is exactly what
our UI is!).

Things you can do with CCE, well that is a big question :).  First you need
to understand the model.  CCE stores "objects".  These "objects" represent
"things" in the system (User, Group, DnsRecord, etc) and are described by
"classes".  These "objects" have "properties" which in turn have "values". 
"Objects" can be extended by third-party development via "namespaces",
which have "properties", too.  

For example, you have a "class" named 'Foo'.  'Foo' has a "namespace"
'Bar'.  Whenever you create a new 'Foo', you automatically get a new
'Bar'.  When you destroy a 'Foo', the 'Bar' goes with it.

Clear?  Once you have that, you can move onto operations on these
"objects".  You can do things like CREATE, DESTROY, GET, and SET these
objects.  Whenever you do a change like this you trigger CCE "events". 
That is where the magic comes in.

Developers can "register" via config files to "handle" "events".  You can
specify which "event" you want to catch, and what to do when it happens
(exec a program).  Your "handler" program is then run whenever a requested
"event" gets triggered.  Your "handler" makes the necessary changes to the
system (modifying config files, or making directories, etc) that are needed
to actuate the "event".

Event handling can get a lot more complicated, but I won't go into that
right now. :)

When all the "handlers" are done, CCE tells the requesting client that it
finished (and gives some status).

So, in real world terms, if you want to create a user on a full CCE system
(note that RaQ XTR is _not_ a full CCE system) such as Qube3, all you have
to do is tell CCE 'CREATE User name="george"'.  The registered event
handlers will do all the rest of the work for you.  Of course, User has
many more properties than just 'name', but I'll leave that as an experiment
for you.   :)

hope it helps,

Tim

-- 
Tim Hockin
Systems Software Engineer
Sun Microsystems, Cobalt Server Appliances
thockin@xxxxxxx