frandallfarmer / neohabitat

Repository for the NeoClassical Habitat Server Project
http://neohabitat.org
MIT License
228 stars 42 forks source link

Adds EventStream persistence improvements and Vagrant build scripting for PushServer #314

Closed ssalevan closed 6 years ago

ssalevan commented 6 years ago

The Spine proxying layer that sits in front of the Neohabitat application is configured to close idle HTTP sessions after 50 seconds unless upgraded to an EventSource or WebSocket connection. As these upgrade headers are sent by the PushServer upon the first event message to the client, a 50 second window can elapse before they're sent.

The solution is to add an event which is fired upon the first connection, CONNECTED, which will correctly set the needed upgrade headers. Furthermore, I've added retry code to the frontend to support reconnection during byzantine connection failure scenarios (WiFi changes, etc.)

Finally, I've added support for the PushServer to the Vagrant build code to support Windows developers.