Projects tigase _server server-core Issues #1386
Tigase Server and Multiple Databases (#1386)
Unknown opened 5 years ago

Hi, below is sample from tigase administration guide,

dataSource {
    default () {
        uri = 'jdbc:mysql://db2.tigase/dbname?user&password'
    }
    'default-auth' () {
        uri = 'jdbc:mysql://db1.tigase/dbname?user&password'
    }
  }
userRepository {
    default () {}
}
authRepository {
    default () {
        cls = 'tigase.db.jdbc.TigaseCustomAuth'
        'data-source' = 'default-auth'
    }
}

what is the difference between default datasource and default-auth datasource? do they have the same tables, functions and procedures? or another saying, are they clonable structure to each other?

Unknown commented 5 years ago

what is the difference between default datasource and default-auth datasource?

In above example - they use completely different databases (db1.tigase vs db2.tigase)

do they have the same tables, functions and procedures? or another saying, are they clonable structure to each other?

They are mapped to AuthRepository and UserRepository and respective functionality defined in them. Now, depending on repository used, data structures may be different. In case of MySQL all structures would be effectively the same (tig_users, tig_nodes and tig_pairs being the basis). However, if you consider 'cloning' then you should just use single data-source for both UserRepository and AuthRepository:

dataSource {
    default () {
        uri = 'jdbc:mysql://db2.tigase/dbname?user&password'
    }
}
userRepository {
    default () {}
}
authRepository {
    default () {}
}
issue 1 of 1
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/server-core#1386
Please wait...
Page is in error, reload to recover