Prototype Mixed-consistency transaction implementation
See the codeDSL for mixed-consistency transactions: website, paper
Hello! This is the prototype for MixT. This is not intended for distribution or serious end-user experience; there are some very platform-specific assumptions in this code. If you are brave or curious, welcome!
source pg_env.sh before attempting to build!configure; just source pg_env.sh; make <target>MixT's transaction compiler is implemented entirely in compile-time C++ through the use of constexpr and, yes, some templates. To write a MixT transaction, just #include mtl/mtl.hpp. There are some example transactions in the root directory; look for the TRANSACTION(...) invocations. MixT includes bindings for a postgres backend and a simple in-memory backend; use the in-memory backend if you're just trying out some transaction code. The in-memory backend is also a good thing to copy when writing your own bindings.
C++ is famously bad at giving reasonable error messages, especially when those errors involve templates. First, I must strongly recommend clang here; g++ is not quite there yet with error messages. If you are building under clang and MixT gives you an error when compiling your transaction, there are a few common cases to look for:
-ferror-limit=1 set. clang and gcc both tend to treat type errors as "pretend it's an integer and move on", which makes errors after the first one likely to be spurious or misleading.constexpr variable 'prev' must be initialized by a constant expression indicates an exception has been thrown in constexpr code. Scroll down until you see subexpression not valid, which will tell you the exact exception the code tried to throw. This is usually enough to understand the error.static_assert failed: errors usually pertain to typechecking failures or flow violations. In either case, you'll get an error message directly.This project is actively pushing the boundaries of compiler support for modern C++. Some things to watch out for:
Things clang really doesn't like:
auto, which means the mixt_method syntax only builds on g++ until clang adds support.Things that g++ really doesn't like:
1,758 commits
C++
89.6%
PHP
5.2%
Shell
2.3%
Makefile
2.0%
Prototype Mixed-consistency transaction implementation
See the codeDSL for mixed-consistency transactions: website, paper
Hello! This is the prototype for MixT. This is not intended for distribution or serious end-user experience; there are some very platform-specific assumptions in this code. If you are brave or curious, welcome!
source pg_env.sh before attempting to build!configure; just source pg_env.sh; make <target>MixT's transaction compiler is implemented entirely in compile-time C++ through the use of constexpr and, yes, some templates. To write a MixT transaction, just #include mtl/mtl.hpp. There are some example transactions in the root directory; look for the TRANSACTION(...) invocations. MixT includes bindings for a postgres backend and a simple in-memory backend; use the in-memory backend if you're just trying out some transaction code. The in-memory backend is also a good thing to copy when writing your own bindings.
C++ is famously bad at giving reasonable error messages, especially when those errors involve templates. First, I must strongly recommend clang here; g++ is not quite there yet with error messages. If you are building under clang and MixT gives you an error when compiling your transaction, there are a few common cases to look for:
-ferror-limit=1 set. clang and gcc both tend to treat type errors as "pretend it's an integer and move on", which makes errors after the first one likely to be spurious or misleading.constexpr variable 'prev' must be initialized by a constant expression indicates an exception has been thrown in constexpr code. Scroll down until you see subexpression not valid, which will tell you the exact exception the code tried to throw. This is usually enough to understand the error.static_assert failed: errors usually pertain to typechecking failures or flow violations. In either case, you'll get an error message directly.This project is actively pushing the boundaries of compiler support for modern C++. Some things to watch out for:
Things clang really doesn't like:
auto, which means the mixt_method syntax only builds on g++ until clang adds support.Things that g++ really doesn't like:
1,758 commits
C++
89.6%
PHP
5.2%
Shell
2.3%
Makefile
2.0%