Discussion:
Bongo PHP binding changes, new central config file.
Alex Hudson
2010-07-06 21:42:33 UTC
Permalink
Hey everyone

I committed some changes to the Bongo PHP binding earlier
today to make the class structure a bit more 'standard', in particular to
make it more autoloader friendly. Other bits of code we have in the repo
which depend on this code aren't quite yet updated, but will be soon
hopefully.

I've also added some code to it to pull out some basic
configuration from a file. The idea here being to pull together the basic
bits of config enough to contact the store. The idea was we'd have an
/etc/bongo.conf with a basic JSON doc, something like this:

{
"type" :
"bongo-config",
"version" : 1,

"stores" : [
{
"shortname": "local",

"host": "localhost",
"port": 689
},
{
"shortname": "shell",
"host":
"shell.bongo-project.org",
"post": 1832
}
]
}

I'm thinking on a new
install, the 'stores' bit would only have one entry, and for most people it
would either stay that was or be slightly edited.

Our various commands
and things can be updated to respect this too, and probably the agents too
(rather than the hardcoded stuff we have right now).

Thoughts anyone?


Ta

Alex.
pfelt-Urct4Ww6//Pz1n+
2010-07-07 01:42:56 UTC
Permalink
when we get to the point of allowing for multi-server systems we'll need a
way to tell the bongo-manager which store to contact for its configuration
data. i think we had thought of just specifying it on the command-line,
but i think this is as good a way as any of specifying it given the fact
that a) it would be consistent across all bongo "servers" and b) it would
specify who to talk to for any type of server (eg: agents, web apps, etc).

vote++
Post by Alex Hudson
Hey everyone
I committed some changes to the Bongo PHP binding earlier
today to make the class structure a bit more 'standard', in particular to
make it more autoloader friendly. Other bits of code we have in the repo
which depend on this code aren't quite yet updated, but will be soon
hopefully.
I've also added some code to it to pull out some basic
configuration from a file. The idea here being to pull together the basic
bits of config enough to contact the store. The idea was we'd have an
{
"bongo-config",
"version" : 1,
"stores" : [
{
"shortname": "local",
"host": "localhost",
"port": 689
},
{
"shortname": "shell",
"shell.bongo-project.org",
"post": 1832
}
]
}
I'm thinking on a new
install, the 'stores' bit would only have one entry, and for most people it
would either stay that was or be slightly edited.
Our various commands
and things can be updated to respect this too, and probably the agents too
(rather than the hardcoded stuff we have right now).
Thoughts anyone?
Ta
Alex.
_______________________________________________
Bongo-devel mailing list
https://mail.gna.org/listinfo/bongo-devel
Alex Hudson
2010-07-07 09:07:44 UTC
Permalink
Post by pfelt-Urct4Ww6//Pz1n+
when we get to the point of allowing for multi-server systems we'll need a
way to tell the bongo-manager which store to contact for its
configuration
Post by pfelt-Urct4Ww6//Pz1n+
data.
Yeah, exactly.

I was mulling over in my head how this would work, because at the moment
we said that Bongo 1.0 would be single store agent only configurations, yet
the file I sent this list obviously has two stores listed. For 99% of users
there is only going to be one store listed, so the problem is even then a
kind of corner case, but I think we'd need set out now how the file should
be interpreted for future reference.

I was thinking for 1.0 that agents would just connect to the first store
in the list, and any subsequent stores would be there for the benefit of
administrative tools (i.e. using the short names to refer to stores, e.g.
bongo-storetool t <shortname>).

Cheers

Alex.

Loading...