lost-rob0t/starintel-server
GitHub: lost-rob0t/starintel-server
一个基于 Common Lisp 和 actor 模型的实验性统一 API 网关,提供事件驱动和可扩展的文档消费服务。
Stars: 1 | Forks: 0
#+title: 自述文件
- 功能:
- rabbitmq
- actor model
- 可定制扩展
** *警告*
*** 项目状态
这个代码库一团糟!
本项目处于实验阶段,请勿暴露于公网。
*** 消费者与 actor
在未来的版本中,当我想出一个好的 proto 并进一步了解 sento 时,负责插入的 consumer 将恢复为 cl-gserver actor。
类似于这样
#+begin_src lisp
(tell *couchdb* (:db "starintel" :id "0HJY....." :document (as-json (spec:create-user :dataset "github" :name "lost-rob0t"))))
#+end_src
我需要做更多的研究,以便更好地利用 sento 系统。
** 文档
*** 容器
关于镜像构建、密钥设置、迁移、备份和升级,请参阅 [[file:DOCKER.md][Nix 构建的 Compose 堆栈指南]]。
*** HTTP
有关 HTTP 文档,请参阅:[[file:./docs/http-api-docs.org][Api 文档]]
*** 配置开发环境
star-server 使用 nixpkgs 来管理开发 shell,这类似于本项目的 venv。
这不是必需的
首先安装 [[https://nixos.org/download/][Nix 包管理器]] 和 [[https://direnv.net/][Direnv]]。
同时请确保也安装了 [[https://www.quicklisp.org/beta/][Quicklisp]]。
#+Name: 配置开发环境
#+begin_src sh :async :results output replace
git clone --recurse-submodules https://github.com/lost-rob0t/starintel-gserver.git star-server && cd star-server;
direnv allow .
#+end_src
现在 nix 应该会拉取所有依赖,你将进入一个新的 shell,其中包含了所需的所有内容到 $PATH 中。
*** 在不使用 nix 的情况下从源码编译
确保你已安装 [[https://www.quicklisp.org/beta/][Quicklisp]]。
#+Name: 从源码编译
#+begin_src shell :async :results output replace
git clone --recurse-submodules https://github.com/lost-rob0t/starintel-gserver.git star-server && cd star-server;
make build
make install
#+end_src
*** 用法
#+Name: 用法
#+begin_src sh :async :results output replace
./star-server
#+end_src
#+RESULTS: 用法
#+begin_example
NAME:
star-server - Starintel 统一 API 和文档消费服务。
USAGE:
star-server [全局选项] [<命令>] [命令选项] [参数 ...]
OPTIONS:
--help 显示用法信息并退出
--version 显示版本并退出
COMMANDS:
start 启动服务器
AUTHORS:
nsaspy
LICENSE:
GPL v3
#+end_example
#+Name: start
#+begin_src shell :async :results output replace
./star-server start --help
#+end_src
#+RESULTS: start
#+begin_example
NAME:
star-server start - 启动服务器
USAGE:
star-server [全局选项] start [选项] [参数 ...]
OPTIONS:
--help 显示用法信息并退出
--version 显示版本并退出
-d, --debugger 启用远程调试
-i, --init init 文件的路径 [default: ./init.lisp] [env: $STAR_SERVER_INIT_FILE]
AUTHORS:
nsaspy
LICENSE:
GPL v3
#+end_example
标签:Actor模型, API网关, Common Lisp, CouchDB, RabbitMQ, 事件驱动, 后端开发, 请求拦截