H
H
helloris2017-11-18 17:22:02
SQL
helloris, 2017-11-18 17:22:02

What base to choose for a real-time web application on Node.JS?

I am creating an application in which the data is constantly updated and they need to be quickly output to the client via websocket.
For these purposes, you need a DBMS that meets the following criteria:

  • Preferably be relational and have SQL/SQL-like syntax
  • The database must be on its own linux server
  • Have transactions
  • Have replications (desirable)
  • Driver for Node.JS

Answer the question

In order to leave comments, you need to log in

3 answer(s)
#
#, 2017-11-23
@helloris

and real-time with what load? if high-load is, by definition, not a stand-alone server.
if completely free, a lot of information, and rich functionality - https://www.postgresql.org/ - enterprise level, really resists both ms and oracle
if everything is in "one bottle" - https://www.arangodb.com/ - it is more interesting because in tabular analytics they promise a performance slightly inferior to postgre, for a document model the speed is at the mongdb level, as a bonus they go - a graph model (brain removal or analyst happiness), own multi-threaded node fork in the core, well, in the sense of direct access to data, triggers. .. yes, read it yourself already))) SQL-like + ACID + clustering - no problem
if you need it very quickly (- then let's run! .. from a joke) -https://clickhouse.yandex/ is very fast for SQL-like, but there are already nuances in syntax (someone will be more pleasant because the functions are similar to js), clustering, but they don’t write about ACID, well, or I haven’t seen .. )))
in all variants socket/pushing is a smut of the web application itself and not of the database, let me just remind you that Arang has a ready-made https://www.arangodb.com/why-arangodb/foxx/
well, from the !sql world, you probably need everything take a look at https://www.rethinkdb.com/
google, wiki at your service .. and even an article on habré https://sohabr.net/habr/post/321380/
noskuality/documentation is both speed and ease of development, and for your case, auto-notification of the client "out of the box" ... but raking up noskull bases after a year, another successful work, then another occupation is a general trend in that a project that has usually taken off is forced correspond to a full-fledged school, regardless of the cost of development, or the cost of hardware / cloud
PS read the comments above ...
in general, the rethinkdb feature is unique, if you have already gotten to it, the question is strange ...
You write a 3-link web application without options
as the basis of server logic for .net, you will use SignalR
in pure Linux - node and npm are at your service,
but instead of "everything in the world" smoke ArangoDB

A
Alexander Taratin, 2017-11-18
@Taraflex

Any sql.
Even mssql now works on linux. https://www.microsoft.com/en-us/sql-server/sql-ser...

B
Boris Korobkov, 2017-11-18
@BorisKorobkov

I would like that when changes are made to the data, the DBMS sends these changes to subscribers (in the application), and they, in turn, can, for example, send the actual data to the client.

Option 1: when changing data, use a database trigger to write to a separate table, from which every N seconds to read data using Node.js and then send it out.
Option 2: then, the application that modifies the database, after commit, duplicates this data in rabbitmq and subscribers already send it out.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question