Projects tigase _server server-core Issues #239
OSGi mode - exceptions in logs (#239)
wojciech.kapcia@tigase.net opened 1 decade ago

Handle exceptions, while Tigase runs in OSGi mode, more gracefully

Andrzej Wójcik (Tigase) commented 6 years ago

I'm not sure what you have had in mind so I've tried to start Tigase in the OSGi mode and it looks like it is no longer possible as it fails to start with a lot of exceptions. I've tried to deal with them by upgrading dependencies (as some of the exceptions where related to JDK), but I've ended with Tigase which sometimes hangs on startup (deadlock on class loading?) and if not then fails to load MySQL driver or fails to find Groovy Script engine factory.

@wojtek Have you checked OSGi mode on 8.0.0?

@kobit Should I work on that or should we declare OSGi support as dead? I'm asking as I do not know how long it will take to have it working again.

wojciech.kapcia@tigase.net commented 6 years ago

Andrzej Wójcik wrote:

I'm not sure what you have had in mind

There were virtually tones of exceptions about loading dependencies (even though it didn't prevent Server from starting)

%wojtek Have you checked OSGi mode on 8.0.0?

Frankly - nope. You were virtually the only user (and proponent) of OSGi. Most of the time it was causing more problems so I wasn't focusing on tests in 8.0.0.

Given that you've lost interest in OSGi IMHO we could deprecate/remove it…

Artur Hefczyc commented 6 years ago

We do not have to work on this right now, that's for sure.

Do we have to work on this at any time in the future? That depends on how you @andrzej.wojcik see the technology. As Wojciech mentioned you are the one behind implementation and promoting it for Tigase. Do you see any practical future in OSGi for Tigase? Any real benefits, I am realistically. We all know the theory and ideas behind it. But does it meet the expectations in real use-cases?

Andrzej Wójcik (Tigase) commented 6 years ago

@kobit In real use case it was very useful to upgrade parts of the installation by replacing jars and reloading them using OSGi console. I supposed that this would be useful for developers and for larger companies wanting to fix issues or upgrade ie. gateways or custom components without restarting the Tigase XMPP Server. It was also useful for integration with other apps running on the same application server.

However, looking right now on the kinds of usage of the Tigase XMPP Server, I would say that while OSGi was useful it is getting harder and harder to keep this feature and what is more important, our users tend to integrate Tigase with non-java based software in which case usage of integration over XMPP or with use of HTTP API is a far better solution. Moreover, with the current trend to containerize everything it is better to integrate over HTTP API than with use of OSGi and usage of a few clusters nodes it is now simpler even for people using single machine, as they can just start the second container on the same machine and just change a route of a traffic to point to the new machine without any downtime.

So to sum up, I think that with Java9 modules, HTTP API, and containers being used more often, I do not thing that anyone would expect support for OSGi.

Artur Hefczyc commented 6 years ago

Ok, so what do you recommend we do? I can see following options:

We just postpone any work on OSGi for later time

We remove OSGi related code and dependencies

Any other option....

Andrzej Wójcik (Tigase) commented 6 years ago

I would suggest to postpone, but then we have a feature which does not work any longer and this may make a bad impression. If we are going to postpone then we should remove a feature to enable OSGi mode - just to be sure that nobody will try to enable it.

Alternatively we can remove it, but I would suggest to disable it for now and if nobody comes around asking about it in 8.0.0 or 8.1.x then in 8.3.x or 9.0.0 remove it permanently.

Artur Hefczyc commented 6 years ago

Ok, sounds like a good plan.

issue 1 of 1
Type
Task
Priority
Blocker
Assignee
RedmineID
1554
Version
tigase-server-8.1.0
Spent time
4h 30m
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/server-core#239
Please wait...
Page is in error, reload to recover