Answer the question
In order to leave comments, you need to log in
How to execute Go code in PHP?
Is it possible to "cross" Go with PHP?
What would the main code be in PHP, and rewrite some of its parts in Go. (such as uploading files to the server, working with the database, and maybe something else)
How can this be done? (if possible)
Answer the question
In order to leave comments, you need to log in
such as uploading files to the server, working with the database, and maybe something else
I don't know what the hard stuff is. Are they at least designed as background tasks for you? Heavy tasks are those that heavily use server resources (CPU, I/O, network) or take longer than the user would like to wait.
Heavy queries include pre/post-processing of any data, generation of reports for business analytics, i.e. operations that can be performed without the user waiting for a response.
Usually they are taken out to the queue handler (Gearman, Beanstalk, ZeroMQ, RabbitMQ, ...). And the queue worker can be written in any language, if, say, the MsgPack protocol is used. Tarantool with built-in Lua language can also be used, as well as Redis as queue data stores.
That is, this is a transition from a monolithic application to microservices.
For example, configure nginx to process some of the addresses through php, and others through go.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question