<commit_before>XRTB
=====================

NOTE: THIS IS A WORK IN PROGRESS

===========================

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

This RTB project contains 3 major components: 1) A Real Time Bidding engine; 2) A Test page for sending
test bids to the bidder; 3) A campaign manager for creating advertising campaigns.

This project is for those fairly familiar with RTB. With a basic understanding of RTB, this project will get you up and running with a commercial grade bidder in a short period of time.

Note, a major component of a commercial RTB system is a database for doing all those production things like campaign management, bid tracking, win handling and click through accounting. This project doesn't include any of that, However, the XRTB uses a publish/subscribe system (in REDIS) that will allow you to connect these functions of the bidder into your own custom database.

A production bidding enterprise would most likely require multiple bidding engines running behind a firewall. This project does not provide NGINX or AWS Load Balancer (or similar) infrastructure for this, you will need to tailor the 
administration of the XRTB to deal with these production issues. The XRTB comes out of the box ready to run in
a multi-server bidding farm, you just need to lash it up and administer it.


BUILDING THE SYSTEM
=======================

This is a maven project.

You will need Maven and REDIS installed to build the system. The libraries required are automatically retrieved by Maven. To see the dependencies, Look in the pom.xml file

If you use Eclipse make sure you use this as a maven prokect

Note, there is a .gitignore file included.

Build the Site
----------------------------------------
Now use Maven to build the system

$mvn site

----> This will compile the sources, generate the API docs and the JUNIT tests.

The API documentation in target/site/apidocs/allclasses-frame.html
The Surefire reports are in target/site/surefire-report.html

Create the All Inclusive Jar File
--------------------------------------
Now create the all inclusive jar file:

$mvn assembly:assembly -DdescriptorId=jar-with-dependencies  -Dmaven.test.skip=true


QUICKLY BUILD, RUN AND TEST THE SYSTEM
=============================================
Here's the absolutely fastest way to get RTB4FREE running on your local machine. Note, REDIS server
must also be running on the local machine as well. You can change the configuration up later 
using this as a guide: http://rtb4free.com/details.html#CONFIGURATION

The following brings the RTB4FREE system up and running on your local machine in 5 minutes, presuming you have Git REDIS, Ant, and Java 1.8 installed on your local machine and REDIS is already running.

In one window:

	$git clone https://github.com/benmfaul/XRTB.git
	cd XRTB
	$mvn site
	$mvn assembly:assembly -DdescriptorId=jar-with-dependencies  -Dmaven.test.skip=true
	$tools/load-database
	$tools/rtb4free

				
You should see the RTB4FREE bidder come up, and print some logging information. The configuration data file<commit_msg>Remove extraneous maven<commit_after>XRTB
=====================

NOTE: THIS IS A WORK IN PROGRESS

===========================

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

This RTB project contains 3 major components: 1) A Real Time Bidding engine; 2) A Test page for sending
test bids to the bidder; 3) A campaign manager for creating advertising campaigns.

This project is for those fairly familiar with RTB. With a basic understanding of RTB, this project will get you up and running with a commercial grade bidder in a short period of time.

Note, a major component of a commercial RTB system is a database for doing all those production things like campaign management, bid tracking, win handling and click through accounting. This project doesn't include any of that, However, the XRTB uses a publish/subscribe system (in REDIS) that will allow you to connect these functions of the bidder into your own custom database.

A production bidding enterprise would most likely require multiple bidding engines running behind a firewall. This project does not provide NGINX or AWS Load Balancer (or similar) infrastructure for this, you will need to tailor the 
administration of the XRTB to deal with these production issues. The XRTB comes out of the box ready to run in
a multi-server bidding farm, you just need to lash it up and administer it.


BUILDING THE SYSTEM
=======================

This is a maven project.

You will need Maven and REDIS installed to build the system. The libraries required are automatically retrieved by Maven. To see the dependencies, Look in the pom.xml file

If you use Eclipse make sure you use this as a maven prokect

Note, there is a .gitignore file included.

Build the Site
----------------------------------------
Now use Maven to build the system

$mvn site

----> This will compile the sources, generate the API docs and the JUNIT tests.

The API documentation in target/site/apidocs/allclasses-frame.html
The Surefire reports are in target/site/surefire-report.html

Create the All Inclusive Jar File
--------------------------------------
Now create the all inclusive jar file:

$mvn assembly:assembly -DdescriptorId=jar-with-dependencies  -Dmaven.test.skip=true


QUICKLY BUILD, RUN AND TEST THE SYSTEM
=============================================
Here's the absolutely fastest way to get RTB4FREE running on your local machine. Note, REDIS server
must also be running on the local machine as well. You can change the configuration up later 
using this as a guide: http://rtb4free.com/details.html#CONFIGURATION

The following brings the RTB4FREE system up and running on your local machine in 5 minutes, presuming you have Git REDIS, Ant, and Java 1.8 installed on your local machine and REDIS is already running.

In one window:

	$git clone https://github.com/benmfaul/XRTB.git
	cd XRTB
	$mvn assembly:assembly -DdescriptorId=jar-with-dependencies  -Dmaven.test.skip=true
	$tools/load-database
	$tools/rtb4free

				
You should see the RTB4FREE bidder come up, and print some logging information. The configuration data file
{'fraction_non_alphanumeric': 0.1007601487950833, 'fraction_numerical': 0.005175481158013909, 'mean_word_length': 3.931419457735247, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3034594', 'n_tokens_mistral': 1625, 'n_tokens_neox': 1522, 'n_words': 879}