A
A
Avt_12016-05-18 15:06:03
PHP
Avt_1, 2016-05-18 15:06:03

Working with a remote web service. How to do it right?

Good afternoon!
Given: there is a service with data that can issue data through its API. The data is not static .
Challenge: We're building a third-party app that should show different collections to the user. Collections are displayed and updated in real time.
Do I understand correctly that in such a scheme we need to have a backend written in, say, PHP. And the user interface is written in JS.
Accordingly, the user chooses what he wants to receive, JS makes a request to our backend, the backend establishes an authorized connection to the data server and issues them to the client.
8415e31aeb1a49d987838f1e73eb5564.png
Questions: we will not "get" if we make a backend in PHP? There will be no problems with the scheme that I gave? With the requirement to support the connection.
Perhaps there are some errors in the diagram?
Thank you.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
_
_ _, 2016-05-18
@Avt_1

If everything is really as you described, then you will get there - you better get node.js here

A
Anton B, 2016-05-18
@bigton

In general, there is usually a limit on the number of requests per second, minute, day. I have not heard about the limit on the number of connections. So I think a permanent connection is not needed here.
Since there is a limit, the data received from api should be stored on your server. So that when you make repeated requests, do not ask the api for the same thing.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question