F
F
Fragman2019-01-02 16:53:58
Node.js
Fragman, 2019-01-02 16:53:58

What to choose for the game: a separate nodejs server or laravel's ajax?

In my head there is a game for two players, something like chess, but much more difficult, where everyone has a certain time for a move and some of the opponent's actions must be displayed to the player.
The essence of the question is whether to make this game on a separate nodejs server, with client and server communication via socket.io, or to make client communication with ajax laravel (possibly broadcast). There is knowledge in both areas, the game site itself will be made on laravel.
Write the pros and cons of both methods, thanks in advance for the answer!

Answer the question

In order to leave comments, you need to log in

3 answer(s)
G
geektimer, 2019-01-03
@Fragman

As far as I understood, the question is: either nodejs+socket.io or php+laravel+ajax.
So you can also raise both laravel and nodejs, and so that it all works together with one base (redis).
Real time on ajax is better not to do.
See tutorials on how to make Lara friends with websockets:
https://youtu.be/2CrQgLQg5hE
https://youtu.be/tExUWmF6wNM
You can look towards meteor.js, everything will work out of the box (full stack js framework).
Or you can try something like firebase.

D
Dmitry Kuznetsov, 2019-01-02
@dima9595

I think it's better to make a separate nodejs server, so as not to interfere with the site's normal functioning.

I
Ivan Shumov, 2019-01-02
@inoise

Use what you know best

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question