Here at adjust we use Redis as a fast in memory key-value data store. Today I want to show you how we are clustering Redis.
As adeven’s primary “tech support”, I’d like to discourage call-center connotations and phrases like “turn it off; turn it on again” from rolling off your tongue. We’re a lean, mean startup, and our internal tools for troubleshooting are called
Alright guys, as you all already know, Rails is dead or at least dying. It’s slow, it’s vulnerable and it does not scale, which is a huge disadvantage for your next gen social dating service with geolocation and badges. Today we will play rats abandoning a sinking ship of Ruby on Rails and learn how to handle a session created by a Rails application. I’m going to talk about web apps that use Rails 4.0.0 or greater, because even my grandmother can fake an authorization stored in a Base64 encoded cookie (and remember, if you don’t keep your app up-to-date, you will be eaten) very soon.
In my last article I talked about how redismq employs a simple Redis client to describe a message queue. The first iteration was aimed at proof of concept and to satisfy my own curiosity. Since then adeven decided to use it in production and so we developed the initial idea into a full featured queue.
On the way we picked up a lot of interesting stuff which I’d like to share with you.
Rport is an R package that greatly facilitates common tasks found in many R Business Intelligence apps. It bridges R and SQL analytics similarly to how Rails bridges Ruby and Web Development.
Understanding query locking is key to using postgres concurrently. So let’s look at an example to learn more about how locking works and how to see what’s going on within your database.
Golang is a young language that tries to make many things better than the “ancient” languages. It almost reaches the speed of C without the need of your own memory management. Also it respects modern patterns and makes writing concurrent programs easier than most other languages. But the strict model of Go has disadvantages when it comes to resolving third party dependencies and managing different branches of your Go project. Goem tries to fix this issues.
Redis is not just a very good in-memory database, it can also double as a message queue. I want to show you our first shot at implementing a queue in Redis that can fulfill all our requirements: reliable, persistent, fast, monitorable. While still being a Gedankenexperiment the basic idea should be a very good starting point.
When it comes to recurring billing there is a bewilderment of services available: Recurly.com, Chargify.com, Spreedly.com, CheddarGetter.com, and so on. Each has pros and cons, but our billing needs were a bit involved, and since we couldn’t find a service that seemed to be a perfect match we decided to create our own system, using Braintree as our credit card payment processor.
Full disclosure, it did end up being quite complicated, and for those with simpler needs it is certainly worth investigating any of the above - Braintree even has its own simple recurring billing system built in. However, we’ve now got a system we’re confident in, which is super easy to customize as our needs mature, over which we have full control, and which will never go out of business on us or suffer downtime or start charging us more or…you get the idea.
This isn’t so much a guide as a collection of stuff that we figured out along the way. It may be useful for you if you are considering taking the plunge yourself.
If you often write postgres functions you should be familiar with the STABLE and STRICT attributes to optimize them for the postgres query planer.