webui-vue icon indicating copy to clipboard operation
webui-vue copied to clipboard

Move away from Event subscription protocol

Open gtmills opened this issue 1 year ago • 3 comments

I still see the Event subscription protocol used here: https://github.com/openbmc/webui-vue/blob/780733a1b426a927140619857d732fb472d5cf38/src/store/plugins/WebSocketPlugin.js#L25

See below for more information on the Event subscription protocol: https://github.com/openbmc/docs/blob/224266ecfd528544e9f5473cc4607d9b6b7c435f/rest-api.md#event-subscription-protocol

The Event subscription protocol is behind the rest meson option in bmcweb which is defaulted off: https://github.com/openbmc/bmcweb/blob/6f8273e49cffdd347c223b9538558edfb05e818a/meson_options.txt#L45

webui-vue should move away from these event subscription protocol websockets and to Server-Sent Events (SSE). https://github.com/openbmc/bmcweb/commit/5e44e3d85bae016c7ccc27e9ee65627919a51898

I suspect this is the cause of https://github.com/openbmc/webui-vue/issues/102. Overall we should move away from Event subscription protocol

gtmills avatar Jun 06 '23 19:06 gtmills

👍

edtanous avatar Jun 08 '23 17:06 edtanous

@gtmills Sorry,I didn;t catch your meaning.I only understand the rest option is default off and probablely '/subcribe' caused #102. However, I still didn't find the shortcomming of it, likewise I often use it.

fishermess avatar Jun 13 '23 02:06 fishermess

However, I still didn't find the shortcomming of it, likewise I often use it.

Although REST D-Bus is useful. Here are a couple of reasons why OpenBMC has moved away from the REST D-Bus

  • REST D-Bus allows authenticated users access to privileged information that may be above their permission level
  • It isn't documented as well or versioned like Redfish is
  • Using Redfish means there is a translation layer from D-Bus to Redfish, this translation layer means D-Bus interface changes don't break clients
  • The Redfish is an industry standard
    • A non-openbmc box can be managed the same.
    • A bunch of tooling and a large community for help
  • Redfish has a bunch of features, REST D-BUS did not

More information can be found in: https://gerrit.openbmc.org/c/openbmc/bmcweb/+/29344

gtmills avatar Jun 29 '23 16:06 gtmills