Multi-model RPC serving for eOn potentials. More...
#include "eon/ServeMode.h"#include "eon/EonLogger.h"#include "eon/Potential.h"#include "eon/ServeRpcServer.h"#include <algorithm>#include <sstream>#include <thread>#include <vector>Go to the source code of this file.
Namespaces | |
| namespace | eonc |
| RAII resource manager for the ARTn C library with global synchronization. | |
Functions | |
| void | eonc::serveMode (const Parameters ¶ms, const std::string &host, uint16_t port) |
| Start a single rgpot-compatible Cap'n Proto RPC server. | |
| void | eonc::serveMultiple (const std::vector< ServeEndpoint > &endpoints, const Parameters ¶ms) |
| Serve multiple potentials concurrently on different ports. | |
| void | eonc::serveReplicated (const Parameters ¶ms, const std::string &host, uint16_t base_port, size_t replicas) |
| Serve N replicas of the same potential across sequential ports. | |
| void | eonc::serveGateway (const Parameters ¶ms, const std::string &host, uint16_t port, size_t pool_size) |
| Start a gateway server backed by a pool of potential instances. | |
| void | eonc::serveFromConfig (const Parameters ¶ms) |
| Start serve mode from config-file parameters. | |
| std::vector< ServeEndpoint > | eonc::parseServeSpec (const std::string &spec) |
| Parse a serve configuration string into endpoints. | |
Multi-model RPC serving for eOn potentials.
Wraps any eOn Potential as a flat-array ForceCallback and serves it over Cap'n Proto RPC. Uses ForceCallback (std::function taking flat arrays) to completely avoid the AtomMatrix type collision between eOn's Eigen-based AtomMatrix and rgpot's custom AtomMatrix.
This translation unit includes eOn's Potential.h. The Cap'n Proto server code is in ServeRpcServer.cpp (separate TU to avoid naming collision with the capnp-generated Potential interface).
Definition in file ServeMode.cpp.