Coder Social home page Coder Social logo

benmfaul / xrtb Goto Github PK

View Code? Open in Web Editor NEW
121.0 121.0 67.0 208.83 MB

A Real Time Bidding (RTB) 2.1 bidding engine written in Java 1.8

Home Page: http://rtb4free.com

License: Apache License 2.0

JavaScript 6.33% HTML 13.31% CSS 0.16% Java 80.12% Shell 0.08%

xrtb's People

Contributors

benmfaul avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xrtb's Issues

problem with deploy

Hello.
Thank you for your work.

I have several problems with deploy. Could you please help me?

# tools/load-database
Exception in thread "main" com.aerospike.client.AerospikeException$Timeout: Client timeout: timeout=0 iterations=2 failedNodes=2 failedConns=0

in spite of I have a valid ip address in payday.json:

             "aerospike": {^M
                        "host": "xx.xxx.xxx.xxx",^M
  1. Campaigns/payday.json
"adx": "<a href='locahost:8080   

locahost - should be localhost or external ip?

# tools/rtb4free
java.lang.Exception: java.io.FileNotFoundException: /home/ben/Downloads/CIDR.txt (No such file or directory)

Where can I find CIDR.txt ?

Thank you.

QPS testing

Hi Ben;

First Happy New Year 2017!

Also, I have built a local server (Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz, 32 cores, with 128GB of ram), and ran maxload on it.

Based on your own testing (i.e. 50k QPS), I expected to reach a phenomenal number of QPS myself on this server; although I only have the following (with an exception ;((.

Threads=32, QPS=16599.5
com.aerospike.client.AerospikeException: Error Code 14: Hot key
at com.aerospike.client.command.WriteCommand.parseResult(WriteCommand.java:72)
at com.aerospike.client.command.SyncCommand.execute(SyncCommand.java:56)
at com.aerospike.client.AerospikeClient.put(AerospikeClient.java:299)
at com.aerospike.redisson.RedissonClient.hmset(RedissonClient.java:294)
at com.xrtb.bidder.Controller.recordBid(Controller.java:789)
at com.xrtb.bidder.Handler.handle(RTBServer.java:881)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:189)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)

Can you give your feedback on this, and potential issues why I have such a slow performance (I would think that the server is resourced enough to reach much higher QPS)?

Thanks.

"add a new exchange" instruction for RTB4FREE

Hi Ben;

I have been playing with RTB4FREE, and I am running some integration with a new exchange, which worked well apart from two things:

  1. looking into the process, it worked although "mvn" to rebuild the java bidder was not mentioned (obvious, still worth adding I think).
  2. on line 66 of payday.json, there is an error: cappture should be taggify I believe:
    {
    "name": "taggify",
    "id": "taggifyid",
    "bid": "/rtb/bids/cappture=com.xrtb.exchanges.Taggify"
    }
    I copied this line and change Taggify into the name of my new exchange, and of course, I had "Handler:handle:error - Wrong target: /rtb/bids/xxxx". I realized later, much later, that is was because I copied the line with an error in it.

Thanks,

Lionux.

Unable to remove demo user

After launching using the instructions I see the ben user but not the demo user

How would you disable the demo user?

cast error in the simulator exchange for Smaato / Native (App Wall)

Having issue to test the current simulator: getting X-TIME: 3, RTT: 0, *** NO BID *** REASON: Server stopped.

But for some reasons, for the Smaato / Native (App Wall), I have this error?

java.lang.ClassCastException: com.fasterxml.jackson.databind.node.TextNode cannot be cast to com.fasterxml.jackson.databind.node.ArrayNode
at com.xrtb.pojo.BidRequest.setup(BidRequest.java:529)
at com.xrtb.pojo.BidRequest.(BidRequest.java:323)
at com.xrtb.exchanges.Smaato.(Smaato.java:48)
at com.xrtb.exchanges.Smaato.copy(Smaato.java:59)
at com.xrtb.exchanges.Smaato.copy(Smaato.java:19)
at com.xrtb.bidder.Handler.handle(RTBServer.java:707)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:189)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
at org.eclipse.jetty.server.Server.handle(Server.java:523)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:320)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
at java.lang.Thread.run(Thread.java:745)
{
"id" : "9db3e877-5719-14f6-c24e-5b7ae02b110b",
"at" : 2,
"imp" : [ {
"id" : "9db3e877-5719-14f6-c24e-5b7ae02b110b",
"instl" : 0,
"native" : {
"layout" : 2,
"assets" : [ {
"id" : 1,
"required" : 1,
"title" : {
"len" : 30
}
}, {
"id" : 2,
"required" : 0,
"data" : {
"type" : 3,
"len" : 5
}
}, {
"id" : 3,
"required" : 1,
"img" : {
"type" : 1,
"w" : 64,
"h" : 64,
"mimes" : "image/png"
}
}, {
"id" : 4,
"required" : 0,
"data" : {
"type" : 2,
"len" : 10
}
} ]
},
"ext" : {
"nex_screen" : 0
}
} ],
"site" : {
"id" : "99201",
"name" : "BidderTestMobileWEB",
"domain" : "junk1.com",
"cat" : [ "IAB1", "IAB2" ],
"keywords" : "radiation",
"page" : "http://www.nexage.com",
"ref" : "http://www.iab.net",
"search" : "radiation",
"publisher" : {
"id" : "98401",
"name" : "testme"
},
"ext" : {
"nex_coppa" : 0
},
"gender" : "F"
},
"device" : {
"didsha1" : "132079238ec783b0b89dff308e1f9bdd08576273",
"dpidsha1" : "f22711a823044bb9ce7ace097955de0286eb0182",
"ip" : "166.137.138.18",
"carrier" : "ATT",
"ua" : "Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_2_1 like Mac OS X; el-gr) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8C148 Safari/6533.18.5",
"make" : "Apple",
"model" : "iPhone",
"osv" : "3.1.2",
"connectiontype" : 3,
"devicetype" : 1,
"geo" : {
"lat" : 42.378,
"lon" : -71.227,
"country" : "USA"
}
},
"user" : {
"id" : "ASDFJKL",
"yob" : 1961,
"gender" : "F",
"keywords" : "sports",
"geo" : {
"country" : "USA",
"city" : "Waltham",
"zip" : "02451",
"region" : "MA",
"type" : 3
},
"ext" : {
"nex_eth" : "4",
"nex_marital" : "M",
"nex_kids" : "N",
"nex_hhi" : 75000,
"nex_dma" : "Boston"
}
},
"ext" : {
"coppa" : 0,
"udi" : {
"googleadid" : "5e2efab6-7721-4cfe-b542-97084d5aa62f",
"googlednt" : 0,
"atuid" : "a90377ab-190b-1036-f424-ac10fdb8ffef"
},
"operaminibrowser" : 0,
"carriername" : "Verizon Wireless"
}
}

