Fost 5 release 5.17.06.45032 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=5.17.06.45032 --recursive git@github.com:KayEss/fost-hello.git
cd fost-hello
Boost/build
hello/compile
dist/bin/hello-world-d

Download locations

Applications

  • beanbag — Stand alone transactional JSON database server — git@github.com:KayEss/beanbag.git
  • beanbag-seed — Seed project for giving you a starting point to develop web applications using Beanbag — git@github.com:KayEss/beanbag-seed.git
  • fost-hello — Sample seed project — git@github.com:KayEss/fost-hello.git
  • mengmon — Stand alone web server — git@github.com:KayEss/mengmom.git
  • wright — Experimental build system — git@github.com:KayEss/wright.git

Libraries

  • f5-cord — First version of a new string library with compile time string and Unicode support — git@github.com:KayEss/f5-cord.git
  • f5-threading — Preview of the first Fost 5 library which includes help for threading — git@github.com:KayEss/f5-threading.git
  • fost-aws — Amazon AWS and OpenStack — git@github.com:KayEss/fost-aws.git
  • fost-android — Eclipse project for Android that allows Fost 4 and Beanbags to be used on mobile devices — git@github.com:KayEss/fost-android.git
  • 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 — git@github.com:KayEss/fost-beanbag.git
  • fost-base — Build system and core libraries — git@github.com:KayEss/fost-base.git
  • fost-internet — Internet protocols, servers & clients — git@github.com:KayEss/fost-internet.git
  • fost-meta — All libraries in one wrapper — git@github.com:KayEss/fost-meta.git
  • fost-orm — Object/Relational mapping — git@github.com:KayEss/fost-orm.git
  • fost-postgres — PostgreSQL — git@github.com:KayEss/fost-postgres.git
  • fost-py — Python (2.x) bindings — git@github.com:KayEss/fost-py.git
  • fost-web — Web server libraries — git@github.com:KayEss/fost-web.git
  • fost-wright — Experiment in a build system — git@github.com:KayEss/fost-wright.git

Categories: