D
D
Dmitry2016-01-24 04:08:03
PHP
Dmitry, 2016-01-24 04:08:03

Application architecture c using pthreads extension for php?

Good afternoon, I need advice on the architecture of the application. The essence of the application is that it is necessary to process commands from telegram bots. A json string with data from a telegram with a specific command comes to php://input, each command is a separate class. commands can use the database. how to implement the "call interface" of these commands in the most profitable and correct way? And is it worth using pthreads here? Do you want to run each command class in a separate thread?
P.S. the number of bots from one to n, i.e., in principle, is not limited.
Thanks in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sumanai, 2016-01-24
@sumanai

If the number of bots is not limited, then, I'm afraid, PHP eats up all the memory for threads.
Asynchronous work would be suitable here, but in PHP this area is not very developed.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question