Hi, I must say I agree with the multi-python-package idea, in fact I wanted to suggest too this idea, because the code begins to grow and will be soon complex to manage ;)
This is not an easy exercise, indeed, but it could give a more smart and easily deployable software (think about distributed infrastructures, where arbiter code is not needed on satellite-only servers). Note also that splitting project in several python packages is a sort of best practice for projects containing several independant parts (like a daemon and a web interface), and its clearly the case here with all the different daemons. (This is also how we make all our python projects here). The idea is to have 1 package by project component. So a good cutting-off could be for example : - shinken-common - shinken-arbiter - shinken-scheduler - shinken-poller - shinken-reactionner - shinken-broker - shinken-skonf And this will made the packagers life easier : 1 python package per distro package ;) As always, just my 2 cents ;) Laurent Le mercredi 02 février 2011 à 17:11 +0100, nap a écrit : > > > 2011/2/2 Grégory Starck <g.sta...@gmail.com> > > > > 2011/2/2 nap <napar...@gmail.com> > > Hi, > > > I don't think it is a so good idea. The code is not so > huge, and 90% of the code will be in the common part > (if not more), so I don't think it's so useful to cut > and complexify it. > > I do not see what the shinken.plugin can be in fact, > maybe this one can be a good thing, but we won't > redone all nagios plugins in the core, it's not the > goal. Only some major one for transport like nrpe or > check_nt for speed thing, but I do not think adding in > the core the whole plugin thing is useful nor a good > idea. Unless a huge link with Shinken core I prefer > having another repository for this is someone want to > write such plugins. Of course for modules they can be > on the core repository, because without it they are > useless. > > > Jean > > > > > > Jean : > > > if we would have a shinken package tree looking like this (not > so so much different than the current one): > > > shinken/ # we keep the base 'shinken' name for the shinken > package ofcourse. > > > objects/ # (or "conf_objects" ?) would contain all files > defining all classes for all "configuration objects" widely > used by the different shinken daemons, like: > # host, service, contact, timeperiod, > module(.py), etc, etc.. ; well anything that can be in a > Config object (and transmitted by the arbiter to the others > shinken daemons) I think actually > > > core/ # would contains all "core" related code files: > Satellite, Daemon, Scheduler, ... modulemanager, ..., > Item, ..., log, check, ... well all that is really anything > primary (and not contained in other subpackages like > objects/modules/..) needed/used by the different shinken > daemons so obviously. > ## actually they could be all left in shinken/ but having > a "core" subpackage with them is not more difficult.. > > > daemons/ > ## we can have either a subpackage or python module > per daemon ; doesn't matter actually: > arbiter > scheduler > reactionner > poller > broker > ## this one is the most easy to do now : would just > need to take the *daemon.py files I just have created and > rename them over there.. > > > modules/ # exactly like now but is just missing the > __init__.py to make it a (sub)package. > > > ( soon: > plugins/ # only for shinken *own* "plugins" (I'm > speaking of native python plugin here (when there will be). > ) > > > > > I actually don't see more than that. > > > wdyt ?? > > > clearly(more than now I mean) separating "core" & "conf > objects" & "daemon" code seems really helpfull (already from a > dev point of view but also eventually for distribution > packagers), at least to me.. ofcourse a small care must be > taken when this would be done but if it can be relatively > easily done why not foresee it right now ? and I do think > this can be very relatively easily done.. > > > > Hum.... if it's more obvious for new comers why not (after all this > time, for me it's obvious where things are, so it's hard to take a new > eye on this). Item should go in the objects, because its the root > object in fact, but the other dispatching seems good. I came and back > to core and config quite a lot during coding, but why not after all. > > We can start with the daemon one. I do not know if a sub module is so > useful. Here we want to help dev to read the code and go in it easily, > so another level is maybe too much for them. > > For code and object, it sounds like the M and C of MVC, so why not :) > > For the plugin, it can be some helpers class for python plugin dev > yes. > > So let go and cut all of this. Thanks to both of you to make me see > that the cutting is need :) > > > Jean > > > > > greg. > > > > > ------------------------------------------------------------------------------ > Special Offer-- Download ArcSight Logger for FREE (a $49 USD > value)! > Finally, a world-class log management solution at an even > better price-free! > Download using promo code Free_Logger_4_Dev2Dev. Offer expires > February 28th, so secure your free ArcSight Logger TODAY! > http://p.sf.net/sfu/arcsight-sfd2d > _______________________________________________ > Shinken-devel mailing list > Shinken-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/shinken-devel > > > ------------------------------------------------------------------------------ > Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! > Finally, a world-class log management solution at an even better price-free! > Download using promo code Free_Logger_4_Dev2Dev. Offer expires > February 28th, so secure your free ArcSight Logger TODAY! > http://p.sf.net/sfu/arcsight-sfd2d > _______________________________________________ Shinken-devel mailing list > Shinken-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/shinken-devel ------------------------------------------------------------------------------ Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d _______________________________________________ Shinken-devel mailing list Shinken-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/shinken-devel