A
A
Alexey Sumin2017-08-17 17:12:15
PHP
Alexey Sumin, 2017-08-17 17:12:15

Go or PHP how does the language affect application deployment?

Imagine that there is a large complex web application, such as Jenkins, which, in addition to processing http requests, also contains some background processes. The application should be installed on the user's side in the simplest way (ideally via a Debian package), i.e. the user will install it himself.
In which language is it better to do this PHP or GO (you can offer another option with justification)?
I now see it in this context:
Pros for GO:
1) It seems to be easier to install: compiled, launched the daemon and that's it - it launches background processes through goroutines in itself, and responds to http requests, incl. and gives statics, while the data through the channels inside the demon can be safely driven. In PHP, you will have to drag the entire PHP-FPM + NGINX bundle at once, plus write in the crown all the scripts that you need to run in the background.
2) It is easier to manage dependencies: I compiled specific extensions of the required versions into my program - and it does not interfere with others. In PHP, if something is already running on the same machine, there may be conflicts with versions, unavailable extensions, and so on.
3) Productivity and economical use of resources.
Cons GO:
1) The community is smaller than PHP.
2) The language is poor compared to PHP, it is difficult to implement complex business logic.
What do you advise?
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

8 answer(s)
L
Leonid Nikolaev, 2017-08-17
@nikonor

The language is poor compared to PHP, it is difficult to implement complex business logic.

It was good, honestly :-)_

A
Alexander Aksentiev, 2017-08-17
@Sanasol

2) The language is poor compared to PHP, it is difficult to implement complex business logic.
it is more low-level, not poor. The standard library is poor, but you can do a lot more with it than with php.
in any demon looking at the network, you need to install nginx, some haproxy and all that.
You can’t just take and hang a demon to listen to everything that came to him. You can’t just do balancing on several servers, and so on.
Nginx knows how to do this better and is made for this.
So if you are not going to put nginx in front of the site on go, then it is very in vain.
it is 99% dependent on the code, not the programming language.
No one will install php software as a package, it's pointless.
There is a composer, github, etc. for this.
Putting a go package is also a big question, I don’t know how painful it is to get into the official repos, but I think it’s not easy. So you have to install from the same git and compile it yourself.
As a result, the installation for a not very smart user in both cases is quite hemorrhoids.

A
Alexander Novikov, 2017-08-17
@AlexndrNovikov

You can get around the problems you mentioned with PHP by distributing it in a docker. Then all dependencies, bundles and background processes will be encapsulated, and running with the correct Dockerfile will be reduced to a single command.

P
Philipp, 2017-08-17
@zoonman

The language does not affect the deployment of the application in any way. Dependencies are affected.
For example, if you are going to create a Debian package, then you will have to write dependencies on other packages one way or another. If some package is already installed, then there is no problem.
Writing to cron or creating a vhost for Nginx is a trivial task and should not confuse you. These are standard things, like setting up log rotation or time synchronization on the server.
Like Go, PHP can also be compiled into a single . For example, this is how Composer works.
The only advantage of Go is the ability to get a ready-made executable file without access to the sources. If PHP needs an obfuscator or something , then Go is just an executable and period.

A
Alexander Kramov, 2017-08-17
@nexmean

Go, Node.js, Rust, C#, whatever is better for this task than PHP.

G
g00dv1n, 2017-08-17
@g00dv1n

PHP + Laravel = profit

N
Nikita, 2017-08-17
@bitver

Doesn't affect at all.
Write in Fortran.

B
beduin01, 2018-06-08
@beduin01

Go is not simple, it's primitive. This is actually a stump of the language. The creators of Go did not master all the developments in the field of building languages ​​and created something stupid and primitive. Naturally, on projects more difficult than Hello World, you will have to bike wildly. in adult programming languages, all these issues have long been resolved.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question