...
Trying to create an OSGi-based application with services is challenging. The OSGi API is complex and a lot of knowledge about internal mechanisms has to be known to avoid synchronization issues. iPOJO provides a very simple development model; let's look:
Code Block | |||||||
---|---|---|---|---|---|---|---|
| |||||||
@Component @Provides public class MyServiceImplementation implements MyService { //.... } |
Code Block | |||||||
---|---|---|---|---|---|---|---|
| |||||||
@Component public class MyServiceConsumer { @Requires private MyService myservice; // Just use your required service as any regular field ! } |
...
The run-time overhead of iPOJO is also small. On the Peaberry benchmark, iPOJO has very good performance:
Div | ||
---|---|---|
| ||
Wiki Markup | ||
{div:class=shell}
Guice-Peaberry: 276.00 ns/call {color:#ff0000}iPOJO Service Dependency:
ns/call {color}
2384.00 ns/call {color:#ff0000}iPOJO Temporal Dependency:
ns/call {color} {color:#ff0000}iPOJO Temporal Dependency
proxy: 173.00 ns/call {color} {div} |
For French readers, you can find additional benchmarks in chapter 10 of iPOJO - A flexible service-oriented component model for dynamic systems
...