I look through my code and understand that I spend a huge amount of time
- taking rows from a database,
- formatting as XML,
- AJAX GET for the browser and then
- converting back to a hashed javascript object as my local data store.
In updates, I have to change the process (except for using POST instead of XML.)
Having just looked at Redis, I think I can save a huge amount of time storing objects in the keystore on the server and just use JSON to directly transfer the JS client. But my weak mind cannot foresee that I give up leaving SQL DB (that is, I am afraid to refuse GROUP BY / HAVING queries)
According to my data, I:
- many, many relationships, i.e. obj tags, obj groups, etc.
- request objects by a combination of such, i.e. WHERE tag IN ('a', 'b', 'c') AND group in ('x', 'y')
- self joins i.e. ALL tags for each object WHERE tag = 'a' (sql group_concat ())
- many external associations, i.e. OUTER JOIN ON rating o.id = rating.obj_id
- and channels that seem to be a strong point in REDIS
How do you successfully combine key values and SQL databases?
For example, it is advisable to join a large list of obj.Ids from the REDIS set with SQL data using the SQL RANGE query (i.e. WHERE obj.id IN (1,4,6,7,8,34,876,9879), 567, 345 ,...) or vice versa?
Ideas / suggestions are welcome.
source
share