providence project was made in order to make an immutable model java
library for thrift. It is mostly separate from the thrift library, but can use
the standard thrift protocols to serialize and serialize messages. It is mainly
based on the Facebook / Apache thrift library,
but with some differences and limitations.
Note that providence requires java >= 8.
Getting Providence CLI
See here for instructions on how to get
morimekta.net CLI tools installed on
your system. It has instructions for RedHat / YUM, Debian and Homebrew (for Mac):
In order to compile providence itself, you need the java 8
commands (I recommend
maven (3.5). Then check out
[email protected]:morimekta/providence.git and build with:
mvn clean install -Plib
There is also a
Makefile for updating pre-compiled providence and
thrift files. These need
docker installed to work, but is
not required for most development.
Make sure to name it properly, and describe what the change does, and assign the request to @morimekta. That should send me an email, so I know it’s there and take care of it.
Terms and Definitions
Throughout the providence documentation I use a number of terms that easily can be confused.
- [thrift]: A system of converting files that follow the
thriftIDL specification found here to some form of code or data. I currently know of 5
thriftsystems, other than
- Apache Thrift: The “main” thrift implementation containing lots of languages.
- FB Thrift: A FaceBook managed fork of thrift with changes and features that FaceBook wants.
- Thrift-Nano: A version of thrift optimized for low memory consumption e.g. for using on low-power embedded systems.
- Thrifty: A compact and simple java version of thrift aimed at mobile platforms.
- ThriftPy: An alternative python library and compiler for thrift.
- [Apache Thrift]: Is the “official” Apache hosted implementation of thrift. This is essentially what is compared with for determining compatibility.
- [Providence]: Is all of this project (including some off-repository parts like providence-gradle-plugin).
Also inside providence, we use a little different set of definitions from Apache Thrift.
- [message]: Message is the base type of all the structured data typed
defined in a thrift file, including
union. This is variantly called
base typein Apache Thrift.
- [service call]: Is the wrapper structure that is sent with the
call to and response from a service method call.
This is what is called a
messagein Apache Thrift.