OpenNTF / org.openntf.xsp.jakartaee

XPages Jakarta EE support libraries
Apache License 2.0
20 stars 7 forks source link

Convert NoSQL driver to use JNX #533

Open jesse-gallagher opened 5 months ago

jesse-gallagher commented 5 months ago

JNX has been properly open source for a little while now, and it'd be good to convert the NoSQL driver to use it.

There'll be some fiddly aspects: JNX has a number of transitive dependencies, and developers who use XPages JEE may also have their own JNX installation. Accordingly, JNX and its dependencies should be hidden inside a bundle and not exposed to the rest of the environment. Tycho will make this a little annoying but not impossible.

Moreover, other parts of the stack may want to use some JNX-exposed capabilities, like access to the statistics store. It would probably make sense to create an API shim layer like NSF ODP uses to paper over the differences and allow a hiding JNX bundle to contribute the API without worry of contamination.

slapraik-intec commented 4 months ago

What about DominoJNA instead? I don't know about the future direction of JNX, but the recent Virtual Views functionality in JNA looks interesting and could be useful across REST, JSF, JSP, etc.

You might still have to deal with the same issue where people may have their JNA installation, but it sounds like that could be solved in a similar way to what you outlined above.

jesse-gallagher commented 4 months ago

Virtual Views have me intrigued for sure. I'm not worried about JNX's direction, since I'm basically the primary maintainer of it, but the stuff going into Domino JNA since they diverged is interesting.

Regardless, I'd want to keep the specific API in use isolated from the apps. Right now, there's an unfortunate necessity of providing lotus.domino Session and Database objects, but I've been very strict otherwise about not exposing details of the specific implementation. Whatever I do, it'd be intended to be swappable without disruption to the app developers.