• Anonymous
  • Login
  • Register


Extensibility via OSGi and Java for IBM Lotus Domino

Posted by David Taieb | March 22, 2010


The Notes/Domino C API toolkit allows you to extend the server by writing applications called server addin tasks to perform various jobs like archiving, billing, logging, etc... Although very powerful, using the C API to write your tasks presents many challenges:
- Must be written in C/C++ which requires a high cost of entry
- Low productivity
- Can be hard to debug
- Must be compiled for every platform

This prototype proposes a new way of writing server addin tasks by using the Java OSGi programming model. This would solve all of the problems described above, but also add new benefits like:
- Declarative task scheduling
- Built-in mechanism to access server task user arguments
- List of tell commands to query the OSGi framework
- Extensibility
- Easy deployment
- Better tooling with Eclipse IDE and its first class Java and plugins editors and Java debugger
- Leverage existing OSGi assets (within the company or open source)

Here is the full documentation, here the project and here the direct download link.

Share

Comments

 Ulrich Krause commented on Mar 22, 2010 1:22:19 AM

Can this be used to create extension managers as well or is this only possible with C API?

 Karsten Lehmann commented on Mar 22, 2010 5:11:37 AM

This is very cool! I had not expected that you can add this as an add-on to 8.5.1. I thought we had to wait for 8.5.2 to get OSGi for server tasks.
The setup of the development environment sounds a bit "manual", but anyway, you only do that once.

 Stephan H. Wissel commented on Mar 22, 2010 6:19:35 AM

Would that supersede the TriggerHappy plug-in? Can I have a OSGI plug-in run on an event trigger (e.g. document submitted before routing)?

 Nathan T. Freeman commented on Mar 22, 2010 7:27:17 AM

According to information provided by David in other contexts, the OSGi framework is loaded by the HTTP task, rather than the server core. So this process only works if you're running HTTP services on the server.

@1 & 3 - I have made the same query, but my understanding is that the answer is no. Because the framework is only loaded in the HTTP task, it can't be triggered by other processes which operate independently, such as the Replicator, Router, or AgentMgr.

It would be awesome if the ExtMgr tooling were extended to support Java programs. I bet we would see a surge in server-based procedural tools, then. TriggerHappy would be the tip of the iceberg.

 John Foldager commented on Mar 22, 2010 9:31:46 AM

This would be freaking awsome!

By the way, Bob Balfe asked a similar question back in august 2009: { Link }

 David Taieb commented on Mar 22, 2010 9:47:58 AM

-Can this be used to create extension managers as well: no this can only be used to create server addin tasks as OSGi plugins. I already have a few ideas on how to build a generic extension manager dll that delegate to an OSGi framework.
-This is very cool! I had not expected that you can add this as an add-on to 8.5.1. I thought we had to wait for 8.5.2 to get OSGi for server tasks: No, there are no dependencies or possible conflicts to 8.5.2 at all. Javaddin is using in own private instance of OSGi framework, in 8.5.2 we use another unrelated instance loaded in the http task.
-From Nathan- So this process only works if you're running HTTP services on the server: Not true, javaddin doesn't use the http services at all. It load a JVM and its own OSGi instance from the {dominobin}\javaddin directory. It doesn't depend or conflict with the 8.5.2 OSGi loaded in the http task. In fact, I wouldn't be surprised if javaddin worked in previous versions of Domino server.
-It would be awesome if the ExtMgr tooling were extended to support Java programs: Yes, it would be very cool, however after making it work, we'll have to mind the performances Emoticon

 Ulrich Krause commented on Mar 22, 2010 9:59:08 AM

>> build a generic extension manager dll
hu, dll ?? isn't this Windooze stuff only Emoticon

 David Taieb commented on Mar 22, 2010 10:15:48 AM

@7: yes you're right, I should have said extension manager library, but I'm sure you understood Emoticon

 Nathan T. Freeman commented on Mar 22, 2010 11:38:14 AM

@6 - So wait... this is SEPARATE from the OSGi that's loaded by http in 8.5.2? Okay, my bad. But I'm not sure how I feel about that. Can they interact? And if so, can you give us an example of how we'd do that? Preferably one that bears in mind that only about 3 people in the Notes/Domino community have even the most vague understanding of how OSGi actually works. Emoticon

 David Taieb commented on Mar 22, 2010 11:53:06 AM

I'm not sure what use case you have in mind where you feel the http OSGi and Javaddin OSGi need to interact. So I'll try to cover the 2 following scenarios:
1. Runtime interaction: Each instances of OSGi is hosted by a separate process (javaddin.exe and http.exe), therefore they can only interact via Inter-Process communication like Message Queues for example (may be adding a java api to create a new Notes Message queue could be a nice enhancement).
2. Code sharing: plugins and features code could be shared. For example, you could put some plugins and features in a separate directory and create a link file (this is a standard eclipse thing so it's easy to find out how) and then have both instances of OSGi load the plugins in their own processes.

 Nathan T. Freeman commented on Mar 22, 2010 12:41:01 PM

You can't think of any context where you'd like to have Xpages interact with a scheduled process, David? How about scheduled updates to application scopes, like Tag clouds or trending topics?

 David Taieb commented on Mar 22, 2010 1:13:44 PM

OK, I got it, the use case is application scopes need to be notified when a scheduled task is done doing some updates. Like I said in my previous post, I think we could achieve that with Message Queues. Definitely something to consider for a future enhancement of Javaddin.

 David Taieb commented on Aug 23, 2010 5:02:01 PM

@15: thank you for the kind words. I intend to continue enhancing the tool. I already have quite a few enhancement ideas and if you do too, please send them on.
@16: not at all Emoticon
@17: Yes, OSGi/Eclipse can be used both as client and server technology. Check out { Link } for more information

Please login first to comment.