2

I'm currently working on a mobile app alike Google Maps or Wave, but also including parking. The application its running with MySQL primarily. With at this stage most of our data is loaded by python scripts.

In the desire of having real time data we have been learning about Redis as an option to leverage the publish and subscribe capabilities.

Although, after going through the web there is something still not clear, if we are loading data from python scripts would be required to write for each record into Redis AND MySQL at the same time? or what would be a good choice.

I look to permanently store each record, but for most queries its required to have latest updates, and somehow avoid so much polling.

                       Redis
                     /  
New Record  Python ->   
                     \ 
                      MySQL


Is this a good practice?
  • Have you already determined that MySQL is not fast enough to be the sole backend? In other words, are you "over-engineering"? I recommend you implement with one backend – Rick James Apr 11 '16 at 19:27
  • You should also take cost into consideration because storing every record in redis may require lots of memory since its in-memory data structure store. It may be a good choice to keep a small portion of your data into redis(caching) to access it in efficient time. – Astro Apr 12 '16 at 12:32
  • Well, there are some queries which are being slow by the need of multiple joins. I have already normalized but its kind of getting messy maybe. I think caching some portions would be very great as Astro comments, so in this sense, I could keep the heavy parts into Redis only. Would that be fine? Appreciate your responses – Jose Apr 12 '16 at 21:06
  • @Jose why did you mean by heavy parts? – Astro Apr 14 '16 at 5:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.