11

I'm working on an application that I'm going to write with C and i am considering to use a nosql db for storing timeseries data with at most 8 or 9 fields. But in every 5 minutes there will huge write operations such as 2-10 million rows and then there will be reads(but performance is not as crucial in read as in the write operation).

I'm considering to use a NoSQL db here in order to store the data but couldn't decide on which one to use. Couchdb seems to have a stable driver called pillowtalk for C; but Mongo's driver doesn't look as promising as pillowtalk. I'm also open to other suggestions.

What is your recommendation?

Community
  • 1
  • 1
systemsfault
  • 15,207
  • 12
  • 59
  • 66

4 Answers4

7

For crazy performance contraints you can't beat Tokyo Cabinet: http://fallabs.com/tokyocabinet/

There is also a server component called Tokyo Tyrant which looks really cool.

Audrius Meškauskas
  • 20,936
  • 12
  • 75
  • 93
jckdnk111
  • 2,280
  • 5
  • 33
  • 43
  • Does it have a C api and can you provide me some benchmark info related to this. – systemsfault Jan 26 '10 at 15:14
  • It's written in C and has an excellent API. You can read the benchmarks here: http://1978th.net/tokyocabinet/benchmark.pdf – jckdnk111 Jan 26 '10 at 15:25
  • wow results are pretty awesome, i'm currently testing tokyo cabinet. Also from the document you have sent cdb's performance looks appealing too. What are the major benefits of tokyodb over cdb? – systemsfault Jan 27 '10 at 09:28
  • 1
    I prefer TC because it is maintained, has full-text search extensions, and has excellent packages for other languages. If these things aren't that important then cdb might be a viable alternative (I've not actually used it so I can't say how it stacks up against TC in the real world). Good Luck! – jckdnk111 Jan 27 '10 at 20:28
  • The link provided above is broken. The project appears to have been moved to http://fallabs.com/tokyocabinet/ . Also, it does not appear to have a C or C++ API – HNL Nov 17 '11 at 04:56
  • http://fallabs.com/kyotocabinet/api/ – jckdnk111 Nov 21 '11 at 23:53
5

MongoDB works great with C - there is both a C driver and a C++ driver. The database uses the C++ driver itself for functions like replication (MongoDB is written in C++).

http://www.mongodb.org/display/DOCS/Drivers

dm.
  • 1,982
  • 12
  • 7
1

Does your project want to support some form of offline data? If so you should probably go with CouchDB since the replication model is designed to support offline data changes and sync.

mikeal
  • 4,037
  • 2
  • 27
  • 22
  • yes actually it supports offline data. but couchdb is pretty slow when compared to other options. – systemsfault Jan 27 '10 at 09:30
  • 2
    i know of couchdb databases with many terabytes and lots of indexes running plenty fast for lots of concurrent users. most of the MongoDB benchmarks (for writes) are a little misleading since insert() calls in MongoDB don't return a response and aren't guaranteed to be written to disc or even accessible. MongoDB write benchmarks seem to mostly test socket.write() times :) – mikeal Jan 29 '10 at 20:05
0

What about Sqlite? The site is here. The front end to edit/manage the sqlite database is sqliteman.

Hope this helps.

Alexander
  • 23,432
  • 11
  • 63
  • 73
t0mm13b
  • 34,087
  • 8
  • 78
  • 110
  • yeah i know about sqllite and bdb. But i'm not sure if rdbms will fit into my case. Because my major purpose here is to archive the data. I will not perform complex queries. also the vertical scalability of couchdb also look appealing. But this option that you have mentioned is still in my mind. – systemsfault Jan 26 '10 at 15:12
  • @holydiver: look in here...at the other SO question...http://stackoverflow.com/questions/417917/alternatives-to-sqlite – t0mm13b Jan 26 '10 at 15:23