1

We have a Symfony backend server for our Android and iOS application. Recently we need to extend our application by supporting real time interaction such as chatting, and we decided to use NodeJs with SocketIo to support it.

Currently our design is to let NodeJs acts as man in the middle. Nodejs would just receive request and forward to PHP for further processing. In PHP side, it will store a list of active socket id with associated users. PHP will send the push notification to NodeJs and NodeJs will forward the message accordingly to the user's mobile.

It means all of our logic are placed inside PHP only. It saves our effort in certain way e.g. jwt authentication only done in PHP and NodeJs would not directly communicate with database

I am curious about the best practice or industry standard on how to maintain Nodejs and Php server separately.

  • 1
    Docker, virtualisation, different machines... – TZHX Mar 19 '17 at 15:18
  • So you don't have an actual problem to be solved and just want to discuss your current design? Then the SE network is the very wrong place for your question, sorry. These are not discussion boards but Q&A sites, and questions must be answerable, ideally with a clear "right" answer. Please read How do I ask a Best Practice Question?. Thanks. – Doc Brown Apr 21 '17 at 3:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.