@syncaide/flats v0.2.11
Flats
Introduction
The syncaide peer-to-peer distributed network primarily consists of connencting both the browsers and the servers into a single unified network. Given that browser development is mostly done in javascript or similar language while server side programming is usually done in languages other than javascript, this library was created to serve the purpose of standardizing and generating the external messaging libraries for serializing and deserializing binary messages to be sent over the network in the different respective langages.
Currently there are only two completely constructured libraries. One is built using typescript chiral for the browser side nodes. And another built using golang gate for the server side nodes. Each of those libraries depends on flats which, using flatbuffers defines a standard binary form schema for the messages sent over the network.
Contribution
If someone is planning on contributing to this development, to setup flats
locally and link it to the respective networking library. One must first begin
by making sure that flatc
is installed and working. The instructions on how to
install it can be found flatbuffers installation guide.
Once flatc
is installed run npm run build
to build the ts/js and golang
generated artifacts.
Build
The entire execution logic can be easily explored and analyzed via the npm run
scripts defined in package.json
. Assuming all external dependencies have been
downloaded via npm install
or special independant instructions, run
npm run build
. This will generate the flatbuffer libraries inside of ./src
with _generated
apended to their names. Then, together with the rest of the
source files transpile typescript and compile golang into their distribution
ready libraries. The code for those will be found under ./dist
.
Useful scripts
- clean:
npm run clean
- build all:
npm run build
- build typescript:
npm run build:ts
- build golang:
npm run build:go
- warmup golang cache:
cd src && go list -m all