D
D
draftmax2014-04-18 12:30:42
PHP
draftmax, 2014-04-18 12:30:42

What to use nginx, php-fpm or c++ to develop a web server oriented application?

The task is to develop software that will be installed to the client on a server and the entire office will have access to the interface through a browser.
After analyzing the solutions, we came up with 2 ways:
1) Using the stack: nginx, php-fpm
In fact, a web portal will be developed that will be installed to the client on the server, but there are questions about the safety of the program code and updating the application, it turns out that it will be difficult to make an auto-updater and you will have to go to the client's office every time to update.
2) Development of an independent application in C++ based on https://code.google.com/p/mongoose/ or https://github.com/splunk/pion
Who has already faced such tasks, what are the pros and cons of both solutions?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
O
OrmaJever, 2014-04-18
@OrmaJever

In my opinion, the pros and cons of both solutions are obvious
1) Ease of writing. PHP is faster and easier to write.
2) Code transfer. The plus code for different servers may need to be recompiled, while the php code depends only on the version of its interpreter.
3) The speed of work. php can not be compared in any way in this parameter in pluses.
Conclusions: if the load is not large, then obviously you should not bother with the pluses and write everything in php.

B
begemot_nn, 2014-04-18
@begemot_nn

consider, in addition to these two polar options, two more intermediate
ones 1. NodeJs
2. GOlang
both languages ​​implement the http server themselves, the application can come in the form of one monolithic file, in the case of GO it can even be compiled and issued as a binary.

A
Alexander, 2014-04-24
@akalend

regarding deployment in PHP:
1) distribute the application as a phar package file
2) make a service WEB page that will perform remote installation of the application:
- create the version_num directory
- write your application my_proga.phar into it
- switch the link from version_num_old to version_num
as Another option is to raise the test.webapp virtual host, switching hosts can be done with symlinks.
3) your actions from home/office:
- set a new version number in the service interface
- upload a new file my_proga.phar
- press the install button, for the first run
- check how it went up on the test host
- press the deploy button to switch the link to the main host
- and see how everything is fine on the main host

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question