majkelo / poc-protobuf

Grails 2.5.4 protobuf PoC

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TWO WAYS OF INSTALLING protoc (proto buffer compiler)

  • USING SCRIPT added to this repo it installs the newest, the most stable version

./scripts/install_protobuf.sh $ protoc --version libprotoc 3.6.1

  • install from OS repo it installs usually the old one, which is available in current OS repo

$ sudo apt-get install protobuf-compiler

AFTER CREATING PROTO FILES YOU HAVE TO GENERATE .java FILES

SRC_DIR=/home/baroo/work/poc/poc-protobuf/grails-app/utils/com/example/proto

DST_DIR=/home/baroo/work/poc/poc-protobuf/grails-app/utils

protoc -I=$SRC_DIR --java_out=$DST_DIR $SRC_DIR/addressbook.proto

this command should be run after every modification of the proto files. unfortunatelly it's gong to override the exisitng files, so if there were any custom changes/optimizations, they will be lost

About

Grails 2.5.4 protobuf PoC


Languages

Language:Groovy 87.1%Language:Java 7.8%Language:CSS 3.3%Language:Batchfile 1.3%Language:JavaScript 0.3%Language:Shell 0.1%