Projects tigase _server server-core Issues #1484
Tig_Pairs Roadmap (#1484)
Unknown opened 2 years ago

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.

  1. Regarding "tig_pairs", are there any data model or performance-related changes in the roadmap?
  2. Why haven't "tig_pairs" and roster management been included in the MongoDB implementation? Are there any obstacles?

Thanks,

Unknown commented 2 years ago

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 what tig_pairs strives to achieve, ie. tree-like data structure for user data.

Unknown commented 2 years ago

Thanks @woj-tek. If tig_pairs is included in MongoDB, to get the best of it, naturally pval 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?

Unknown commented 2 years ago

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-L629

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

issue 1 of 1
Type
Question
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/server-core#1484
Please wait...
Page is in error, reload to recover