Project

General

Profile

Task #2173

Improve Repository API

Added by Andrzej Wójcik Tigase team member almost 4 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Normal
Target version:
Start date:
2014-08-09
Due date:
2014-08-16
% Done:

100%

Estimated time:
6.00 h
Database:
n/a
Additional charges approved:
No

Description

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.


Related issues

Related to Tigase XMPP Server - Feature #1057: MongoDB supportClosed2013-02-122014-08-16

Associated revisions

Revision 7842ba30 (diff)
Added by Andrzej Wójcik Tigase team member almost 4 years ago

Issue #2173 - Improved API for RepositoryFactory, created basic interface for all Repository implementations and implemented autodetection of default repository implementation based on supplied URI

Revision f3d9a067 (diff)
Added by Andrzej Wójcik Tigase team member almost 4 years ago

Issue #2173 - Improved API of RepositoryFactory

Revision 65cb8f64 (diff)
Added by Andrzej Wójcik Tigase team member almost 4 years ago

Issue #2173 - changed API to make it compatible with improved API for repositories

Revision 17fba493 (diff)
Added by Andrzej Wójcik Tigase team member almost 4 years ago

Issue #2173 - changed API to make it compatible with improved API for repositories

History

#1 Updated by Andrzej Wójcik Tigase team member almost 4 years ago

#2 Updated by Andrzej Wójcik Tigase team member almost 4 years ago

  • Due date set to 2014-08-16
  • Status changed from New to In QA
  • Estimated time set to 6.00 h

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).

#3 Updated by Andrzej Wójcik Tigase team member almost 4 years ago

  • % Done changed from 0 to 100

#4 Avatar?id=6023&size=24x24 Updated by Artur Hefczyc Tigase team member almost 4 years ago

  • Status changed from In QA to Closed

Also available in: Atom PDF