You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Why choose iPOJO?

Simplicity

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:

@Component
@Provides
public class MyServiceImplementation implements MyService {
 	...
}
@Component
public class MyServiceConsumer {
 	@Requires
	private MyService myservice;

	// Just use your required service as any regular field
}

Isn't that easy? Providing and requiring OSGi services have never been so simple.

Powerful

Supporting OSGi services is not the only feature of iPOJO. iPOJO provides many other features that to simplify developing sophisticated applications. For example, iPOJO supports configuring components with Configuration Admin, sending/receiving events with the Event Admin, remote configuration with JMX, and more.

Flexible

Is iPOJO missing a feature you need? No problem. iPOJO provides an extensibility mechanism that allows you to mange other (custom) requirements. You can easily adapt iPOJO for your own needs. Creating an extension does not require modifications to the core, you only need to implement a custom handler that will be plugged on your instance. Your handlers can also use any of the other iPOJO features.

Embeddable

iPOJO works on any R4.1 OSGi implementation. It also works on many Java virtual machines such as Oracle JRockit, JamVM, Dalvik (Android), and Mika. iPOJO only requires a J2ME Foundation 1.1 virtual machine. So, iPOJO can be embedded inside mobile phone applications or inside your washing machine.

Lightweight

Being powerful is great, but what about footprint and performances? iPOJO is small and was designed to stay small. The core size of iPOJO is approximately 205k (compared to 816k for Guice-Peaberry and 2112k for the minimal Spring-DM configuration). In addition to the core, you only deploy the features you require. For example, if you need proxy injection, just deploy the temporal dependency bundle (less than 70Kb).

The run-time overhead of iPOJO is also small. On the Peaberry benchmark, iPOJO has very good performance:

Guice-Peaberry:	                     276.00 ns/call
iPOJO Service Dependency:            118.00 ns/call
Spring-DM:                          2384.00 ns/call
iPOJO Temporal Dependency:           159.00 ns/call
iPOJO Temporal Dependency w/ proxy:  173.00 ns/call

For French readers, you can find additional benchmarks in chapter 10 of iPOJO - A flexible service-oriented component model for dynamic systems

Debug & Introspection

Developing OSGi applications can quickly become a nightmare, when things are working as expected. iPOJO helps you debug your application (and it often happen). For starters, you can debug iPOJO components as normal OSGi applications (stack traces and line number are not modified). But thanks to iPOJO's introspection mechanisms, you can also know the structure of your application (which instance uses which service...), so you easily understand why a service dependency is not fulfilled, the value of properties, etc.

Designing applications

iPOJO also provides an architecture description language to design applications in a flexible and hierarchic manner. Designed applications are expressed in terms of services and are natively dynamic, meaning they support implementation evolution and substitution. Moreover, iPOJO supports service isolation to get your own private service.

Conclusion

Give it a try!.

For any questions or feedback, send an email on the users@felix.apache.org mailing list (send a mail to users-subscribe@felix.apache.org to subscribe).

Error CSS Stylesheet macro - Import URL 'http://people.apache.org/~clement/ipojo/ipojo.css' is not on the allowlist. If you want to include this content, contact your Confluence administrator to request adding this URL to the Allowlist.

Overview
Getting Started
User Guide
Tools
Developer Guide
Misc & Contact
Experimentation

  • No labels