Skip to content

Instantly share code, notes, and snippets.

# RTBKIT exchange makefile
LIBRTB_EXCHANGE_SOURCES := \
http_exchange_connector.cc \
http_auction_handler.cc
LIBRTB_EXCHANGE_LINK := \
zeromq boost_thread utils endpoint services rtb bid_request
$(eval $(call library,exchange,$(LIBRTB_EXCHANGE_SOURCES),$(LIBRTB_EXCHANGE_LINK)))
# RTBKIT adserver makefile
LIBADSERVERCONNECTOR_SOURCES := \
adserver_connector.cc \
http_adserver_connector.cc
LIBADSERVERCONNECTOR_LINK := \
zeromq boost_thread utils endpoint services rtb gc
$(eval $(call library,adserver_connector, \
#------------------------------------------------------------------------------#
# examples.mk
# Rémi Attab, 14 Feb 2013
# Copyright (c) 2013 Datacratic. All rights reserved.
#
# Makefile for various RTBkit examples.
#------------------------------------------------------------------------------#
$(eval $(call library,augmentor_ex,augmentor_ex.cc,augmentor_base rtb bid_request agent_configuration))
$(eval $(call library,mock_exchange,mock_exchange_connector.cc,exchange))
# -*- coding: utf-8 -*-
from pymongo import MongoClient
import uuid
import json
import requests
client = MongoClient('mongodb://')
db = client['rtbkit']
url = 'dspurl'
#include "smaato_exchange_connector.h"
#include "rtbkit/plugins/bid_request/openrtb_bid_request.h"
#include "rtbkit/plugins/exchange/http_auction_handler.h"
#include "rtbkit/core/agent_configuration/agent_config.h"
#include "openrtb/openrtb_parsing.h"
#include "soa/types/json_printing.h"
#include <boost/any.hpp>
#include <boost/xpressive/xpressive.hpp>
#include <boost/lexical_cast.hpp>
#include "jml/utils/file_functions.h"
#pragma once
#include "rtbkit/plugins/exchange/http_exchange_connector.h"
namespace RTBKIT {
struct SmaatoExchangeConnector : public HttpExchangeConnector {
SmaatoExchangeConnector(ServiceBase & owner, const std::string & name);
SmaatoExchangeConnector(const std::string & name,
std::shared_ptr<ServiceProxies> proxies);
#include <memory>
#include "rtbkit/common/account_key.h"
#include "rtbkit/common/currency.h"
#include "rtbkit/common/json_holder.h"
#include "smaato_adserver_connector.h"
using namespace std;
using namespace RTBKIT;
#pragma once
#include <string>
#include "soa/service/http_endpoint.h"
#include "soa/service/json_endpoint.h"
#include "soa/service/zmq_named_pub_sub.h"
#include "adserver_connector.h"
namespace RTBKIT {
var child_process = require('child_process');
var net = require('net');
var tcpSrv = net.createServer();
tcpSrv.listen(3000, function() {
for (var i = 1; i <= 4; i++) {
var worker = child_process.fork('worker.js');
worker.send(i, tcpSrv._handle);
}
tcpSrv.close();
#pragma once
#include <vector>
#include "soa/types/id.h"
#include "soa/types/string.h"
#include "soa/types/url.h"
#include "jml/utils/compact_vector.h"
#include "soa/jsoncpp/value.h"
#include "openrtb/openrtb.h"
#include "openrtb/openrtb_parsing.h"