Russian  English  All projects

Revision of the backend in php



There is a self-written backend in php (php-di, fast-route, aura sqlquery), responsible for receiving incoming GET requests, processing them, generating a pdf document, uploading a pdf to a third-party cloud, interacting with a third-party mysql database and interacting with the api of the mailing service.

Currently, when an incoming GET request, the above actions are performed in stages, but if the external api is unavailable, or if the external database server is unavailable, the process hangs and does not complete until the end. There are also various small improvements that I would like to make.

You need to do:
1. Catch errors throughout the code, so that all emergency situations are caught, processed and recorded in the log.
2. Review the code for the presence of critical errors, make a list of them, give recommendations for their correction and correct them.
3. Divide the basic logic of the script into separate processes, so that the script works out the processing, formation of pdf, uploading to the cloud and writing to the database immediately and gives a response without waiting for a response from the api of the mailing service.
4. Make a simple admin panel on bootstrap with authentication to view logs.
5. Make a page with a log of all incoming GET requests (sorted by date, when entering the page, the current day and logs for the current day are displayed), if any incoming request has not been processed, mark it, specify the reason, form a button that will perform an unfulfilled action (the mysql server did not respond - send the request to the database again, did not respond to the api of the mailing service - send the request by api again, not answered by any cloud - upload pdf to cloud and add entry to database etc)
6. If one cloud is unavailable, automatically upload pdf to another cloud.
7. Add legitimacy check of the incoming GET request (secret string reconciliation)
8. 1 GET request - write/update in 1 database depending on the value passed. Now, when the script is executed, there is a connection to 2 servers to 5 different databases at once. If one of the servers is unavailable, the script also does not work, you need to look at this point and, if possible, fix it.
9. I want to duplicate all records/updates in the database in the backup databases on other servers, but so that they are performed in parallel and their execution does not affect the work of the main processes.
10. Screw the sending of all error logs to your personal telegram.

Please respond only if you have already faced such tasks and can advise on your experience and competently implement the necessary changes.

Please estimate approximately (-) the value of these works under the current TOR and indicate it in the response.
I will see the responses in 2-3 days, thanks in advance!
12.11.2022 18:13



 Answers freelancers