wojciech.kapcia@tigase.net opened 1 decade ago
|
|||||||
Andrzej, I think this task makes most sense for you. But before you start working on this, please let me know what do you think about this. The functionality is not a "must have" stuff but could be very useful for systems like tigase.im where we have many vhosts and vhosts can be added all the time. Having vhost data in a separate database could be kind of a "paid add-on" we may offer. This way we could easily generate daily DB snapshots for selected vhosts and offer this as a kind of a backup to our customers. |
|||||||
%kobit I like this idea a lot. Maybe not this automatic DB creation part but storage of data for separate domains in separate databases. I've already added support for separate domains in separate databases for PubSub, MA, UA and MUC in 7.2.0. To implement feature we need to:
|
|||||||
Andrzej Wójcik wrote:
Yes, support for separate DB for a vhost was implemented for UserRepository long time ago and we do use it. However, right now, if we want to have a separate DB for a vhost this is all manual work, it requires a special entry in the init.properties configuration file, manually creating DB, loading schema, etc....
As far as I remember it all works correctly for the UserRepository and AuthRepository. Not sure about lower level like DataRepository and connectors for other components.
Yes, that's the main missing part. Instead of making this a global configuration option, it should be a vhost level configuration option (with global default). Then, when adding a new vhost we would have an option to provide a custom DB connection URI and then it would be stored in DB along with the rest of the VHost config options.
Yes, but it does not necessarily have to be a Tigase built-in functionality. It could be an external cron-job running periodically. Something like we have now for Redmine to create source code repository for newly created projects. When a new vhost is added that requires a dedicated DB, it could be in non-active state until the DB is created or something like this.
I think, we should make this one of the vhost configuration options. Add it to the vhost config forms so we could set it through the ad-hoc commands used to add/manage vhosts. However, this one option should be made somehow special. So we could restrict who can enable it when adding a new vhost. Currently, on the tigase.im service anybody can add new a vhost which is fine but I do not want the DB creation to be part of the public options. This should be kind of an admin stuff only, so we could enable it for a vhost as a special feature. |
|||||||
Artur Hefczyc wrote:
I agree. We can extend class which acts now as a replacement for I already added new feature to in new implementations of pools, so it is possible to force usage of separate database for particular domain in This can be turned on using single parameter in configuration so we only need this automatic registration of
OK, but we should not allow this after vhost is created. As we are not migrating data, right?
Yes, we can work on this to add this feature. However %wojtek will be working on better handing use cases with a lot of vhosts and I think we should work on this feature after he finishes his task. |
|||||||
OK, I am not up to date with current code. It worked somehow in earlier versions and it somehow works even right now (tigase.im). But the current implementation might be not optimal, especially in relation to the most recent server APIs and framework development. I am leaving this to the developer who will be working on the ticket (Wojciech from what I can see).
We can allow this after vhost is created but without data migration. The way I see it working is this: A user adds a new vhost on our service and then contacts us that he wants to pay for keeping his vhosts data in a separate database. Then we update the vhost configuration and somehow (automatically, semiautomatically or manually) create the DB. In most cases the new vhost will have no data or very little data so migration would not be an issue. If somebody would want data migration for long established vhost, then it would be kind of a special thing we would do.
Ok, so I am assigning this ticket to Wojciech. By the way. %wojtek could you please send me some information on: "%wojtek will be working on better handing use cases with a lot of vhosts"? I am very curious about this. |
|||||||
Artur Hefczyc wrote:
Most likely Andrzej was referring to #4693. |
|||||||
OK, this makes sense. |
|||||||
wojciech.kapcia@tigase.net batch edited 6 months ago
|
Type |
New Feature
|
Priority |
Blocker
|
Assignee | |
RedmineID |
1092
|
Version |
Candidate for next major release
|
Allow automatic creation of separate DB for entire VHost when adding subsequent domain to the installation.