5 ms·
I'm thinking about doing a second post with some actual code (some parts may be specific to Python, Django, and Celery) if anyone is interested.
by bretthoerner 16y ago
I'm thinking about doing a second post with some actual code (some parts may be specific to Python, Django, and Celery) if anyone is interested.
- kenkam 16y agoYes please, I love reading posts like this... it makes me motivated to learn more about these software!
- apu 16y agoSure, although at least for me, these posts are most useful for: 1. showing the different kinds of applications people are using redis for; 2. as individual anecdotes that are slowly-but-surely adding up to real data.
- bretthoerner 16y agoAgreed, those are the same reasons I was happy to see the posts that came well before mine. People that know me well know I will poke holes in everything. We didn't decide on Redis (over tried and true PostgreSQL) for nothing. (We have also used and do use other NoSQL when truly applicable.) I love seeing smart use cases for new DBs.
- moeffju 16y agoI'm definitely interested. Also, out of curiosity, what do you use to render the actual charts? I'm working on an analytics package and can't decide on a charting engine that is clientside and reasonably performant.
- bretthoerner 16y agoA mixture of (mostly) Flot with a touch of Raphael. I am but a lowly backend developer, I'll try to get my colleague dz to comment on the hows and whys.
- thedz 16y agoWe went through several different iterations of the line charts. Initially, I tried using SVG via Raphael, but it turned out to be too slow. Because it's possible to have a significant number of data points, manipulating and changing the SVG markup was causing too much of a it. Eventually we settled on using Flot, which is a canvas-based charting solution. We made some changes to the core Flot code with some plugins to do things like change line color and fill on hover, but overall vanilla Flot served 90% of our needs. Because Canvas is essentially a bitmap, number of data points have much less impact on the drawing layer. Of note, we still use Raphael for pie charts, because, well, they look better and aren't affected by mass data point numbers.
- moeffju 16y agoThanks for the info! flot is what I settled on, too, but performance with a lot of datapoints was not so great. Maybe it was just too much data. Also, the timeline view was really annoying, but JS' Date function are to blame for that. But with Flash out of the question and Raphael even slower, I suppose it's the best option for now.
- thedz 16y agoHow many datapoints are you using? One things that I've done (though in the end, we didn't need it realistically) was use a resolution function to tune the datapoints to fit the canvas width. If your canvas is only, say, 400 pixels wide, then any time series datapoints more then 400 will get lost -- there's simply not enough pixels to display them accurately. As such, you can use a resolution function to reduce that down to 400.
- moeffju 16y agoI have way more; I downsample to temporary mongodb collections and display the closest resolution for the available width. I also found it hard to decide on a resolution function for analytics. Do we show the maximum of a time range? The average? Median? Min and max?
- scottbessler 16y agoThis was a great write up. Redis and the community would benefit from having more writeups like this, detailing different successful real world ways to use it. One can read the Redis documentation and imagine many uses for its different data structures and commands, but to read about tried-and-working practices is fantastic. Of particular use, in my opinion, is seeing key naming/organization schemes that people are using effectively. I personally would love to see the code for these and other use cases.
- slillibri 16y agoHere is a blog post (not mine) that I keep returning to that contains a pile of links to different Redis uses/use cases. http://www.paperplanes.de/2010/2/16/a_collection_of_redis_use_cases.html http://www.paperplanes.de/2010/2/16/a_collection_of_redis_us...
- SriniK 16y agoWhat python client are you using? I have been mentioned few times about the performance. If I remember, guys at bump did their own client in different language.
- wpeterson 16y agoDefinitely interested in both code and your Redis config files.