Wednesday, October 31, 2012

Pretty URL with Short IDs with CouchBase

Another question regarding CouchBase. From my understanding, when you add a new document with the 'ADD' command, if the document has a key which already presence in the bucket, the insertion will fail. This can be useful because I don't want to use GUID for some of my documents because they result in very long URLs, so with that enforcement, you can actually create a ID generator that will generate shorter IDs. If their is a collision, the insertion will fail and you can regenerate another ID and so on, until success.


The only reason I think it' not such a good idea, if you are using a multi-cluster solution, you might get duplicate IDs (like a cluster in Europe and second in the US). I still can get answer about this. I prefer using pretty URLs by generating shorter IDs.

The problem is that it's hard to get answers online from everything that is CouchBase related. It leads me spending hours and even days trying to find answers to problems. That's by itself can be a deal breaker for some. Their solution is great, but what about those developers who want to try the product and have tons of questions?! (just a tip for the guys in couchbase - it can really help). With MongoDB I get answers in a few minutes max. I first thought that it doesn't matter, but now that I have a lot of questions and I'm stuck, you can really feel that money draining out of your pockets even without being online in production.

No comments:

Post a Comment