tiborm opened a new pull request #1514: METRON-2190: [UI] Alerts UI: Indicating 
loading and preventing parallel requests
URL: https://github.com/apache/metron/pull/1514
 
 
   ## Contributor Comments
   
   As a part of this pull request I introduce the concepts of blocking and non 
blocking search queries for Alerts UI. With this feature UI can give feedback 
to our users about the ongoing query process. Also, can prevent sending 
multiple requests in a row, before getting response or failure.
   
   As a prerequisite of this I had to separate blocking and non-blocking query 
operations.
   Blocking query operations (triggered by user)
   - querying/searching by search button
   - page size change
   - sorting
   - grouping
   - show/hide dismissed or resolved items
   Non-blocking query operation is basically
   - automatic polling (triggered by timer)
   
   ## Congestion handling
   ### Search triggered by the User
   Congestion is no longer possible with queries triggered by the user because 
of the modal loading indicator. This indicator prevents any interaction till 
the request resolves with a result or a failure.
   ### Automatic polling
   In case the response time is longer than the polling interval user, able to 
overload the back-end. Simply by automatically sending a new request before the 
previous one get processed on the next interval. (If the response time is 30 
sec and the interval is 10, this means 3 parallel request. Each one of them 
increasing the processing time further.)
   To protect our services from auto polling overload UI skipping every polling 
cycle till a pending request exists. In this scenario the UI shows a warning to 
the User about the congestion and ask to increase the polling interval or 
optimize the query filter.
   
   ## Small improvements on auto polling
   - auto polling sends an initial request on start
   - auto polling state persisted
       - on/of state
       - interval restored
   
   ## Other related changes
   - surrounding code had to be deeply refactored, to decouple search, auto 
poll and row config
   - auto polling logic moved to a single service (previously it was shared 
across alerts-list.component, search.service and query-builder.service)
   - conflicts with manual filtering feature
       - manual query/filter string and the belonging logic had to be moved 
from alerts-list.component to query-builder
       - I restored the "single source of query string", no matter it is made 
by the builder logic or manually by the user
       - with this auto polling able to pick up the latest query in every 
interval from one single source
   
   ## Known issues currently in the master
   There is a few known issue in the current code base, what might interfere 
with this changeset while your are testing. Please keep in mind, these are 
already reproducible on the master branch and not introduced by this. To keep 
this PR in a reasonable size, I haven't try to fix them as a part of current 
changeset. However, as a positive impact of all of the refactoring work we did 
we'll be able to fix them more easily on the top of this PR.
   
   [[UI] Switching back from manual filtering mode eliminates time range filter 
from query](https://issues.apache.org/jira/browse/METRON-2258)
   [[UI] Hide Resolved and Hide Dismissed toggles not works when filtering is 
in manual mode](https://issues.apache.org/jira/browse/METRON-2259)
   [[UI] Performance: Switching manual filtering on and off multiple times 
leads slow typing](https://issues.apache.org/jira/browse/METRON-2260)
   
   I'm planning to target these in followup PRs.
   
   ## Testing
   ### Scenario 1 (manual querying)
   - Search queries initiated by the following interactions
       - querying/searching by search button
       - page size change
       - sorting
       - grouping
       - show/hide dismissed or resolved items
   - should be indicated by a modal loader
   - The User has to be prevented from any further interaction on the UI while 
the operation is in progress.
   #### Scenario 1.1 (error handling)
   - An error dialogue should show up on the UI in case of internal server 
error.
   
   ### Scenario 2 (auto polling)
   - User should be able to start/stop auto polling by the play/pause icon 
below the searh button
   #### Scenario 2.1 (error handling)
   - An error dialogue should show up on the UI in case of internal server 
error.
   #### Scenario 2.2 (congestion handling)
   - When the user set up a short polling interval
   - And the response time is slower then polling interval
   - A non modal warning should show up for the user
   - All further polling request should be skipped to avoid overload until a 
response, timeout or error occur
   
   ### Scenario 3 (polling suppression)
   - When auto polling is turned on
   - The following operations should temporarily suppress polling
       - selecting alerts by checkbox
       - showing details pane
       - showing save search pane
       - showing load search pane
   - After close or deselect the polling should continue
   
   
   
   ## Pull Request Checklist
   
   Thank you for submitting a contribution to Apache Metron.  
   Please refer to our [Development 
Guidelines](https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=61332235)
 for the complete guide to follow for contributions.  
   Please refer also to our [Build Verification 
Guidelines](https://cwiki.apache.org/confluence/display/METRON/Verifying+Builds?show-miniview)
 for complete smoke testing guides.  
   
   
   In order to streamline the review of the contribution we ask you follow 
these guidelines and ask you to double check the following:
   
   ### For all changes:
   - [x] Is there a JIRA ticket associated with this PR? If not one needs to be 
created at [Metron 
Jira](https://issues.apache.org/jira/browse/METRON/?selectedTab=com.atlassian.jira.jira-projects-plugin:summary-panel).
   - [x] Does your PR title start with METRON-XXXX where XXXX is the JIRA 
number you are trying to resolve? Pay particular attention to the hyphen "-" 
character.
   - [x] Has your PR been rebased against the latest commit within the target 
branch (typically master)?
   
   
   ### For code changes:
   - [x] Have you included steps to reproduce the behavior or problem that is 
being changed or addressed?
   - [x] Have you included steps or a guide to how the change may be verified 
and tested manually?
   - [x] Have you ensured that the full suite of tests and checks have been 
executed in the root metron folder via:
     ```
     mvn -q clean integration-test install && 
dev-utilities/build-utils/verify_licenses.sh 
     ```
   
   - [x] Have you written or updated unit tests and or integration tests to 
verify your changes?
   - [x] If adding new dependencies to the code, are these dependencies 
licensed in a way that is compatible for inclusion under [ASF 
2.0](http://www.apache.org/legal/resolved.html#category-a)?
   - [x] Have you verified the basic functionality of the build by building and 
running locally with Vagrant full-dev environment or the equivalent?
   
   ### For documentation related changes:
   - [x] Have you ensured that format looks appropriate for the output in which 
it is rendered by building and verifying the site-book? If not then run the 
following commands and the verify changes via 
`site-book/target/site/index.html`:
   
     ```
     cd site-book
     mvn site
     ```
   
   - [x] Have you ensured that any documentation diagrams have been updated, 
along with their source files, using [draw.io](https://www.draw.io/)? See 
[Metron Development 
Guidelines](https://cwiki.apache.org/confluence/display/METRON/Development+Guidelines)
 for instructions.
   
   #### Note:
   Please ensure that once the PR is submitted, you check travis-ci for build 
issues and submit an update to your PR as soon as possible.
   It is also recommended that [travis-ci](https://travis-ci.org) is set up for 
your personal repository such that your branches are built there before 
submitting a pull request.
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to