Difference between revisions of "How to run a simulation of a control plane with ERSAP backend"

From epsciwiki
Jump to navigation Jump to search
Line 42: Line 42:
  
 
'''Running the ejfat repository's gRPC enabled programs to:'''
 
'''Running the ejfat repository's gRPC enabled programs to:'''
#: simulate the control plane
+
# simulate the control plane
#: send data
+
# send data to the backend
#: reassemble data' and send data to control plane
+
# reassemble backend data and send info to control plane
  
  

Revision as of 15:14, 4 January 2023


Start with the gRPC installation directory and define some environmental variables
export GRPC_INSTALL_DIR=/daqfs/gRPC/installation
export GRPC_JAVA_INSTALL_DIR=/daqfs/gRPC/java_installation
export PATH="$GRPC_INSTALL_DIR/bin:$PATH"
export LD_LIBRARY_PATH="$GRPC_INSTALL_DIR/lib:$LD_LIBRARY_PATH"


Running the ET related programs


Access to ET system files has been made simple by placing them into the gRPC installation
ET libraries are in $GRPC_INSTALL_DIR/lib
ET includes are in $GRPC_INSTALL_DIR/include
ET executables are in $GRPC_INSTALL_DIR/bin
ET jar file is in $GRPC_JAVA_INSTALL_DIR/jars


Run the ET system as a fifo. Use 1000, 150kB buffers
cd $GRPC_INSTALL_DIR/bin
./et_start_fifo -f /tmp/fifoEt -d -s 150000 -n 1 -e 1000
On the same node, run a java-based consumer of ET system buffers with a delay of 1 microsec between fifo gets (ERSAP simulator)
java -cp $GRPC_JAVA_INSTALL_DIR/jars/*  org.jlab.coda.et.apps.ErsapFifoConsumer -f /tmp/fifoEt -v -d 1


Running the ejfat repository's gRPC enabled programs to:

  1. simulate the control plane
  2. send data to the backend
  3. reassemble backend data and send info to control plane


Compile the code in the ersap branch of the ejfat repository'
cd <ejfat dir>/build
git pull
rm CMakeCache.txt
cmake .. -DBUILD_ET=1 -DBUILD_GRPC=1
make
Run the simulated control plane
cd $GRPC_INSTALL_DIR/bin
./control_plane -a 127.0.0.1 -p 50051


Run the data reassembler
--reassembler
Run the data sender
--sender