1

I have some hardware instruments each one recording a signal and generating sequences of timestamp/value pairs. Timestamp is a basic UTC posix time and value is a double.

I'd like to record such pairs in a database for later retrieval. Because we want to scale up across multiple servers we ruled out relational databases and opted out for a NoSQL solution.

The core usecase will be to retrieve a set of values from a given time period (starttime, endtime).

Is ElasticSearch a good solution? What about MongoDB?

Colin 't Hart
  • 9,455
  • 15
  • 36
  • 44

2 Answers2

4

For your use case of key-value data, where the value is simple, MongoDB is more than you need. It is a document-oriented data store for complex value types. A specific key-value store would suit your needs. RIAK is the one I've looked at though several others exist.

Since your retrieval will be by time range i.e. key range, Elastic's full-text capabilities will, again, be overhead for which you have no payback.

You don't say what your scale out requirement is, whether local write and global read or full replication of the whole data set etc. Several relational engines offer distributed features. MariaDB has Galera, for example. SQL Server has distributed, partitioned views. Other popular systems can afford similar capabilities. NeoDB is relational and multi-host by design. The relational model is based on theoretically sound principles and has decades of industry development. You would be doing yourself a disservice by discounting it out of hand.

And your data does have structure, even if it is a simple structure. You have a primary key (device & time) and a functionally dependent attribte. Whether you define this declaratively in a schema or implicitly in your program's data structures, it still exists.

Michael Green
  • 25,255
  • 13
  • 54
  • 100
0

Elasticsearch is nice to use, any solution will have unneeded features.

But why not this for a persistent key value storage solution http://rocksdb.org/

NimChimpsky
  • 394
  • 3
  • 10