pbs rules engine module#6044
Conversation
✅ Deploy Preview for prebid-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
|
||
| - Runs only at the Processed-Auction stage. | ||
| - Only delivers functions for including and excluding bidders. | ||
| - Does not necessarily reload config periodically like the Floors feature, making integration with a backend machine learning system more challenging. |
There was a problem hiding this comment.
Go can reload config periodically assuming the host is somehow taking the machine learning system data and using it to update the account with new rules and the account fetcher is configured to be periodically fetched. Is this an example of how you envision it integrating with a backend machine learning system?
There was a problem hiding this comment.
The Floors feature takes a URL and polls it periodically for updates. i.e. there's no work for the Host Company to update data.
How about to make this clear we say something like "Unlike the Floors feature, the rules module does not fetch data on an external URL. To update the rules, the Host Company needs to merge updated data into the account system."
| "hooks": { | ||
| "modules": { |
There was a problem hiding this comment.
I thought the hooks.enabled flag needs to be set:
"hooks": {
"enabled": true
There was a problem hiding this comment.
@And1sS - is this the same for PBS-Java?
| { | ||
| "hooks": { | ||
| "modules": { | ||
| "pb-rules-engine": { |
There was a problem hiding this comment.
This should be modules.vendor.module:
"modules": {
"prebid": {
"rules-engine": {
| "modules": { | ||
| "pb-rules-engine": { | ||
| "enabled": true, | ||
| "timestamp": "20250314 00:00:00", |
There was a problem hiding this comment.
This is not currently implemented in Go but I think we should leave it in the docs and we will support it. Right now Go is hashing the fetched config and comparing it against a cached hash to determine if there is a change but we will add timestamp support.
| "results": [{ | ||
| "function": "excludeBidders", | ||
| "args": [{ | ||
| "bidders": [], |
There was a problem hiding this comment.
As mentioned earlier, Go is considering it an error when bidders is empty. Couldn't you just omit this set of conditions in which case the default would be executed? I guess perhaps this has value in case you want to specify defaults but then not apply those defaults in certain instances like this. What do you think?
There was a problem hiding this comment.
Right - the default might be to remove bidderA, and one of the leaves says not to remove anything.
| } | ||
| ``` | ||
|
|
||
| And here's how these scenarios would play out in various runtime conditions: |
There was a problem hiding this comment.
"And here's how these scenarios would play out in various runtime conditions given the following request:"
Then we need to add the request here with the two imps as that is missing.
There was a problem hiding this comment.
The test request in the PRD is quite large. How about we make a copy of a test JSON file available, link to it, and then note that it's just a template for these test requests?
| We recommend placing the execution plan at the host level so all accounts have the module enabled. | ||
|
|
||
| ```json5 | ||
| "execution-plan": { |
There was a problem hiding this comment.
Is this called host-execution-plan in Java? It is host_execution_plan in Go.
| "groups": [{ | ||
| "timeout": 10, | ||
| "hook-sequence": [{ | ||
| "module-code": "rules-engine", |
There was a problem hiding this comment.
Isn't this supposed to be of the format vendor.module_name in which case "prebid.rules-engine"?
🏷 Type of documentation
Documentation for the PBS Rules Engine module. See prebid/prebid-server#2541