#43 FB_SparkplugHAProvider aka 'Server Walker'

open
hermsen
None
2022-11-05
2020-08-04
i-campbell
No

SparkplugB Spec > 8.Sparkplug™ MQTT Session Management and Message Flow

"In high availability and redundancy use cases where multiple MQTT Servers are used, MQTT EoN nodes need to be aware of whether Primary Applicationhas network connectivity to each MQTT Server in the infrastructure. If the Primary ApplicationSTATE shows that an EoN nodeis connected to an MQTT Server that the Primary Applicationis NOTconnected to, then the EoN nodeshould walk to the next available MQTT Server where STATE for the Primary Applicationis ‘ONLINE’."

Mission of FB_SparkplugHAProvider

  1. Accept an Array of WSTRING. This is a list of scada_host_id(s).
  2. Accept an Array of STRING. This is a list of server url(s).
  3. IF
    1. 2 or more server url(s) exist
    2. AND Connected to a server
    3. AND
      1. (each "STATE/scada_host_id" is ConnectionState.OFFLINE
      2. OR (each "STATE/scada_host_id" is NOT ConnectionState.ONLINE) AND wait_for_ONLINE_timeout has expired
  4. THEN Walk to next server.

Discussion

  • i-campbell

    i-campbell - 2020-08-04
    • assigned_to: aliazzz
     
  • i-campbell

    i-campbell - 2020-08-15
    • Milestone: 2.0 EoN --> 999.0 Backlog
     
  • aliazzz

    aliazzz - 2020-09-14
    • status: open --> accepted
     
  • aliazzz

    aliazzz - 2020-09-14
    • status: accepted --> closed
     
  • aliazzz

    aliazzz - 2020-09-14
    • status: closed --> open
     
  • aliazzz

    aliazzz - 2020-09-14

    An array approach with a "Sparkplug Server Connection" Type, which contains info for a Single server. High Availability (HA) can be more than 2 server connections,
    3 is ideal. Maintain one, while still having a redundant pair.

    Every connection is represented by a 1 "Sparkplug Server Connection"
    In the Type we have various Server connection settings like IP adres, a port, login credentials and a pointer to specific TLS certificate etc, etc.

    If a connection fails (see above), we use the next connection in the array.

     
  • aliazzz

    aliazzz - 2020-09-14
    • status: open --> accepted
    • Milestone: 999 Backlog --> 1.0.0.0: EoN
     
  • aliazzz

    aliazzz - 2020-09-14

    FB_SparkplugB_ServerWalker will be refactored to FB_Sparkplug_HAProvider and parked for now as it is not part of the MVP product.

    This FB is solely responsible for maintaining and monitoring of the High Availability functionality for use with the EoN. Ideally The EoN will not see any difference between an FB_MQTT or the HAConnMaintainer and thus no extra coding in the EoN should be neccesarry apart from the glue logic to make it tick.

    The FB takes an array of SparkPlugBConnectionTypes and connects/monitors the connections according to the algorithm as outlined above. The FB uses composition to embed at least 2 instances of FB_MQTT type. It exposes the all mehods and properties of FB_MQTT type.

    However, this strategy will cause this ticket to move back to at least the 2.0.0.0 Standard Product.

     
  • aliazzz

    aliazzz - 2020-09-14
    • status: accepted --> pending
     
  • aliazzz

    aliazzz - 2020-09-19
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -8,6 +8,6 @@
         4. 2 or more server url(s) exist
         5. AND Connected to a server
         6. AND 
    -        7. (each STATE/scada_host_id is OFFLINE
    -        8. OR each STATE/scada_host_id is not ONLINE and wait_for_ONLINE_timeout has expired)
    +        7. (each "STATE/scada_host_id" is ConnectionState.OFFLINE
    +        8. OR (each "STATE/scada_host_id" is NOT ConnectionState.ONLINE) AND wait_for_ONLINE_timeout has expired
     9. THEN Walk to next server.
    
     
  • aliazzz

    aliazzz - 2020-09-21
    • summary: EoN High Availability Server Walking --> Server Walker aka FB_Sparkplug_HAConnMaintainer
    • Milestone: 1.0.0.0: EoN --> 2.0.0.0 High Availability
     
  • aliazzz

    aliazzz - 2020-09-21
    • status: pending --> open
     
  • aliazzz

    aliazzz - 2020-09-24

    Added attachment FB_SparkplugServerWalker.export which contains:

    FB_SparkplugServerWalker &
    SparkplugBServerConnectionType

    for later usage

     
  • aliazzz

    aliazzz - 2020-10-04
    • assigned_to: aliazzz --> h-hermsen
     
  • hermsen

    hermsen - 2021-01-02
    • summary: Server Walker aka FB_Sparkplug_HAConnMaintainer --> FB_SparkplugHAProvider aka 'Server Walker'
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,6 +1,8 @@
     [SparkplugB Spec](https://www.eclipse.org/tahu/spec/Sparkplug%20Topic%20Namespace%20and%20State%20ManagementV2.2-with%20appendix%20B%20format%20-%20Eclipse.pdf) > 8.Sparkplug™ MQTT Session Management and Message Flow
    
     "In high availability and redundancy use cases where multiple MQTT Servers are used, MQTT EoN nodes need to be aware of whether Primary Applicationhas network connectivity to each MQTT Server in the infrastructure. If the Primary ApplicationSTATE shows that an EoN nodeis connected to an MQTT Server that the Primary Applicationis NOTconnected to, then the EoN nodeshould walk to the next available MQTT Server where STATE for the Primary Applicationis ‘ONLINE’."
    +
    +Mission of FB_SparkplugHAProvider
    
     1. Accept an Array of WSTRING. This is a list of scada_host_id(s).
     2. Accept an Array of STRING. This is a list of server url(s).
    
     
  • hermsen

    hermsen - 2021-10-23

    Due to HA specs being too loosely defined within the SparkplugB spec, this extension is being parked until the spec gets updated or further notice

     

    Last edit: hermsen 2021-10-23
  • hermsen

    hermsen - 2021-10-23
    • status: open --> pending
     
  • hermsen

    hermsen - 2022-04-16
    • status: pending --> open
     

Log in to post a comment.