To CouchDB or not?

Note. (I studied CouchDB for a while and need some valid experiences).

I have an Oracle database for the fleet tracking service, and some of them are:

  • 100 GB db
  • Huge insert / sec (our received messages)
  • Reliable replication (through Oracle threads on 4 servers)
  • Heavy complex queries.

Now the question is: can CouchDB be used in this case?

Note. Why did I think about CouchDB?

  • I read that the ability to scale horizontally is very good. This is very important in our case.
  • Since this scheme is free, we can process the changes more correctly, since we have many changes in different tables and stored procedures.

thanks

Edit I: I also need transactions. But I can put up with other decisions. And if there is a slight delay in replication, this is not a problem if it is guaranteed.

+6
source share
2 answers

The following functions are available in your database:

  • Using this in production
  • Data is naturally relational (related to itself)
  • Huge input speed (no problems MVCC)
  • Comprehensive Queries
  • Deals

These are all reasons not to switch to CouchDB.

Of course, the story is not so simple. I think you find that many people never learn: complex problems require complex solutions. We cannot just replace our database and skip the rest of the month. Of course, CouchDB (and BigCouch) supports excellent horizontal scaling (and replication using a cross-data center too!), But the cost will rewrite the production application. It is not right.

So where can CouchDB help you?

I suggest you start expanding your application with CouchDB applications. Deploy CouchDB, import your data into it, and create non-critical applications. See where it fits best.

For your project, these are the key benefits of CouchDB:

  • This is a small, simple tool that can be easily configured on a workstation or server.
  • This is a web server. It integrates very well with your infrastructure and security policies.
    • For example, if you have a flexible policy, simply install it on your local network.
    • If you have a strict network and firewall policy, you can configure it for a VPN or your SSL certificates
  • Using this step is now very easy to access. Just make http or http requests. Regardless of whether you are importing data from Oracle using a custom tool or using your web browser, anyway.
  • Yes! CouchDB is also an application server! It has a built-in administrative application for studying data, changing configurations, etc. (For example, built-in phpmyadmin). But for you, value will create admin applications and reports as simple, traditional HTML / Javascript / CSS applications. You can get it as fantasy or as simple as you like.
  • As your project grows and becomes valuable, you are in an excellent position to grow using replication
    • Or deploy a kernel with larger CouchDB clusters
    • Or copy your data and applications to different data centers or to individual workstations or mobile phones, etc. (The strategy will be more apparent when the time comes.)

CouchDB provides a simple web server and website. It provides you with a built-in web services API for your data. This simplifies the creation of web applications. Therefore, CouchDB seems ideal for expanding the main application, rather than replacing it.

+23
source

I do not agree with this answer.

I think CouchDB is particularly suitable for use in the case of a fleet, because of their distributed nature. Moreover, the unreliable nature of the gprs connections used to transmit location data makes the standalone couchapps first paradigm the ideal partner for your application.

For downloading data from a truck, insertion speed can have a huge advantage from heap replication and bulk insertions, especially if it is based on ssd couchdb hosting .

To upload data to a truck, couchdb provides filtered replication, allowing each truck to download only the data that it really needs, and not the entire database.

For complex queries, the NoSQL database is more flexible and can run much faster than relationship databases. This is just a matter of structuring and querying your data wisely.

0
source

Source: https://habr.com/ru/post/912208/


All Articles