[svn] commit: r2787 - in /experiments/stephen-receptionist: ./ client/ common/ contractor/ intermediary/ receptionist/ scripts/ server/ worker/
BIND 10 source code commits
bind10-changes at lists.isc.org
Mon Aug 23 15:24:26 UTC 2010
Author: stephen
Date: Mon Aug 23 15:24:25 2010
New Revision: 2787
Log:
Now allows multiple worker/contractor processes in receptionist/intermediary models
Added:
experiments/stephen-receptionist/common/burst_server_controller2.cc
experiments/stephen-receptionist/common/children.cc
experiments/stephen-receptionist/common/children.h
experiments/stephen-receptionist/common/msgq_communicator_client.cc
experiments/stephen-receptionist/common/msgq_communicator_client.h
experiments/stephen-receptionist/common/msgq_communicator_server.cc
experiments/stephen-receptionist/common/msgq_communicator_server.h
experiments/stephen-receptionist/scripts/run_test.sh (with props)
Modified:
experiments/stephen-receptionist/Makefile.am
experiments/stephen-receptionist/client/client_controller_asynchronous.cc
experiments/stephen-receptionist/common/Makefile.am
experiments/stephen-receptionist/common/burst_server_controller.cc
experiments/stephen-receptionist/common/burst_server_controller.h
experiments/stephen-receptionist/common/communicator.h
experiments/stephen-receptionist/common/debug.h
experiments/stephen-receptionist/common/defaults.h
experiments/stephen-receptionist/common/exception.h
experiments/stephen-receptionist/common/msgq_communicator.h
experiments/stephen-receptionist/common/queue_clear.cc
experiments/stephen-receptionist/common/target_command.cc
experiments/stephen-receptionist/common/target_command.h
experiments/stephen-receptionist/common/udp_communicator.h
experiments/stephen-receptionist/contractor/contractor.cc
experiments/stephen-receptionist/intermediary/intermediary.cc
experiments/stephen-receptionist/intermediary/intermediary_controller.cc
experiments/stephen-receptionist/intermediary/intermediary_controller.h
experiments/stephen-receptionist/receptionist/receptionist.cc
experiments/stephen-receptionist/receptionist/receptionist_controller.cc
experiments/stephen-receptionist/receptionist/receptionist_controller.h
experiments/stephen-receptionist/scripts/common.sh
experiments/stephen-receptionist/server/server.cc
experiments/stephen-receptionist/worker/worker.cc
Modified: experiments/stephen-receptionist/Makefile.am
==============================================================================
--- experiments/stephen-receptionist/Makefile.am (original)
+++ experiments/stephen-receptionist/Makefile.am Mon Aug 23 15:24:25 2010
@@ -9,3 +9,4 @@
dist_bin_SCRIPTS += scripts/client-worker.sh
dist_bin_SCRIPTS += scripts/common.sh
dist_bin_SCRIPTS += scripts/run_all.sh
+dist_bin_SCRIPTS += scripts/run_test.sh
Modified: experiments/stephen-receptionist/client/client_controller_asynchronous.cc
==============================================================================
--- experiments/stephen-receptionist/client/client_controller_asynchronous.cc (original)
+++ experiments/stephen-receptionist/client/client_controller_asynchronous.cc Mon Aug 23 15:24:25 2010
@@ -113,7 +113,7 @@
lost_ += missing;
last_packet = this_packet;
} else {
- std::cout << "ERROR: packets received out of sequence\n";
+ Debug::log("Packet received out of sequence", DebugFlags::LOST_PACKETS);
}
Modified: experiments/stephen-receptionist/common/Makefile.am
==============================================================================
--- experiments/stephen-receptionist/common/Makefile.am (original)
+++ experiments/stephen-receptionist/common/Makefile.am Mon Aug 23 15:24:25 2010
@@ -1,8 +1,12 @@
lib_LIBRARIES = libcommon.a
-libcommon_a_SOURCES = debug.cc debug.h debug_flags.h
+libcommon_a_SOURCES = children.cc children.h
+libcommon_a_SOURCES += debug.cc debug.h debug_flags.h
libcommon_a_SOURCES += burst_server_controller.cc burst_server_controller.h
+libcommon_a_SOURCES += burst_server_controller2.cc
libcommon_a_SOURCES += msgq_communicator.cc msgq_communicator.h
+libcommon_a_SOURCES += msgq_communicator_client.cc msgq_communicator_client.h
+libcommon_a_SOURCES += msgq_communicator_server.cc msgq_communicator_server.h
libcommon_a_SOURCES += packet_counter.cc packet_counter.h
libcommon_a_SOURCES += target_command.cc target_command.h
libcommon_a_SOURCES += udp_buffer.cc udp_buffer.h
Modified: experiments/stephen-receptionist/common/burst_server_controller.cc
==============================================================================
--- experiments/stephen-receptionist/common/burst_server_controller.cc (original)
+++ experiments/stephen-receptionist/common/burst_server_controller.cc Mon Aug 23 15:24:25 2010
@@ -36,6 +36,12 @@
// Initialize the packet count (outputs info on SIGTERM).
PacketCounter counter;
+ // If a memory size was specified, allocate it.
+ char* memory = NULL;
+ if (memsize_ > 0) {
+ memory = new char[memsize_ * 1024];
+ }
+
std::list<UdpBuffer> queue; //< Send/receive queue
while (true) { // Forever
@@ -53,6 +59,12 @@
li->setCrc(crc);
}
+ // If a memory size was specified, run over the memory and touch
+ // each page (assumed to be 1kB pages to cope with most architectures)
+ if (memsize_ > 0) {
+ touchMemory(memory, memsize_);
+ }
+
// Now return the packets back to the sender
for (li = queue.begin(); li != queue.end(); ++li) {
Debug::log(counter.incrementSend(), "Calling send");
Modified: experiments/stephen-receptionist/common/burst_server_controller.h
==============================================================================
--- experiments/stephen-receptionist/common/burst_server_controller.h (original)
+++ experiments/stephen-receptionist/common/burst_server_controller.h Mon Aug 23 15:24:25 2010
@@ -40,7 +40,8 @@
///
/// \param burst Burst value. The server will read this number of packets
/// before passing them to the sender.
- BurstServerController(uint32_t burst) : Controller(), burst_(burst)
+ BurstServerController(uint32_t burst, uint32_t memsize) : Controller(),
+ burst_(burst), memsize_(memsize)
{}
virtual ~BurstServerController() {}
@@ -58,6 +59,21 @@
private:
uint32_t burst_; //< Burst limit
+ uint32_t memsize_; //< Memory size
+
+ /// \brief Touches Memory
+ ///
+ /// Runs over the memory specified and modifes every 1024th location. In
+ /// this way all memory is pulled into the working set (and hence cache).
+ /// This is a way of checking how memory size affects the scheduling
+ /// performance.
+ ///
+ /// The action is put into an external function to ensure that it is not
+ /// optimised away.
+ ///
+ /// \param memory Pointer to allocated memory
+ /// \param size Amount of memory allocated in kB.
+ void touchMemory(char* memory, uint32_t size);
};
Modified: experiments/stephen-receptionist/common/communicator.h
==============================================================================
--- experiments/stephen-receptionist/common/communicator.h (original)
+++ experiments/stephen-receptionist/common/communicator.h Mon Aug 23 15:24:25 2010
@@ -59,6 +59,14 @@
/// \param buffer Data to be sent to the server.
virtual void send(UdpBuffer& buffer) = 0;
+ /// \brief Send data to server
+ ///
+ /// Sends data to the server on particular channel without waiting.
+ ///
+ /// \param channel Channel on which data is to be sent
+ /// \param buffer Data to be sent to the server.
+ virtual void send(uint32_t channel, UdpBuffer& buffer) = 0;
+
/// \brief Receive data from the server
///
/// Receives data from the server. This call blocks until data is received
Modified: experiments/stephen-receptionist/common/debug.h
==============================================================================
--- experiments/stephen-receptionist/common/debug.h (original)
+++ experiments/stephen-receptionist/common/debug.h Mon Aug 23 15:24:25 2010
@@ -65,7 +65,7 @@
/// \param message Text to output
static void log(int number, const char* message, uint32_t flag = 0x01) {
if (flagSet(flag)) {
- std::cout << number << ") " << message << std::endl;
+ std::cout << std::dec << number << ") " << message << std::endl;
}
}
Modified: experiments/stephen-receptionist/common/defaults.h
==============================================================================
--- experiments/stephen-receptionist/common/defaults.h (original)
+++ experiments/stephen-receptionist/common/defaults.h Mon Aug 23 15:24:25 2010
@@ -33,10 +33,12 @@
static const uint32_t CL_DEF_DEBUG = 0;
static const std::string CL_DEF_LOGFILE = "";
static const uint32_t CL_DEF_LOST = 4;
+static const uint32_t CL_DEF_MEMSIZE = 0;
static const uint32_t CL_DEF_OUTSTANDING = 8;
static const uint32_t CL_DEF_PERCENT = 100;
static const uint16_t CL_DEF_PKTSIZE = 8192;
static const uint16_t CL_DEF_PORT = 5400;
+static const uint16_t CL_DEF_QUEUE = 1;
/// \brief UDP/IP defaults.
Modified: experiments/stephen-receptionist/common/exception.h
==============================================================================
--- experiments/stephen-receptionist/common/exception.h (original)
+++ experiments/stephen-receptionist/common/exception.h Mon Aug 23 15:24:25 2010
@@ -86,4 +86,13 @@
{}
};
+/// \brief Exception thrown is a queue does not exist
+
+class QueueNotExist : public Exception {
+ public:
+ QueueNotExist(const char* why = "Queue does not exist") :
+ Exception(why)
+ {}
+};
+
#endif // __EXCEPTION_H
Modified: experiments/stephen-receptionist/common/msgq_communicator.h
==============================================================================
--- experiments/stephen-receptionist/common/msgq_communicator.h (original)
+++ experiments/stephen-receptionist/common/msgq_communicator.h Mon Aug 23 15:24:25 2010
@@ -62,6 +62,18 @@
/// \brief Send data
///
+ /// Places a packet of data on the outgoing message queue, waiting if
+ /// there is no space available. As there is only one channel, this
+ /// just maps to the other send.
+ ///
+ /// \param channel Channel on which to send data
+ /// \param buffer Data to be sent to the server.
+ virtual void send(uint32_t channel, UdpBuffer& buffer) {
+ send(buffer);
+ }
+
+ /// \brief Send data
+ ///
/// Places a pqacket of data on the outgoing message queue, waiting if
/// there is no space available.
///
Modified: experiments/stephen-receptionist/common/queue_clear.cc
==============================================================================
--- experiments/stephen-receptionist/common/queue_clear.cc (original)
+++ experiments/stephen-receptionist/common/queue_clear.cc Mon Aug 23 15:24:25 2010
@@ -18,13 +18,24 @@
///
/// Stand-alone utility to deletes the created message queues.
+#include <iostream>
+#include <string>
+
+#include <boost/lexical_cast.hpp>
#include <boost/interprocess/ipc/message_queue.hpp>
-#include "defaults.h"
int main(int argc, char** argv) {
- (void) boost::interprocess::message_queue::remove(
- QUEUE_UNPROCESSED_NAME.c_str());
- (void) boost::interprocess::message_queue::remove(
- QUEUE_PROCESSED_NAME.c_str());
+
+ if (argc != 2) {
+ std::cout << "Usage: queue_clear number_of_queues\n";
+ }
+ else {
+ for (int i = 0; i < boost::lexical_cast<int>(argv[1]); ++i) {
+ std::string queue = std::string("ISC_QUEUE_") +
+ boost::lexical_cast<std::string>(i);
+ (void) boost::interprocess::message_queue::remove(queue.c_str());
+ }
+ }
+
return 0;
}
Modified: experiments/stephen-receptionist/common/target_command.cc
==============================================================================
--- experiments/stephen-receptionist/common/target_command.cc (original)
+++ experiments/stephen-receptionist/common/target_command.cc Mon Aug 23 15:24:25 2010
@@ -61,21 +61,28 @@
void
TargetCommand::parseCommandLine(int argc, char** argv) {
- uint32_t debug; // Debug level
// Set up the command-line options
desc_.add_options()
- ("help", "produce help message")
+ ("help,h", "produce help message")
("burst,b",
po::value<uint32_t>(&burst_)->default_value(CL_DEF_BURST),
"Burst size: number of packets processed at one time")
("debug,d",
- po::value<uint32_t>(&debug)->default_value(CL_DEF_DEBUG),
+ po::value<uint32_t>(&debug_)->default_value(CL_DEF_DEBUG),
"Debug level: a value of 0 disables debug messages")
+ ("memsize,m",
+ po::value<uint32_t>(&memsize_)->default_value(CL_DEF_MEMSIZE),
+ "Memory size (in kB) to represent true size of a process")
("port,p",
po::value<uint16_t>(&port_)->default_value(CL_DEF_PORT),
- "Port on which to listen");
+ "Port on which to listen")
+ ("queue,q",
+ po::value<uint32_t>(&queue_)->default_value(CL_DEF_QUEUE),
+ "Message queue on which to listen")
+ ("worker,w",
+ po::value<std::string>(&worker_), "Worker image name");
// Parse
@@ -84,7 +91,7 @@
// ... and handle options that we can cope with internally.
- Debug::setLevel(debug);
+ Debug::setLevel(debug_);
return;
}
Modified: experiments/stephen-receptionist/common/target_command.h
==============================================================================
--- experiments/stephen-receptionist/common/target_command.h (original)
+++ experiments/stephen-receptionist/common/target_command.h Mon Aug 23 15:24:25 2010
@@ -64,6 +64,27 @@
return burst_;
}
+ /// \return Current setting of debug flag
+ uint32_t getDebug() const {
+ return debug_;
+ }
+
+ /// \return Memory size (in kB)
+ uint32_t getMemorySize() const {
+ return memsize_;
+ }
+
+ /// \return The queue number for receiving information from the client
+ uint32_t getQueue() const {
+ return queue_;
+ }
+
+ /// \return File spec of the worker to run. A number of worker
+ /// processes equal to the queue count are started
+ std::string getWorker() const {
+ return worker_;
+ }
+
private:
/// \brief Parse command line.
/// Sets up all the command-line options (and their defaults) and parses
@@ -76,8 +97,12 @@
void parseCommandLine(int argc, char** argv);
private:
+ uint32_t debug_; //< Debug value
uint16_t port_; //< Port number on target to which to connect
+ uint32_t queue_; //< Queue number on which to receive data
uint32_t burst_; //< Burst size (for processing)
+ uint32_t memsize_; //< Memory size (in kB)
+ std::string worker_; //< Worker process
boost::program_options::options_description desc_; //< Options description structure
boost::program_options::variables_map vm_; //< Maps variables to values
};
Modified: experiments/stephen-receptionist/common/udp_communicator.h
==============================================================================
--- experiments/stephen-receptionist/common/udp_communicator.h (original)
+++ experiments/stephen-receptionist/common/udp_communicator.h Mon Aug 23 15:24:25 2010
@@ -68,6 +68,17 @@
/// \brief Send data to udp
///
+ /// Sends data to the udp without waiting. As there is only one channel,
+ /// this just maps to the other send function.
+ ///
+ /// \param channel Channel on which to send data
+ /// \param buffer Data to be sent to the udp.
+ virtual void send(uint32_t channel, UdpBuffer& buffer) {
+ send(buffer);
+ }
+
+ /// \brief Send data to udp
+ ///
/// Sends data to the udp without waiting.
///
/// \param buffer Data to be sent to the udp.
Modified: experiments/stephen-receptionist/contractor/contractor.cc
==============================================================================
--- experiments/stephen-receptionist/contractor/contractor.cc (original)
+++ experiments/stephen-receptionist/contractor/contractor.cc Mon Aug 23 15:24:25 2010
@@ -14,7 +14,7 @@
// $Id$
-/// \brief Worker process for intermediary
+/// \brief Contractor process for intermediary
///
/// This process (the contractor) receives data packets from the intermediary,
/// processes them (by adding a four-byte CRC) then returns them to the original
@@ -22,7 +22,7 @@
///
/// The program is invoked with the command:
///
-/// worker [--burst <burst>]
+/// contractor [--burst <burst>]
///
/// where...
///
@@ -37,7 +37,7 @@
#include "burst_server_controller.h"
#include "defaults.h"
#include "exception.h"
-#include "msgq_communicator.h"
+#include "msgq_communicator_server.h"
#include "target_command.h"
#include <string.h>
@@ -53,12 +53,12 @@
}
// Create the I/O module and initialize.
- MsgqCommunicator communicator(QUEUE_PROCESSED_NAME,
- QUEUE_UNPROCESSED_NAME);
+ MsgqCommunicatorServer communicator(command.getQueue());
communicator.open();
// Create the task controller.
- BurstServerController controller(command.getBurst());
+ BurstServerController controller(command.getBurst(),
+ command.getMemorySize());
// ... and enter the run loop.
Modified: experiments/stephen-receptionist/intermediary/intermediary.cc
==============================================================================
--- experiments/stephen-receptionist/intermediary/intermediary.cc (original)
+++ experiments/stephen-receptionist/intermediary/intermediary.cc Mon Aug 23 15:24:25 2010
@@ -35,9 +35,10 @@
#include <iostream>
#include <iomanip>
+#include "children.h"
#include "defaults.h"
#include "target_command.h"
-#include "msgq_communicator.h"
+#include "msgq_communicator_client.h"
#include "udp_communicator.h"
#include "intermediary_controller.h"
#include "exception.h"
@@ -52,16 +53,23 @@
return (0);
}
+ // Create the child processes if asked.
+ std::string worker = command.getWorker();
+ if (! worker.empty()) {
+ Children::spawnChildren(worker, command.getQueue(),
+ command.getMemorySize(), command.getDebug());
+ }
+
// Create the I/O modules and initialize.
UdpCommunicator client_communicator(command.getPort());
client_communicator.open();
- MsgqCommunicator contractor_communicator(QUEUE_UNPROCESSED_NAME,
- QUEUE_PROCESSED_NAME);
+ MsgqCommunicatorClient contractor_communicator(command.getQueue());
contractor_communicator.open();
// Create the task controller.
- IntermediaryController controller(command.getBurst());
+ IntermediaryController controller(command.getBurst(),
+ command.getQueue());
// ... and enter the run loop.
controller.run(client_communicator, contractor_communicator);
Modified: experiments/stephen-receptionist/intermediary/intermediary_controller.cc
==============================================================================
--- experiments/stephen-receptionist/intermediary/intermediary_controller.cc (original)
+++ experiments/stephen-receptionist/intermediary/intermediary_controller.cc Mon Aug 23 15:24:25 2010
@@ -47,6 +47,7 @@
PacketCounter counter; // Access global counters
std::list<UdpBuffer> queue; // Packet queue...
std::list<UdpBuffer>::iterator li; // and its iterator
+ uint32_t pktnum; // Packet number
while (true) { // Forever
@@ -61,7 +62,7 @@
// Forward them to the contractor via the message queue.
for (li = queue.begin(); li != queue.end(); ++li) {
Debug::log(counter.incrementSend(), "Sending data to contractor");
- contractor_communicator.send(*li);
+ contractor_communicator.send(((pktnum++ % ncontractor_) + 1), *li);
}
queue.clear();
}
Modified: experiments/stephen-receptionist/intermediary/intermediary_controller.h
==============================================================================
--- experiments/stephen-receptionist/intermediary/intermediary_controller.h (original)
+++ experiments/stephen-receptionist/intermediary/intermediary_controller.h Mon Aug 23 15:24:25 2010
@@ -42,7 +42,9 @@
///
/// \param burst Burst value. The intermediary will read this number of
/// packets before passing them to the sender.
- IntermediaryController(uint32_t burst) : Controller(), burst_(burst)
+ /// \param nworker Number of contractor processes.
+ IntermediaryController(uint32_t burst, uint32_t ncontractor) :
+ Controller(), burst_(burst), ncontractor_(ncontractor)
{}
virtual ~IntermediaryController() {}
@@ -74,6 +76,7 @@
private:
uint32_t burst_; //< Burst limit
+ uint32_t ncontractor_; //< Number of contractors
};
Modified: experiments/stephen-receptionist/receptionist/receptionist.cc
==============================================================================
--- experiments/stephen-receptionist/receptionist/receptionist.cc (original)
+++ experiments/stephen-receptionist/receptionist/receptionist.cc Mon Aug 23 15:24:25 2010
@@ -34,10 +34,19 @@
#include <iostream>
#include <iomanip>
+#include <vector>
+#include <boost/lexical_cast.hpp>
+#include <sys/types.h>
+#include <signal.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#include "children.h"
#include "defaults.h"
+#include "string.h"
#include "target_command.h"
-#include "msgq_communicator.h"
+#include "msgq_communicator_client.h"
#include "udp_communicator.h"
#include "receptionist_controller.h"
#include "exception.h"
@@ -52,16 +61,26 @@
return (0);
}
+ // Create the child processes if asked.
+ std::string worker = command.getWorker();
+ if (! worker.empty()) {
+ Children::spawnChildren(worker, command.getQueue(),
+ command.getMemorySize(), command.getDebug());
+ }
+
// Create the I/O modules and initialize.
UdpCommunicator client_communicator(command.getPort());
client_communicator.open();
- MsgqCommunicator worker_communicator(QUEUE_UNPROCESSED_NAME,
- QUEUE_PROCESSED_NAME);
+ // TODO: improve terminology
+ // Create a client message queue object (as the receptionist
+ // is client to the worker server). The --queue on the command
+ // line specifies the number of queues to create.
+ MsgqCommunicatorClient worker_communicator(command.getQueue());
worker_communicator.open();
// Create the task controller.
- ReceptionistController controller(command.getBurst());
+ ReceptionistController controller(command.getBurst(), command.getQueue());
// ... and enter the run loop.
Modified: experiments/stephen-receptionist/receptionist/receptionist_controller.cc
==============================================================================
--- experiments/stephen-receptionist/receptionist/receptionist_controller.cc (original)
+++ experiments/stephen-receptionist/receptionist/receptionist_controller.cc Mon Aug 23 15:24:25 2010
@@ -35,6 +35,7 @@
Communicator& processor_communicator) {
PacketCounter counter;
+ uint32_t pktnum = 0;
std::list<UdpBuffer> queue;
while (true) { // Forever
@@ -46,11 +47,13 @@
queue.push_back(data);
}
- // Send the packets onwards.
+ // Send the packets onwards, choosing a queue in a round-robin
+ // fashion.
for (std::list<UdpBuffer>::iterator li = queue.begin();
li != queue.end(); ++li) {
Debug::log(counter.incrementSend(), "Calling send");
- processor_communicator.send(*li);
+
+ processor_communicator.send(((pktnum++ % nworker_) + 1), *li);
}
queue.clear();
}
Modified: experiments/stephen-receptionist/receptionist/receptionist_controller.h
==============================================================================
--- experiments/stephen-receptionist/receptionist/receptionist_controller.h (original)
+++ experiments/stephen-receptionist/receptionist/receptionist_controller.h Mon Aug 23 15:24:25 2010
@@ -41,8 +41,11 @@
/// \brief Constructor
///
/// \param burst Burst value. The receptionist will read this number of
- /// packets before passing them to the sender.
- ReceptionistController(uint32_t burst) : Controller(), burst_(burst)
+ /// packets before passing them to the worker.
+ /// \param nworker Number of workers to which messages are sent in a round-
+ /// robin fashion.
+ ReceptionistController(uint32_t burst, uint32_t nworker) :
+ Controller(), burst_(burst), nworker_(nworker)
{}
virtual ~ReceptionistController() {}
@@ -57,8 +60,7 @@
private:
uint32_t burst_; //< Burst limit
+ uint32_t nworker_; //< Number of workers
};
-
-
#endif // __RECEPTIONIST_CONTROLLER_H
Modified: experiments/stephen-receptionist/scripts/common.sh
==============================================================================
--- experiments/stephen-receptionist/scripts/common.sh (original)
+++ experiments/stephen-receptionist/scripts/common.sh Mon Aug 23 15:24:25 2010
@@ -29,7 +29,7 @@
progdir=`dirname $0`
if [ $# -lt 2 -o $# -gt 4 ]; then
- echo "Usage: common [-a] logfile first-program [second-program]"
+ echo "Usage: common [-a] memsize logfile first-program [second-program]"
exit 1;
fi
@@ -42,12 +42,13 @@
# set the remaining parameters
-logfile=$1;
-first=$2
+memsize=$1
+logfile=$2
+first=$3
if [ $# = 2 ]; then
second=""
else
- second=$3
+ second=$4
fi
for burst in 1 2 4 8 16 32 64 128 256
Modified: experiments/stephen-receptionist/server/server.cc
==============================================================================
--- experiments/stephen-receptionist/server/server.cc (original)
+++ experiments/stephen-receptionist/server/server.cc Mon Aug 23 15:24:25 2010
@@ -57,7 +57,8 @@
communicator.open();
// Create the task controller.
- BurstServerController controller(command.getBurst());
+ BurstServerController controller(command.getBurst(),
+ command.getMemorySize());
// ... and enter the run loop.
Modified: experiments/stephen-receptionist/worker/worker.cc
==============================================================================
--- experiments/stephen-receptionist/worker/worker.cc (original)
+++ experiments/stephen-receptionist/worker/worker.cc Mon Aug 23 15:24:25 2010
@@ -41,7 +41,7 @@
#include "defaults.h"
#include "target_command.h"
-#include "msgq_communicator.h"
+#include "msgq_communicator_server.h"
#include "udp_communicator.h"
#include "burst_server_controller.h"
#include "exception.h"
@@ -60,8 +60,7 @@
// Create the communicator module for communicating with the
// receptionist.
- MsgqCommunicator receptionist_communicator(QUEUE_PROCESSED_NAME,
- QUEUE_UNPROCESSED_NAME);
+ MsgqCommunicatorServer receptionist_communicator(command.getQueue());
receptionist_communicator.open();
// Create the communicator for sending data back to the client.
@@ -69,7 +68,8 @@
client_communicator.open();
// Create the task controller.
- BurstServerController controller(command.getBurst());
+ BurstServerController controller(command.getBurst(),
+ command.getMemorySize());
// ... and enter the run loop.
More information about the bind10-changes
mailing list