Wednesday, July 17, 2013

Bagarino: what is it good for?

Tickets Have I ever told you about bagarino, a ticketing system I created?
Last time I wrote some code for it I added multi-CPU support to its existing nodejs-, expressjs-powered core.
It uses Redis as its backend store and sports some simple Javascript code I wrote during a few sleepless nights.

But, "what is it good for?"
Well, let's pretend you want to grant, secure and govern access to a certain content one of your users rented/bought/subscribed-to/won on your system (e.g. a game item, or a picture, an illustration, a book or even an entire movie hosted on a CDN).

You may need to establish how many times (or how long) that good can be accessed by that user.
You may also need to enforce these rules in a simple, predictable manner.

Unique, alphanumerical, tickets that "mark" your content come to the rescue.
And bagarino allows you to manage them using different policies that establish when exactly a ticket expires.
Some of these policies are as simple as time-based counters. Some of them are a bit more complicated (but not too much, don't worry).

Give it a try and let me know.

... By the way, after "what is it good for?" I hope you didn't jump right to the "absolutely nothing" line ;-)


Photo courtesy of Sam Howzit

No comments:

Post a Comment