User:Lmartinho/Colony Framework

The Colony framework is an open source plugin framework specification. Implementations of the specification offer a runtime component model, that allows for plugins to be installed, started, stopped, updated and uninstalled without requiring the application container to be stopped. The specification relies heavily on the Inversion of control principle, in order to make it easier for application components to discover and interact with each other.

Colony aims to simplify the development model of traditional modularity frameworks such as OSGi, while delivering the same kind of functionality and a similar conceptual model. Practical applications can range from modular enterprise software to application mashing.

Motivation
Colony gathers inspiration from other modularity solutions such as OSGi for the Java programming language and Managed Extensibility Framework (MEF) for the .NET Framework.

Colony aims to be a platform independent specification, and serve a wide range of use cases. This includes use cases typically associated with OSGi, such as modularized application with a narrow core and large extensibility possibilities. This also includes use cases to which MEF caters, such as adding modularity to an existing application, without the developer having to create its own plugin infrastructure from scratch.

The need for reducing the number of configuration steps for assembling a computing grid, as well as supporting adding nodes and distributing computation to them as quickly as possible, also drives the Colony Distributed initiative.

Key concepts
The Colony conceptual model builds on top of 4 key concepts.


 * Plugin: an isolated piece of code and associated resources that makes sense by itself or when working together with other plugins.
 * Capability: defines what a plugin is able to do, so that it can be matched with other plugins that desire its abilities.
 * Dependency: defines that a plugin requires another plugin to function and is worthless without it.
 * Event: a message that can be broadcasted by a plugin and listened by whichever plugin wants to receive it.
 * Bundle: a set of related plugins, intended to operate together.

The plugin lifecycle includes loading and unloading its resources, injecting it into others as a capability or dependency, as well as having capabilities and/or dependencies injected into it.

Distribution
The framework proposes the concept of Viral Distribution where computation can be transparently distributed to any number of nodes, by having each node run a Colony instance. The concept takes advantage of the modularity approach, by using the plugin as the unit to be transferred between nodes. The concept also requires the availability of tools for rapid discovery of new nodes (e.g. using Zeroconf techniques such as Bonjour through Colony Bonjour Plugin).

Viral distribution, as per the Colony interpretation, would mean that a configured Colony instance could make its computing power available to a Colony managed computing grid, by announcing its specifications, after which it would receive work units in the form of plugins, i.e., mobile code for execution on the instance.

To set up a new Colony instance, and enabling viral distribution support, would require an operating system, basic Colony dependencies (e.g. a virtual machine for the Colony implementation language of choice) and the framework manager itself (e.g. using the installer). Adding the basic bundles required for accessing and downloading from a remote plugin repository to the instance would complete the bootstrap. The node would then anounce its availability to the Distribution Server Plugin, and could begin receiving and processing work.

Notable Components
Colony framework includes a set of application components for various functions, from domain-specific sub-frameworks to providers for common protocols and services. The list below is non-exhaustive.

Sub-frameworks

 * Web Mvc Plugin - offers a full web application framework, based on the MVC architecture pattern, similar to Ruby on Rails and Django
 * Web Mvc Wiki Plugin - offers a self-contained Wiki application, leveraging the Revision control plugins

Services

 * Http Service Main Plugin - modular HTTP server implementation
 * Smtp Service Main Plugin - offers a server for the SMTP e-mail protocol
 * Bittorrent Service Main Plugin - offers the BitTorrent
 * Dns Service Main Plugin - offers a server for the DNS protocol
 * Bittorrent Service Main Plugin - offers the BitTorrent
 * Irc Service Main Plugin - offers a server for the IRC protocol
 * Pop Service Main Plugin - offers a server for the POP e-mail protocol
 * Telnet Service Main Plugin - offers a server for the Telnet network protocol
 * Xmpp Service Main Plugin - offers a server for the XMPP protocol

Clients

 * Ldap Client Main Plugin - client for the LDAP directory protocol
 * Http Client Main Plugin - offers a client for the HTTP protocol
 * Smtp Client Main Plugin - offers a client for the SMTP e-mail protocol
 * Dns Client Main Plugin - offers a client for the DNS protocol
 * Twitter Service Plugin - offers support for the Twitter API
 * Apple Push Plugin - offers support for the Apple Push Notification Service
 * Revision Control Manager Plugin - extensible revision control façade with extensions available for Subversion, Bazaar and Mercurial

Infrastructure

 * Entity Manager Plugin - modular ORM component
 * Build Automation Plugin - build automation component (functionally comparable to Maven)
 * Distribution Server Plugin - core component of the Colony distribution infrastructure
 * Bonjour Plugin - implementation of Bonjour Apple Inc.'s trade name for its implementation of Zeroconf, a service discovery protocol

Status
As of 2011, Colony is considered to be in Alpha status although production deployments exist.