javascript - Would long-polling be a good substitute for websockets in this case? -


i attempting develop 'boardgame' sort-of application, simplicity sake let's think of monopoly familiar one. i've read bit long-polling , it's implications , got me confused stated need utilize framework (such socket.io) anyway, uses websockets , such.

  1. is possible avoid this? understand websockets better ajax request sitting , waiting response, reading on them made me bit "scared" of how implement such thing. not familiar node.js (though i'd love be) because understand has low hosting support providers , "overly complex use" or whatnot.
  2. generally speaking, since talking boardgame not need websockets use realtime client-server communication, because mainly, boardgames not intensive on simultaneous actions , not think there many changes communicate in short timeframe. might not understanding whole thing correctly correct me if wrong if game slow paced, such board games are, simple ajax request should suffice, no? if keep open in-definitively.
  3. would considered "good practice" avoid websockets in case, mean sure using them better using other things but, comparatively gains minimal in case (unless not seeing bigger picture here) effort needed implement it.

p.s. if can recommend starting point how implement websockets simple app such one, or direct me "learning material" node.js awesome well. ideally love write backend in js instead of php, got no clue start. have wamp running @ machine test things, idk how i'd setup node work on that, or @ all.


Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -