UNOMI-188 Rule event type optimization (#321)

* UNOMI-188 Rule event type optimization
- New optimization for rules : rule condition are parsed to determine the event types they handle. This is done using a new ParserHelper method that navigates the tree of conditions to resolve which eventTypeCondition are used.
- Settings to deactivate the new optimization in case it causes issues
- Integration tests to validate that the parsing of conditions is behaving as expected
- Performance tests to validate the performance improvement of the optimization

* UNOMI-188 Rule event type optimization
Improvements on first draft:
- Remove getSetting/setSetting on RuleService and replaced it with OSGi configuration admin. This required making sure that services are properly reinjected (manually) into the integration test classes
- Added check in integration test to make sure that the complex rule DOES get matched for non-view events (fixing a bug in the first draft)
- Fix problem with negated rules not being used when no rule matched specific event type
- Removed updates of rulesByEventType structure in get/setRule calls
- Refactored visit pattern to add a postVisit method and remove the stack passed on the parameters

* UNOMI-188 Rule event type optimization
- Fixed some issues with NullPointerException in the RestServer when it was restarting
- Moved the update of the rules by event type into a separate method
- Added the missing call to the postVisit method in visitConditions.
11 files changed
tree: 70095ca6dfa4d4591e6e9a9caa1bd40cce9daa33
  1. .github/
  2. api/
  3. common/
  4. docker/
  5. extensions/
  6. graphql/
  7. itests/
  8. kar/
  9. lifecycle-watcher/
  10. manual/
  11. metrics/
  12. package/
  13. performance-tests/
  14. persistence-elasticsearch/
  15. persistence-spi/
  16. plugins/
  17. rest/
  18. samples/
  19. scripting/
  20. services/
  21. src/
  22. tools/
  23. wab/
  24. .gitignore
  25. buildAndRun.sh
  26. buildAndRunNoTests.sh
  27. BUILDING
  28. compileDeploy.sh
  29. generate-package.sh
  30. generate-site-and-upload.sh
  31. generate-site.sh
  32. KEYS
  33. LICENSE
  34. license-mappings.xml
  35. MERGING-PULL-REQUESTS
  36. NOTICE
  37. NOTICE.template
  38. pom.xml
  39. README.md
  40. release-audit.sh
  41. setenv.sh
  42. update-notice.sh
README.md

Build Status Maven Central

Apache Unomi

https://unomi.apache.org

Apache Unomi stores user profile information and is mostly used to provide a backend server for A/B testing and personalization. To do so it implements the currently under development OASIS Context Server specification.

License

The source code is available under the Apache License V2

Branches

  • main (master) branch: is the current development branch and should be considered unstable. At this it might even not compile. It is only recommended for Unomi developers or people looking to contribute on the project.
  • unomi-X.X.X branches : these are the maintenance branches of the stable releases of Apache Unomi and should always compile and be stable. These are recommended for users that prefer to work from the source code. Otherwise you can find packaged binaries on the Apache Unomi website.

Documentation

You can find all the updated documentation, including building and deployment instructions, on the Apache Unomi web site.