smaato ... automatic test is failing

Dear Ben;

Recently, we had 1.5 issues running through the Smaato automatic test. 1 (+ another potential issue?).

A: the file related to the Smaato textad template was wrong: see the none matching <clickText> with </imgUrl>.

static String  TEXTAD_TEMPLATE = "" +
			"<ad>" +
			"<textAd>" +
			"<clickUrl>__CLICKURL__</clickUrl>" +
			"<clickTextl>__TEXT__</imgUrl>" +
			"<toolTip>__TOOLTIP__</toolTip>" +
			"<additionalText>__ADDITIONALTEXT__</additionalText>" +
			"<beacons>" +
			"<beacon>__PIXELURL__</beacon>" +
			"</beacons>" +
			"</textAd>" +
			"</ad>";

Obviously, it should be </clickText> and not </imgUrl>. I can provide the code I used to pass the test.

B) Another issue is the rounding of the Win Cost during that run. This is a simple rounding, although I had the impression that the last win cost was not accounted for. On the Web admin interface, it was correct, and via the accountant (spark) is was just a bit off, and in case of rounding ... you could fail the test.

Hope this helps, and happy to send more details on the textad template issue if this is not clear. For the rounding, this was annoying, although this is just a test, and in real life, such a small rounding is not a real issue at all.

Thanks,

P.

Connect to Smaato Status: Test failed

Hello, I follow
Step by step www.rtb4free.com/smaato.html
Status: Test failed
Error message:
Your server returned a "no bid" response when it was expected to return a valid bid.
Context information:

URL used to request your server = http://45.56.95.67/rtb/bids/smaato?testbid=bid
Ad type(s) requested = Txt

{
"at":2,
"device":{
"connectiontype":0,
"devicetype":1,
"geo":{
"lat":42.357777,
"lon":-71.06167,
"type":1
},
"ip":"201.252.0.0",
"js":0,
"make":"Apple",
"model":"iPhone",
"os":"iOS",
"osv":"1.2.3",
"ua":"Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_0 like Mac OS X; en-us) AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0 Mobile/7A341 Safari/528.16"
},
"ext":{
"coppa":0,
"operaminibrowser":0,
"udi":{ }
},
"id":"8xaQKCskPe",
"imp":[
{
"banner":{
"btype":[
2,
3
],
"h":20,
"mimes":[
"text/html",
"text/plain"
],
"w":120
},
"displaymanager":"SOMA",
"id":"1",
"instl":0
}
],
"site":{
"cat":[
"IAB1"
],
"domain":"www.jacksbar.co.uk",
"id":"0",
"name":"Jack Rabbit Slims",
"publisher":{
"id":"6"
}
},
"user":{
"gender":"M",
"yob":1983
}
}

Documentation to remove barriers to entry

Hello and thank you for the great library.
I am trying to launch a production scale RTB bidder and I this library in the process.
Although there is a good amount of documentation provided with the system, it is still hard to figure out how to launch it in a production environment, i.e: what other components should or must be provided and how to wire them into the system.
A good starting point IMHO would be to simply list the ZeroMQ channels and their formats.
Also taking a quick look at the code, it seemed unclear to me how at least some of the commands in the xrtb.tools.Commands class could be executed - seeing that the "Delete campaign" command looks like it is directly executed into aerospike.
Again thank you for the great library you've provided, I think with proper documentation it could gain huge traction and is a great contribution to the RTB development community.

java.lang.NullPointerException when "multibid" : true

I got this error when I activated multibid. This exception occurs randomly:

java.lang.NullPointerException
at com.xrtb.bidder.CampaignSelector.getMaxConnections(CampaignSelector.java:336)
at com.xrtb.bidder.Handler.handle(RTBServer.java:1010)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1584)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1557)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
at org.eclipse.jetty.server.Server.handle(Server.java:564)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:318)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:112)
at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
at org.eclipse.jetty.util.thread.Invocable.invokePreferred(Invocable.java:122)
at org.eclipse.jetty.util.thread.strategy.ExecutingExecutionStrategy.invoke(ExecutingExecutionStrategy.java:58)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:201)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produce(ExecuteProduceConsume.java:97)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:672)
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:590)
at java.lang.Thread.run(Thread.java:745)

Code at lines:
(RTBServer.java:1010) : bresp = CampaignSelector.getInstance().getMaxConnections(br);
(CampaignSelector.java:336) : winner.capSpec = select.capSpec;

I found on Internet that it may be HashMap and maybe using ConcurrentHashMap will solve it but I have no lucky fixing it.

Best regards.

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.