This is not an officially supported Google product.
Teams from across Google, including Ads teams, are actively engaged in industry dialog about new technologies that can ensure a healthy ecosystem and preserve core business models. Online discussions (e.g. on GitHub) of technology proposals should not be interpreted as commitments about Google ads products.
This code provides a server that can run JavaScript bidding and ad scoring functions, as specified in the FLEDGE explainer. The idea is to experiment with moving evaluation of JS from on-device to a server instead.
Discussions of how to add trust to the server are not covered here, see.
Bidding functions are currently statically configured in a
server/sample_configuration.yaml
file that gets built into the container.
Edit the file to add or change the bidding function that Aviary should be able
to run, for example:
biddingFunctions:
squaring: |
(function(inputs) { return inputs.perBuyerSignals.contextualCpm * return inputs.perBuyerSignals.contextualCpm; })
In order to be able to build and run Aviary locally, a number of tools need to be installed on the local machine.
-
Run
setup.sh
convenience script to set up the local development environment. It performs the following steps:
An Aviary server is built as a Docker container.
One can build it with:
bazelisk run //server:aviary
or, if you're not using Bazelisk:
bazel run //server:aviary
You can run Aviary locally with Docker and bind to a chosen local HTTP port:
export PORT=8080; docker run -p ${PORT}:${PORT} -e PORT=${PORT} bazel/server:aviary
To test that Aviary is running, we can send a request to invoke a simple bidding
function that doubles the value from perBuyerSignals
:
curl -X POST http://localhost:8080/v1alpha/adAuctions:computeBid -d '{"biddingFunctionName": "doubling","input": {"perBuyerSignals": {"contextualCpm": 1.23}}}' -H "Content-type: application/json"
{
"bid": 2.46
}
This code is published so that it‘s possible for anyone to re-run the experiments that we’re doing. This code will not be supported once the experimentation is complete.
trusted-worklet-server's People
Forkers
isabella232Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.