I’m the guy who like to test. Benchmark is my… middle name. You can find dozens articles about speed one or other solution. I mean MongoDB and MySQL . I tried MongoDB couple times, and each time I wasn’t moved by it speed. Got project coming in, when I have to deal with large amount of concurrent connection. It’s not very big, but bigger then casual MySQL load.
So… how did I test – very dump way. Got 2 tables, one around 11k records, second one close to 200k record. Not much. Fields were indexed in both MySQL and MongoDB. And then i run benchmarks. First one had string fields, second one numeric.
Recompiling go language code during development is bit annoying task. But there is an package for that. Actually I found at least 3:
Exploring [The Go Language] is so much fun. Everything is brand new, and different then any other language. This time I’m going to show quick snippet which shows how to read JSON object with unknown structure, and map elements to something like hash table.
For a while i’m playing with
The Go Programming Language
– so far I loved it. I figure out that I’ll push some code snippets from time to time.
Today I spend some time creating simple not ever crawler, but website fetcher.
Idea is very simple – download page, run xpath query on it and spit out results. I was looking for decent xpath library for Go and couldn’t find any. I tried to use
but it sucks. I couldn’t even run queries like
id('product-details')/div[@class='product-price']" Then I found something nicer –
– which works pretty nicely, but – couldn’t find any examples except this
The only problem with running Gokogiri is that it uses
libxml2 which is not a huge problem on Linux based systems, but on Mac OS X you have to install it via
brew install libxml2