providing simple libraries

3 views
Skip to first unread message

Brandon Pedersen

unread,
Aug 19, 2011, 11:12:25 PM8/19/11
to colony...@googlegroups.com
I have played around with osgi in java and was thinking about how in
osgi you can have just a simple bundle that exports packages which can
be used by other bundles. Is there something similar for colony? I
guess there is always the ability to just create a setup.py project
for the library, deploy it on the colony machine, and have a plugin
have a PackageDependency on it...just wondering if there is another
way for deploying libraries just inside colony itself?

Thanks,

-Brandon

João Magalhães

unread,
Aug 21, 2011, 11:10:41 AM8/21/11
to colony...@googlegroups.com
The colony plugin model is pretty much a service like model. Every plugin interacts with a different plugin throught a facade, there are no symbols exposed from a plugin to another.
This represents a small difference fom the OSGi model, more in conformance with the MEF model.
This models allows colony to be platform independent and also allows the distributed modelto be much simpler.
Because of this the "library exporting" is just no "implementable". The correct way of using libraries is to use it at a platform level, for this you should declare the package dependency that is intepreted according to each implementation. For example, In python it will make sure that the refered module is available in the current python path.

This is a small but important design decision of colony, I hope I could explain it correctly.

Brandon Pedersen

unread,
Aug 22, 2011, 1:41:44 AM8/22/11
to colony...@googlegroups.com
2011/8/21 João Magalhães <joa...@gmail.com>:

> The colony plugin model is pretty much a service like model. Every plugin interacts with a different plugin throught a facade, there are no symbols exposed from a plugin to another.
> This represents a small difference fom the OSGi model, more in conformance with the MEF model.
> This models allows colony to be platform independent and also allows the distributed modelto be much simpler.

This makes sense and you are right, it is much simpler and cleaner,
and I do like the fact that it is platform and implementation
independent....definitely cant say the same thing for OSGi

> Because of this the "library exporting" is just no "implementable". The correct way of using libraries is to use it at a platform level, for this you should declare the package dependency that is intepreted according to each implementation. For example, In python it will make sure that the refered module is available in the current python path.
>
> This is a small but important design decision of colony, I hope I could explain it correctly.

Yes, this makes sense. However, what if 2 plugins require different
versions of a particular library? How could this be handled? I don't
imagine I will run into this with my situation but I could see in the
future where plugins from different people are getting mixed together
that this could cause problems. Also, there is no way to specify a
range of versions of a required library that would be
acceptable....and as far as I can tell, the package version you give a
PackageDependency does not get enforced. Perhaps you could use
pkg_resources from setuptools to do this verification or
something?...again, I'm not too worried about this in my situation but
I could see it being a problem later.

Thanks,

-Brandon

Reply all
Reply to author
Forward
0 new messages