Java + NodeJS communicating via socket: Bad Idea?

后端 未结 6 1931
生来不讨喜
生来不讨喜 2020-12-23 18:50

I like some features of NodeJS, particularly JQuerification, websocket compatibility via socket.io, view and css engines that I cannot use with JSP (and of course, asynchron

6条回答
  •  一向
    一向 (楼主)
    2020-12-23 19:00

    If you are going to program some of the back end in java, why not do it all in java?

    Not sure what you mean by "I like some features of NodeJS, particularly JQuerification, websocket compatibility via socket.io, view and css engines that I cannot use with JSP (and of course, asynchronous calls)."

    jquerification - you mean jquery? you can do that with jsp.

    websockets in java: http://caucho.com/resin-4.0/examples/websocket-java/index.xtp, although you might as well do comet server push as its supported with servlet 3.0

    which css engine cannot be used with jsp?

    what do you mean by asynchronous calls?

    for me, node.js is more about whether you want a non-blocking server. if that is the requirement, you can do that in java too - most modern server support configuring for NIO.

提交回复
热议问题