EVBRestUI

Name

EVBRestUI, InputStatsView, QueueStatsView, CompleteBarrierView, IncompleteBarrierView, DataLateView, OutOfOrderView, ConnectionView, FlowControlView -- EVentBuilder REST Client View classes

Synopsis


package require EVBRestUI

InputStatesView view1 ?option value ...?
view1 configure option value ?...?



        

DESCRIPTION

The EVBRestUI package provides Tcl views that can be used to build up user interfaces that monitor event builder statistics from the orderer stage of the pipeline. A number of sni::widgetadaptor classes are defined, each with a ttk::frame installed as its hull.

While the views are intended for use with models that get data from the Event Builder's REST interface, theoretically any model that can have its data massaged into an appropriate format could be used.

The remaining sections describe each of the views its options and, if it has any public methods.

InputStatsView

Provides a view that displays input statistics. This provides a single configuration option -inputstats which accepts and produces a dict with the following key/value pairs:

oldest

Timestamp of the oldest fragment still in flight.

newest

Timestamp of the newest fragment still in flight.

fragments

The number of fragments queued in the input queues.

The QueueStatsView Queue Statistics View

The QueuStatsView widget provides queue statistcs that come from e.g. the REST interface. These are displayed in a table with the following headings:

id

The id of the queue described on any row of the table.

depth

Number of fragments in the queue

oldest

The timestamp of the oldest fragment in the queue (fragment at the front).

bytes

Total number of bytes queued.

dequeued

Total number of bytes that have ever been dequeued.

queued

Total number of fragments that have evern been queued.

This information is communicated to the view via the -queuestats option which is a list of dicts. Each dict providing the input statistics for one queue with the same dictionary keys as the column headings.

The BarrierStatsView View Class

BarrierStatsView provides a top level view of the barrier events that have been processed by the orderer. A barrier event is a synchronization device. When a barrier fragment is seen in a queue, no futher fragments can be dequeued from that queue until there are barrier events in all queues.

Barrier fragments have a barrier type. If the barriers that resolve synchronization have the same type (normal), the barrier is said to be homogenous. If the barrier fragments have differing types the barrier is said to be heterogeneous.

If a barrier is not completely resolved within a timeout, the barrier is said to be a partial barrier.

The object data are configured via the -barrierstats option. The value of this option is a dict with the keys complete and incommplete. The values of these keys are themselves dict with identical keys:

barriers (integer)

Total number of barriers.

homogeneous (integer)

Number of homogeneous barriers. Normally this should be the same as the value of barriers

heterogenous (integer)

Number of heterogenous barriers.

The CompleteBarrierView View For Completely Satisifed Barriers

The CompleteBarrierView megawidget provides a view for the detailed statistics associated with complete barriers. A tree view is used to display these data with the ability to drill down into per source or per barrier type information.

The display reflects the contents of the -completebarrierdetails configuration option. This must be a dict with the keys bytype which describes barrier statistics by barrier types and bySource which provides barrier statistics organized by data source.

The bytype dict

The value of the bytype key is a list of dicts Each dict contains keys type which is a barrier type that has been seen and count which contains the number of times that barrier type has occured,

The bySource dict

The value of the bySource key is a list of dicts each describing barrier statistics for a data source. Each element of the list is a dict that has the following keys: id the source id, count the number of barriers from that source id and details.=

The value of the details key is itslef a list of dicts that have the keys type which contains a barrier type received from that source and count the number of times that source contributed a barrier of that type.

The IncompleteBarrierView View for Incomplete Barrier Statistics

This megawidget provides a vew that displays statistics from incomplete barriers. Ideally, this view should be empty as all barriers should, normally, be complete. The view displays a tree view whose contents are configured from the -incompletedetails option.

The value of this option must be a dict with two keys: histogram and bysource.

The histogram key contains a list of dicts that represents a histogram of the number of times a specific number of barrier fragments was missing from a barrier. Each dict contains the keys number which is the number of missing barrier fragments and count which is the number of times that number of fragments was missing. There will be no entries where the value of count is zero.

The bysource key contains a list that describes the number of times data source ids did not contribute a barrier fragment. Each element of the list is a dict that contains the keys id, a source id and count the number of times that source id did not contribute a barrier fragment to an incomplete barrier.

The DataLateView View for Data Late Statistics

Provides a view of data late statistics. Data late conditions occur when a fragment arrives at a queue after earlier fragments have already been emitted. The rendition of this view is a tree. The contents of the tree reflect the value of the -datalatestatistics option.

The value of this is a dict containing the keys: count which has the number of data late incidents, worst which has the worst case timestamp discrepancy to date and details which contains more detailed information

The details key contains a list of dicts. Each element of the list describes the data late statistics from a single data source. The elements of the list are dicts with the following keys: id the data source being described. count the number of data late incidents observed in that data source and worst the worst case timestamp discrepancy from the data lates on that source observed to date.

The OutOfOrderView View of out of order fragments

Out of order fragments are those which must be emitted out of global time ordering. This can be the result of data late fragments, sort failures or queue to queue timing problems.

This view takes the form of a tree who's contents are configured via the object's -oostatistics option. The value of this must be a dict with the following keys: summary contains summary statistics and bysource contains detailed statistics organized by data source

The summary key value is a dict containing the following keys:

counts

Total number of out of order fragments.

prior

Timestamp prior to the most recent offending fragment.

offending

Timestamp of the most recent offending fragment.

The value of the bysource key is a list of dicts. Each element of the list is a dict that provides information about the out of order fragments from some data source that had at least one such fragment. The dicts have the following keys:

id

Source id of the information that's included in this dict.

counts

Number of out of order fragments in this queue.

prior

Timestamp prior to the most recent offending fragment.

offending

Timestamp of the most recent offending fragment.

ConnectionView View of Client Connections

Data are transmitted to the event builder ordering phase by TCP/IP clients. This view provides a presentation of connected clients. It provides a table of the connections. The contents of the table reflect the contents of the -connections option.

The -connections value is a list of dicts. Each dict describes a single connection. The dicts contain the following keys:

host

Host from which the connection has been made.

description

A description string that was provided when the connection was made.

state

The connection state.

idle

True if the connection has not sent data in some long period of time.

FlowControlView

A view that displays the current flow control status. This is configured via the boolean -flowcontrol option which is boolean true if flow control is active and false if not