Live data from Hacker News

Redis: the AK-47 of databases

flazz.me

61–70 of 82 posts

Re: Redis: the AK-47 of databases

#61

Eek. Locking the entire data set to perform transactions? Isn't that so... MyISAM? Does rolling the transaction back work? The optimistic lock is not a great solution either: instead of deadlocking while waiting for a lock to be released, you are now stuck in a while (!saved) loop. Imagine two web pages trying to update the same resource at the same time. Also this part of the config: save 900 1 save 300 10 save 60 1…

Maybe not, but I found the docs in about 10 seconds. http://redis.io/topics/persistence

Warning, the documentation was not updated with the current behavior!

Now I clearly state in the doc that transactions are reflected also in the append only file, so there is no chance of partial reply.

Transactions are also applied to the master -> slave link, so also slaves will either have the full transaction or nothing.

Thanks to @garybernhardt on twitter for noticing this problem.

Re: Redis: the AK-47 of databases

#62

Earlier quoted context omitted.

If we're being pedantic, they use magazines, not clips :)

Actually, the words are interchangeable. You've heard of "Banana Clip" I'm sure. Clip is just slang for magazines, but the short word is for some reason associated with small magazines. The manuals all call them magazines - rifles or pistols.

My understanding of it (and wikipedia seems to back me up) is that the term 'clip' when used properly refers to the device used to assist in loading a magazine.

For example, you use a clip to load ammunition into the (internal) magazine of an M1, and you could use a clip to load ammunition into a "banana clip", which actually refers to a style of magazine.

Re: Redis: the AK-47 of databases

#63
post #44

Earlier quoted context omitted.

Ah, that makes sense. I imagine allowing atomic reads without WATCH would complicate the code quite a bit.

Indeed, not very Redis-ish :) With WATCH is very easy. WATCH this keys. Perform your reads. Prepare to write in a transaction. If at least one key was modified in the meantime the transaction will fail.

Salvatore, you do realize that now you need to put a Klashnikov on the new Redis logo? :p

Re: Redis: the AK-47 of databases

#64
"Pub/Sub is a unique and useful feature."

Pub/sub exists in a multitude of different pieces of software. ZeroMQ has a pub/sub feature. PostgreSQL has the NOTIFY/LISTEN command which is also a Pub/Sub channel allowing all those listening to be notified of certain events.

This is by no means unique to Redis. It is very useful, so I'll agree with that!

Re: Redis: the AK-47 of databases

#65
post #33

> In the spirit of full disclosure, I’m a newb to Redis. My > knowledge is basically the contents of this post (at the > time of writing). I don’t use it in production (yet). > Likewise I’m no expert in AK-47s (I’ve never even fired > one) or guns in general. I’m aware via notoriety alone. Fantastic quote. So you're hardly familiar with either component of your simile, but you'll post it anyway? I really don't expect…

It still has value according to the two-step HN algorithm of fact-finding.

step 1. Someone posts something (anything will do) on a blog

step 2. HN tears it apart and reconstitutes it with some decent approximation of truth and usually a fair bit of insight.

Basically, the source content is just the jumping off point. The blogs serve as a focal point for directing the HN hive's attention for a while.

You could post a story titled "Sarah Palin is more influential than the Pope but less influential than the iPhone" and fill it with lolcat pictures and still get an interesting discussion here.

Why? Because smart people are awesome.

Re: Redis: the AK-47 of databases

#66
In another comment, someone compared the PUB/SUB feature of Redis to ZeroMQ. Can the PUB/SUB feature of Redis function as a queue system for many common uses, or is there another significant difference that sets a full queue implementation apart? I ask because I am not particularly familiar with Redis, my queue usage has been fairly simple so far and I would enjoy simplifying my technology stack by combining the two if it makes sense.

Re: Redis: the AK-47 of databases

#67
post #10

The title randomly reminded me of the AK-47 quote from Lord of War (an actually decent Cage film, and definitely a good bit of monologue): Of all the weapons in the vast soviet arsenal, nothing was more profitable than Avtomat Kalashnikova model of 1947. More commonly known as the AK-47, or Kalashnikov. It's the world's most popular assault rifle. A weapon all fighters love. An elegantly simple 9 pound amalgamation o…

The largest chunk of export from Russia is oil and gas, not weapons.

Re: Redis: the AK-47 of databases

#68

Earlier quoted context omitted.

If we're being pedantic, they use magazines, not clips :)

Actually, the words are interchangeable. You've heard of "Banana Clip" I'm sure. Clip is just slang for magazines, but the short word is for some reason associated with small magazines. The manuals all call them magazines - rifles or pistols.

No, they are not interchangeable, and no, they do not mean the same thing.

Some nice illustrations I found: http://i.min.us/ie52d2.jpg http://i.min.us/icklUo.jpg

To any firearms enthusiast, hearing clip and magazine being confused is like hearing nails on a chalk board. Imagine someone at your work insisting that Java and Javascript are the same language.

Re: Redis: the AK-47 of databases

#69

Earlier quoted context omitted.

Actually, the words are interchangeable. You've heard of "Banana Clip" I'm sure. Clip is just slang for magazines, but the short word is for some reason associated with small magazines. The manuals all call them magazines - rifles or pistols.

My understanding of it (and wikipedia seems to back me up) is that the term 'clip' when used properly refers to the device used to assist in loading a magazine. For example, you use a clip to load ammunition into the (internal) magazine of an M1, and you could use a clip to load ammunition into a "banana clip", which actually refers to a style of magazine.

You're referring to "stripper clips" that were invented before guns had removable springed magazines. Those are a type of clip (and lead to the term), however the slang term clip doesn't refer to pistol magazines - it's merely slang for a magazine. It's a common misconception and what I was responding to.

In fact, the internal pistol magazine of a C96 pistol is still a magazine, but it loaded by a stripper clip, and some guns like the Japanese Type 3 are fed directly from stripper type clips - but those aren't "speedloaders" as the article suggests.(To juxtapose the concepts completely...)

http://en.wikipedia.org/wiki/Stripper_clip http://en.wikipedia.org/wiki/C96_pistol http://en.wikipedia.org/wiki/Type_3_Heavy_Machine_Gun

Re: Redis: the AK-47 of databases

#70
post #50
post #46

Earlier quoted context omitted.

How do the Chinese rifles compare? Are they similarly simple & resilient?

Yeah, pretty much. It's an extremely simple (albeit clever) design so there's only so much you can get wrong when you're copying it. Note that the Type 56 like most other AK knock-offs are really copies of the later AKM "improved" model, which was cheaper to manufacture. So comparing it to the original AK-47 is probably not fair. Then again there aren't many copies of the original model around anymore.

If I recall, the AK-47 had an interesting role in a trilogy of time traveling books.

http://en.wikipedia.org/wiki/Weapons_of_choice

In the books, a near future (near our present) naval task force accidentally travels back in time to WWII. The U.S. eager to get a leg up in the war asks the chrononauts to give them future tech. The only problem is that WWII American doesn't have the manufacturing technology to produce any of the current equipment. So the chrononauts dig through their archives and find plans for the AK-47, which, as it turns out, is manufacturable in early 1940's U.S. thereby giving the Americans a weapon from the future, but still old enough that they could be produced in bulk.

Post reply on HN