Projects tigase _server server-core Issues #359
Improve Repository API (#359)
Andrzej Wójcik (Tigase) opened 1 decade ago
Due Date
2014-08-15

Right now whole repository API uses classes which are declared in tigase-server.jar and while in normal mode it is possible to use additional classes from separate jars in OSGi mode it is impossible.

We need to improve this API to make it possible to allow registration of additional classes and ability to detect correct default implementation if we have passed only URI. This is important as we want to introduce MongoDB support which should be kept as external jar to make it easier to improve and update separatly and not to introduce additional dependecies.

Moreover we need this autodetection as repositories other than UserRepository,AuthRepository,DataRepository are existing in current codebase and we need to make them replacable with MongoDB alternatives just by having URI, so it is important to have automatic selection of implementation of Repository based on supported URI.

Andrzej Wójcik (Tigase) commented 1 decade ago

Right now autodetection of repository based on supported URI is implemented by addition of annotation to every Repository implementation which will contain information about supported storage URIs. I also added basic interface for every implementation of Repository so we now have one common interface for every repository, I hope that we would change implementations of repositories for MUC, PubSub, MessageArchiving and other to implement this interface as well so we could use RepositoryFactory to do autoselection of repository implementation for them.

Right now autodection might be done for every class with implements Repository interface (all classes in Tigase XMPP Server jar are found on start of server due to analysis and use of reflection, but in OSGi mode they need to be registered in ModulesManagerImpl (similar to how components and plugins are already registered, ie. in PubSub project).

issue 1 of 1
Type
Task
Priority
Normal
Assignee
RedmineID
2173
Version
tigase-server-7.0.0
Estimation
6h
Spent time
48h
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/server-core#359
Please wait...
Page is in error, reload to recover