devgianlu / PYX-Reloaded

A fork of the original Pretend You're Xyzzy, with a completely rewritten frontend and some major changes on the backend
Apache License 2.0
26 stars 13 forks source link

Overhaul Server To Use WebSockets Instead of LongPoll Hack #44

Closed HopperMCS closed 6 years ago

HopperMCS commented 6 years ago

After researching a bit to see what is in the server and why, I researched long-polling (aka "googled" and then read multiple articles) - and then talked with @devgianlu about it.

It has been decided that LongPoll needs thrown out, as it is a hack. WebSockets exist to provide a full-duplex channel for the client and server to communicate over, without worrying about accidentally DDoSing an instance.

That said, the client needed a complete re-write. We should really be asking ourselves "Can this be done any better or is this as far as we can go?" We're re-writing the parts that cause the most headaches using newer standardized technologies - AJAX instead of JSP, MDC over the OG client. If this is done properly, more people may be able to join with less strain on the backend.

HopperMCS commented 6 years ago

@devgianlu - the thought just crossed my mind: How is the idle time out setting affected? Or does it not rely on LongPoll? I'm sure it could be artificially done if not already...

devgianlu commented 6 years ago

Done with 651edcfa355b450f7c0548fdb372f0c625c41bcc