A brand new Group Bot (群机器人) library for WeCom (企业微信). Former version is DiaoBot.
wcbot | DiaoBot | |
---|---|---|
tlinux native |
Yes | Yes |
Library type | Static | Dynamic (SDK) |
Deployment | Single executable | Exe + SDK dylib + user dylib |
Config file | JSON | XML-like TFC config |
I/O multiplexing | libuv | select() by mongoose |
Parallel model | Multi-threading | Multi-threading |
Thread model | 1 main, N worker | 1 acceptor, 1 cronjob, N worker |
Worker model | Asynchronous (state machine) | Synchronous, thread-blocking |
Performance | High | Low |
Extensibility | High | N/A |
This time, we develop wcbot
from scratch. Performance and R&D efficiency are improved a lot. tlinux
native means there's only a gcc 4.8.5 (C++11) provided.
- CMake 3.1 +
- C++ compiler with C++11 support
libuv
libcurl
OpenSSL
(libcrypto
)RapidJSON
Other 3rd party libraries are distributed as git submodule
s.
Just cmake
it.
The final artifact is an executable (built by yourself). Assume the executable is wcbotd
, and there's a config file named config.json
in the same directory.
Run as daemon:
./wcbotd config.json
Don't want a daemon? Add any character(s) as the 3rd command line argument, like:
./wcbotd config.json nofork