Git Product home page Git Product logo

Comments (2)

opinali avatar opinali commented on May 8, 2024

Thanks for the feedback! On the need to register the extension, you are right, the problem is that the wiki is not a full tutorial so it doesn't show how to use the ExtensionRegistry. This is a problem because Protobuf extensions are not a feature that I should assume everyone will be familiar with and this registry is not an obvious step. You don't need to register extensions individually, do this instead:

AdxExt.registerAllExtensions(reg);

Also, even if you don't do this, the extension values are present in he proto model, they just aren't parsed but they can be accessed like this:

AdxExt.ImpExt.parseFrom(
    imp.getUnknownFields().getField(AdxExt.imp.getNumber())
        .getLengthDelimitedList().get(0));

Admittedly, this code is horrible :) even though it's simplified to assume that there will be exactly one ImpExt value. This is only good for advanced uses that need dynamic discovery of extensions, or lazy parsing for big extensions that are rarely used, etc. I will update the wiki with the registry step.

On the dependency to doubleclick-core, that's inevitable because the AdxExt is AdX-specific so there's no way I could move this to the openrtb-core library; everything here needs to be really exchange-neutral. Modularity is the whole point of using extensions in the first place so the protos can be independent and also associated utilities like JSON support. However I'm planning to split doubleclick-core in two pieces, moving the AdX->OpenRTB mapper to a separate library since now this is not useful for users that work with AdX's new on-wire OpenRTB protocols.

from openrtb.

opinali avatar opinali commented on May 8, 2024

Wiki updated.

from openrtb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.