OK... the basic idea is to have SERVER and CLIENT physically separated (two systems).
My idea is to build a stand-alone web service (REST, XML, API-KEY) that will provide
- Authentication: User login, logout
- Data: Get list of products
Then I will create clients in different languages (Flash, PHP, JavaScript). Data will be served only to authenticated users.
Tipical communication for user to get list of products will be:
- (1 request) Login / start session
- (1 request) Get list of products
- (1 request) Get list of products
- ...
OK... Now the problem I have is the user session. Say we want to build Javascript client, we actually have to create PHP client that will communicate with REST (PHP knows about REST API-KEY) and will forward info to Javascript (CLIENT) right? User will login through PHP to REST server right and then request data through PHP to REST server?
Questions:
- Now how does PHP store info about opened user session on REST server?
- If my idea is bad, what is the right way of implementation?
- Alternatives?