Support #2404
closedCommunication between two web applications
0%
Description
Hello! I need to have possibility to send some commands from one wt application to another one (change internal path of session with known id). What is the best method to make it?
Updated by Wim Dumon about 11 years ago
Use WServer::post(). How you get the session id and the internal path from one application to another, depends on your deployment model. You'll need to search for an appropriate IPC mechanism. Are both applications deployed in the same process? Are they running on the same computer? Can you make a TCP connection between both? Or maybe you want to use REST?
BR,
Wim.
Updated by Vitaly Volochay about 11 years ago
Application are different proccesses, the first one is Wt application deployed by apache and it should proccess comand from another. The second one might be also Wt application deployed by apache or might be written on php, so http-request probably seems best method to communicatite between them.
I tried use WServer::addResource() for adding static resource to first app which will proccess http-request from second app. The problem http-request proccessed by apache and I don't know how to forward it to wt application.
I describe it here: http://redmine.emweb.be/issues/2384
So I tried to find other ways to reach my goals, but preferable is to find method to forward request from apache to wt application.
Updated by Koen Deforche about 11 years ago
- Status changed from New to Feedback
- Assignee set to Koen Deforche
Hey,
Have a look at the qrlogin example. It uses the system of Http::Client to post to a dynamic resource of the target application. The dynamic resource URL is communicated between processes through a database.
As to your problem related to a static resoure, I've responded to this issue as well (but could not reproduce the problem you had). That could also work (instead of a the dynamic resource).
Regards,
koen
Updated by Koen Deforche over 10 years ago
- Status changed from Feedback to Closed