OSGi Community Event 2014
Everit Component Registry is an amazingly simple yet powerful new open source Component Model. The primary goal of its concept is to allow more configuration options via Configuration Admin and by doing that, offer an alternative to the de-facto standard, whiteboard pattern.
The implementation of Everit Component Registry is in progress. The goal of the session is to
show the status of the project
talk about all the ideas that came up till now
collect about new ideas and weaknesses with the help of the audience
See the most important parts of the concept below:
Configuration via Configuration Admin The concept is similar to Declarative Services. Every configuration should be done via Configuration Admin.
Reference clauses Instead of a simple OSGi filter, references of these components can be configured with clause(s). By doing that it is possible to specify attributes of the binding on the consumer side. The OSGi filter is only a directive of the clause. E.g.: Imagine a ServletContext component that accepts Servlet OSGi services. A clause that selects a servlet can be the following:
Cardinality The following cardinalities are supported: 0..1, 1..1, 0..N, 1..N. The choice must be made in the source code. In case of 0..1 and 1..1 cardinality, the type of the clause configuration property is String. In case of 0..N and 1..N the type is String.
Optionality There is no optional support like in Declarative Services. In case the cardinality is 0..1 or 0..N, it can be configured via Configuration Admin if a service should be picked up or not. In case one ore more clause is defined via ConfigAdmin, all of the clauses must be satisfied.
Dynamism If it is allowed by the programmer of the component, the reference can be updated without restarting the component instance.
Programmability Sub-status and message can be dropped from activate() and deactivate() methods. By doing that, it is possible to get more information in the console about the state of the component (E.g.: unsatisfied programmatic requirements).
New component classes and already instantiated objects can be registered programmatically. By doing that, existing Component Model logic can be mixed with the new concept.
Avoiding magic Using proxy instances, bytecode manipulation, runtime inheritance and other tricks is strictly forbidden. Injected service objects are not “enhanced”, they should be used as they are.
Balazs Zsoldos is the co-founder of Everit. He is the leader of the development of Everit OpenSource Components. Developing Java based solutions is not only his job but also his passion.
He believes in simplicity. That is why he decided to design and build as many simple, but useful goal-oriented modules as he can. As the base of the stack, he chose OSGi.
Balazs does not believe in monoholitic frameworks, therefore all of the sol