-
Regarding "tig_pairs", are there any data model or performance-related changes in the roadmap?
No, there are not changes planned on
tig_pairs
schema.Why haven't "tig_pairs" and roster management been included in the MongoDB implementation? Are there any obstacles?
MongoDB is document oriented database and operates differently thus there wasn't need for
tig_pairs
schema - roster is simply a document within user so, in a way, MongoDB has "native" support of whattig_pairs
strives to achieve, ie. tree-like data structure for user data. -
Thanks @woj-tek. If
tig_pairs
is included in MongoDB, to get the best of it, naturallypval
should be converted from XML to JSON. If we use roster values as an example. We would get better query capabilities.Do you see any particular reason to prefer XML over JSON while working with MongoDB?
-
This is an aftermath of the currently used API, for example
tigase.db.UserRepository#setData(tigase.xmpp.jid.BareJID, java.lang.String, java.lang.String, java.lang.String)
- as you can see the last value is simply a String and roster is passed as such: https://github.com/tigase/tigase-server/blob/913cf6c4b8feae68b430315dcab986ee5efdee06/src/main/java/tigase/xmpp/impl/roster/RosterFlat.java#L629-L629In theory, we could change MongoDB implementation: https://github.com/tigase/tigase-mongodb/blob/e67af1c984e77d42aa655f959580fecc7d494d15/src/main/java/tigase/mongodb/MongoRepository.java#L566-L581 And convert XML to JSON (native to MongoDB) but... general UserRepository doesn't specify that
pval
is XML and can be just simple string value (eg.:this is a pval
).
Hi,
We are trying to evaluate if the "tig_pairs" table can satisfy the performance needs of a highly loaded application with millions of users.
Considering data size gets bigger, MongoDB integration is a promising option over relational databases. However, Tigase MongoDB integration doesn't have "tig_pairs" and roster management implementations.
Thanks,