jathanasiou commented on pull request #249:
URL: https://github.com/apache/brooklyn-ui/pull/249#issuecomment-881449679
# Log items consistency
It seems that the way `logEntries` are being retrieved from the server API
right now can be inconsistent.
Using `timestamp` values to define a range the entries can lead to overlaps
between consecutive queries. Timestamps can be **relative** and due to the
nature of async operations such as this, inappropriate data sets may be sent to
the client.
query-A (from 16:21:0005 to 16:21:0010)
client request sent at 16:21:0010
server receives request at 16:21:0012 (or later) --> log entries may
have been generated between 0010 and 0012
client gets response at 16:21:0013 (or later)
query-B (from 16:21:0010 to 16:21:0015)
// same situation, overlap and transfer delays can cause unexpected
behaviour and displayed items
// the client could receive the same entry twice, or completely miss
a log entry
----
## Suggestion: Use absolute reference IDs per entry
The server should be tagging each log entry with a unique UUID (lots of
libraries can do that reliably). After the first query, the client can instead
use the ID in the last of (ordered) entry results in the most recent query
response to request only entries newer than that one.
See also
https://github.com/apache/brooklyn-ui/pull/249#pullrequestreview-708378520
# DOM manipulation
Examining elements via `$element` is far from ideal, but somewhat necessary
when DOM-related properties (scroll position inside parent) are needed. Once
the issue of entry consistency is resolved, it might be easier to evaluate the
mechanism for keeping older lines in "focus" via specific scroll positions.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]