Fost 5 release now out

Created 23rd June, 2017 04:09 (UTC), last edited 23rd June, 2017 04:24 (UTC)

Nothing new has landed over the past months since the last release, but that doesn't mean that nothing has happened.

A big change has been made to the low level JSON implementation which should be noticeably faster. Because this is such a big low level change we're letting it bake in testing for longer than normal. So far it looks very good, with no problems reported, and I think it'll turn out we only just missed merging it into master in time for this release.

With that change landed we'll be pushing that implementation further out to make it even faster, primarily by reducing memory allocations.

The previous version made use of two nested variants. One to hold the “atomic” part (null, booleans, integers, doubles and strings) of the JSON and the other to add in the object and array parts. Now this has been flattened down to a single variant that can hold any of them. The previous change also embedded the array and the object inside the variant. Now we hold a shared pointer to them in the variant. This means that in all cases copying a JSON object is now at most an atomic increment, where previously it might need to copy a map.

We also want to now add in other types—things like the f5::lstring so that string literals will never need an allocation at all, and empty types for array and object so that they don't need to allocate until data is actually put in them. We might also experiment with alternative data structures for small objects. I'd also like to see a similar change made to the object keys so that string literals used as object keys don't cause allocations—this is likely common enough that it'll be a noticeable win as well.

With this and a switch towards using the u8_view it also makes sense to start to look at a rope like structure that can be shared and is based around the same structure. This should allow parsed JSON to not need to allocate anything for the embedded data.

We also have some new threading primitives, implementing channels, which should make a lot of threaded code simpler. Right now they're implemented on top of eventfd, but we're actively looking at coroutines now that they've landed in clang 5.

Building on Linux

You will need a C++14 compiler. Recent versions of either gcc or clang are suitable.

git clone --branch= --recursive
cd fost-hello

Download locations


  • beanbag — Stand alone transactional JSON database server —
  • beanbag-seed — Seed project for giving you a starting point to develop web applications using Beanbag —
  • fost-hello — Sample seed project —
  • mengmon — Stand alone web server —
  • wright — Experimental build system —


  • f5-cord — First version of a new string library with compile time string and Unicode support —
  • f5-threading — Preview of the first Fost 5 library which includes help for threading —
  • fost-aws — Amazon AWS and OpenStack —
  • fost-android — Eclipse project for Android that allows Fost 4 and Beanbags to be used on mobile devices —
  • fost-android-ndk — The native code for Android. Includes required parts of Boost configured to use the standard Android build system.
  • fost-beanbag — Transactional JSON database —
  • fost-base — Build system and core libraries —
  • fost-internet — Internet protocols, servers & clients —
  • fost-meta — All libraries in one wrapper —
  • fost-orm — Object/Relational mapping —
  • fost-postgres — PostgreSQL —
  • fost-py — Python (2.x) bindings —
  • fost-web — Web server libraries —
  • fost-wright — Experiment in a build system —