You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Current »

This page describes the preliminary requirements and design for asynchronous event support in the NDS Labs Workbench. In order to update the GUI in real time, the server needs to send state changes back to the client. This can be achieved via WebSockets, HTTP Long Polling, or HTTP Streaming.

 

Platforms

We need to decide which browsers and versions we will support going forward. Browser support options might preclude use of some technologies.

Use case

Project A administrator logs in to workbench.  Project B admin logs in to workbench along with a second user in another Project B session. When the cluster admin adds a new service, all three sessions are notified. When Project B user 1 adds a stack, Project B user 2's interface is updated. 

Events

Project-specific

  • Add/update/delete
    • Stack
    • Volume
    • Project
  • Status
    • Stack
    • Stack service
  • Error

System-wide:

  • Add/update/delete service spec
  • Broadcast messages

Message formats

Messages will be sent in JSON format, something like:

{ 
    event: "<ID>",
    data: ...
}

Messages will include

  • Errors
  • Create
  • Update
  • Delete
  • Status

Authentication

References

https://en.wikipedia.org/wiki/WebSocket

https://tools.ietf.org/html/rfc6455

https://devcenter.heroku.com/articles/websocket-security

https://devcenter.heroku.com/articles/websockets

https://devcenter.heroku.com/articles/go-websockets

https://godoc.org/golang.org/x/net/websocket

http://www.gorillatoolkit.org/pkg/websocket

  • No labels