A quasi no-allocation tcp stream replication service for implementing semi-distributed systems.
# listens on all interfaces and binds to port 9090.
$ replicator -p 9090 0.0.0.0Currently building from source is the only way to run the replicator service.
-
Git Clone
Clone the repository from git by running the following code in a directory where you'd like to keep the source code.
git clone https://github.com/DAlba-sudo/replicator.git
-
Change Directory to Repository
Using
cd, change directory into the recently cloned repository.cd replicator/ -
Zig Build
Using a
v0.12.0zig compiler, run the following:zig build. -
Run the Service
The binary is located in the
zig-out/bindirectory. You can move this to/binor anywhere else in the PATH that you'd like.You run the service as such:
replicator -p 9090 127.0.0.1.- Use
replicator -hfor potential flags that you can use.
- Use
Configuring the replicator service is slightly different than your typical app/program. Since the initial design goal for this was to take advantage of comptime-known inputs and outputs, we avoid memory allocation via syscalls and instead use FixedBufferAllocators backed by buffers living in the bss section of the executable.
To configure the app, edit the src/config.zig file with the values you'd like to use... then rebuild the app with zig build.