问题描述:

I have used below tech stack for my web app

 Apache

+--Drupal Web site

+-------Node.js web client

+------------RESTful APIs to business process (using spring)

+-----------------MySQL via ORM (like hibernate)

However I am not sure if due to this or some other, client request does not seems to be processed asynchronous any more or taking same time as earlier without node.js (yes i introduced node.js between my APIs and drupal pages recently to improve the performance)

Is drupal the culprit and undoing the asynch capability of Node.js, as User sessions are now managed by drupal and all interactions are via Apache then Drupal and then Node.js

what am I missing here?

网友答案:

Drupal, or Apache, are not the culprit. Your architecture is. Your users are issuing HTTP requests to Apache, Apache runs the PHP making the HTTP request to Node.js. So HTTP requests from your PHP code to Node.js only happen while processing the HTTP requests to Apache. And you loose the greatness of Node.js.

See the Node.js integration module for a better architecture to integrate node.js and Drupal.

相关阅读:
Top