igniterealtime/openfire-hazelcast-plugin

Move non-Hazelcast code to Openfire-core

guusdk opened this issue · 0 comments

The Hazelcast plugin has code that is not specific to Hazelcast. This code should be moved to Openfire itself, as that would make this plugin have less cruft, would allow for re-use of that code by other plugins (eg: future alternatives to a Hazelcast-based clustering solution) and, most significantly, would probably cause more / better code maintenance, as the code would then live in a project that sees more activity.

Or, as @GregDThomas put it:

There is lots of code in the Hazelcast plugin that deals with what happens when a sessions join/leave etc. etc. (package org.jivesoftware.openfire.plugin.session) and other misc stuff. (package org.jivesoftware.openfire.plugin.util.cluster). This code has nothing really to do with Hazelcast. Yes, it's to do with /clustering/, but it's not Hazelcast specific. It means the Hazelcast plugin is tightly coupled with what the core Openfire is doing. I've long thought that core Openfire should hold the classes to perform this functionality (e.g. tell remote nodes when a session starts) rather than the Hazelcast to swap-in its own "RemoteSessionLocator" etc.