整个系统被分为核心(Core)和边缘(Edge)两个部分。
核心部分负责处理核心业务逻辑。其应当由接受和输出运行时数据的纯函数组成。
边缘部分负责处理核心部分与外界(HTTP,Local)交互的部分,为核心函数的运行提供环境。
如此以来就能够尽可能地降低核心业务逻辑的复杂性,为其并发和测试提供了便利。
#include <cstdlib> | |
#include <iostream> | |
#include <string> | |
using namespace std; | |
wstring StringToWString(const string& str) | |
{ | |
wstring wstr; | |
size_t size; |
#pragma once | |
#include <iostream> | |
#include <vector> | |
#include <algorithm> | |
#include <stack> | |
using namespace std; | |
struct Edge | |
{ | |
int Start = -1; |