把資料匯入CouchDB-java、Ruby、Erlang三種方法

jieforest發表於2012-10-17
Working recently with CouchDB I become interested on how to import existing data into the database quickly.

The CouchDB is written in Erlang so the first thing which came to my mind was to use that language for the job, but to find out if it runs ‘quickly’ or not, I had to compare it with some other languages/libraries.

The natural choice was Java of course ( I consider it my ‘native’ language   ), on top of that I added another test with Ruby as I had my first steps with CouchDB using that language (that’s because of the ‘Seven Databases in Seven Weeks‘ book).

So, what I’m trying to do: Import the large xml file into the CouchDB as quickly as possible. I have usedJamendo data dump as in my previous tutorial about parsing the XML with Woodstox library.

As the Jamendo data dump XML file is quite large I’m using stream parsing in all three approaches (Java, Ruby and Erlang)


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/301743/viewspace-746607/,如需轉載,請註明出處,否則將追究法律責任。

相關文章