E
E
Evgeny Petrov2020-12-17 19:36:09
Node.js
Evgeny Petrov, 2020-12-17 19:36:09

Should You Use Node.js on a Payment Server?

Hello!

The task is to write a back-server for electronic payment in public transport. I know php, node.js, java (pure, I haven't studied Spring and haven't worked with it at all).
In what language would you recommend writing?
It’s not my soul to write in PHP, for the life of me))
Node.js - I would like to, but it stops the fact that with an uncaught exception, the server crashes entirely. Although there are tools that restart, but requests processed in parallel also break and the consequences are not yet fully known. After all, real money is at stake, so a server crash is not desirable. Didn't check, but in case of a crash, postgres + transactions must either roll back all queries to the database or make a payment.
Java - wrote some scripts in this language, small automations, worked with the file system, but no more. Spring has not been studied. But if the situation comes to the fact that it will be necessary to write only in java, then you will have to finish teaching.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
dkrylov, 2020-12-17
@dkrylov

Node.js - I would like to, but it stops that with an uncaught exception, the server crashes entirely.

1) So make sure that the exception is caught
2) So make a queue in the database with transactions, and so that the node gradually processes them from there, and records the processing status.
3) So lead logging to some event (transaction not processed, server restarted), so that in case of problems, be notified in time
PS What is PHP, what is NodeJS, what is Java, successfully cope with your task, if everything is designed correctly.

D
Developer, 2020-12-18
@samodum

Node.js - would like to, but stops the fact that with an uncaught exception, the server crashes entirely

This is the case in any normal language, this is the essence of exceptions.
Or would you like the server to continue to work for you when dividing by zero?
I sympathize with your customer that they contracted you for the task. I feel that you will write a holey sieve. Don't forget to link to your project

I
index0h, 2020-12-20
@index0h

In what language would you recommend writing?

Too little data. For such a project, you should have at least 20 pages of requirements only, I’m already silent about those. exercise.
Node.js - I would like to, but it stops that with an uncaught exception, the server crashes entirely.

If this is a problem - you don't know nodejs, don't use it.
Java - wrote some scripts in this language, small automations, worked with the file system, but no more.

You also don’t know the ecosystem of the language ...
The soul does not lie in PHP, for the life of me))

You don't really know the node, java isn't very good either, and you don't want php... It looks like you won't succeed at the moment.
I recommend to abandon this project.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question