igniterealtime / openfire-hazelcast-plugin

Adds support for running multiple redundant Openfire servers together in a cluster
10 stars 13 forks source link

Move non-Hazelcast code to Openfire-core #50

Closed guusdk closed 2 years ago

guusdk commented 4 years ago

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.