menu

OSGi - Open Services Gateway Initiative (Part I of many...)

By: Chris McIlvoy / July 14th 2023 / Technology
OSGi - Open Services Gateway Initiative (Part I of many...)

Ohh-SGi. For all you old school CQ'ers, we have been leaning on the whole OSGI bundle application framework to install/uninstall, start/stop and connect all our custom application services to Adobe's services.

OSGi is core to Adobe Experience Manager (AEM) development and the ability to build services to support site functionality. At Content\Thread, we are huge fans and really believe it truly facilitates modular code (a pattern we all strive for). There is flexibility and quickness in the model - especially all the sweet associated annotations contrary to obscure Project Object Model (POM) configurations.

Felix is the implementation of OSGi used in AEM.

After you start up a fresh install of AEM 6.5, you get this:

Screenshot1

http://localhost:4502/system/console/configMgr

This is a daunting list of all potential services available for development.

A quick jsQuery gives back a total of 1200+!

$(".pointer").length

Let's take a look at a few examples through the OSGi Configuration

Manager AEM Communities Facebook OAuth Provider

Screenshot1

This particular service allows users to connect AEM communities to Facebook's Graph Application Programming Interface (API).

Enabling this is a rabbit hole of configuration (Adobe Granite Token Authentication Handler, Apache Jackrabbit Oak Default Sync Handler, Adobe Granite OAuth Authentication Handler), contributing to user sync issues across servers' author and publishers, and resulting in an integration that is not even extendible.

Ask your team: Do we need to store users in AEM? Is that the best use of our Content Management System (CMS)?

For the record: We would never leverage this in production because, in our opinion, AEM is not the ideal option for managing public site users.

com.adobe.cq.social.connect.oauth.impl.FacebookProviderImpl

It would be interesting to learn how many customers are actually using this feature. Personally, I would prefer these types of niche services to be included in separate packages. They clog up logs, increase startup & shutdown times, and given the exponential number of them, cause overall risk to environment.

Moral of this tale: Be wary before enabling OSGi services available. Just because it is out of the box (OOTB) does not mean it is a good option.

Coming up...
Part II: Solid example of a good 3rd party API integrated service