A
A
Alex Raven2020-09-20 06:07:36
API
Alex Raven, 2020-09-20 06:07:36

In what language is it best to make a backend for an API?

Hello. There was a need to make an API to the database of a volunteer project for the placement of animals from shelters. In fact, it will be an analogue of the Petfinder.com API. Only Petfinder works exclusively in North America, while our project will work worldwide. This is a REST API that returns results in JSON. The data is stored in MySQL. The frontend is written in PHP.

The functionality that the API should serve:
search - search for an animal by parameters, for example: type - type of animal (for example, dog, cat), breed (british short hair)
get_animal_types - get a list of animals and breeds available for searching
get_animal_details - get detailed information about a specific animal by its id in the database.

Etc.

Sample response search:
"name": "Ball"
"breed": "other"
"type": "dog"
"age": "adult"
...

Now the question is in which language to implement the API. The main requirement is the minimum load on the server and the fastest possible response. So far, we are considering options: PHP (the easiest for us), Node.js, Python. We need advice from people who have experience in developing high-load APIs. I'm thinking of taking the same Petfinder API as a basis, so that those sites that use it can use our API without rework. https://www.petfinder.com/developers/api-docs

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Gornostaev, 2020-09-20
@alexraven

Write in the one you know best. In high loads, it is not the language that matters, but the architecture.

R
Robur, 2020-09-20
@Robur

PHP (the easiest for us),

and write on it.
API to the database of the volunteer project for the adoption of animals from shelters.

how many requests per second do you expect for the first two years of the project's life?
It seems to me that with such a topic, you will reach high load in 10 years, if at all. By that time, the system will be redone a hundred times, no matter what you write it on.
you don't need super architecture, just do "not shit" - that will be more than enough.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question