Fost 5 release 5.16.09.44992 now out

Created 25th September, 2016 04:00 (UTC), last edited 27th September, 2016 02:30 (UTC)

There's a lot of new things this time. There's a new Fost 5 library, f5-cord, for string handling. There's also a new module, Fostgres, for the Mengmom web server — Fostgres is going to get it's own announcement sometime soon.

The development work being done has been showing up the problems in the old web server and framework (fost-web). We're designing a newer and better one that will be built on top of Boost ASIO (or C++17 networking?). There'll be a compatibility layer so that the old views will continue to work in the new code.

I was hoping that we'd be able to deprecate the mutex and locking wrapper around boost::spirit::parse, but despite setting the build to be thread safe the implementation isn't actually thread safe. At some point this code needs to move off Spirit Classic, and that looks like it'll be significantly simpler to do with C++14 than it has been in the past.

What we will deprecate though is all of the unfinished O/RM code in fost-orm. We've been building some new abstractions for Postgres in fost-postgres and that seems to be a simpler way of doing things — just thin wrappers around SQL itself. Coming up soon I also hope we'll be able to start to deprecate and then remove a lot of the older abstractions that have now been included in C++, for example the futures.

Some good news: Ubuntu Xenial is now fixed and builds work properly with both clang and gcc.

Building on Linux

git clone --branch=5.16.09.44992 --recursive git@github.com:KayEss/fost-hello.git
cd fost-hello
Boost/build 58 0
Boost/install 58 0
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

Libraries

  • f5-cord — First version of a new string library —
  • f5-threading — Preview of the first Fost 5 library which includes help for threading.
  • 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

Detailed change log

fost-base

  • The colourised logger now considers logging levels around each level when choosing a colour.
  • Remove direct calls to boost::spirit::parse due to threading problems.
  • Initial version of new splitter API that uses views to cut down on memory allocations.
  • Add additional APIs for utf::u8_view
  • Allow construction and assignment of fostlib::json from nullable atomic types.
  • Added a UTF8 string view
  • Added a JSON parse overload for UTF8 buffers and added extra tests.
  • Add json_embedded_parser which doesn't allow whitespace around the JSON.
  • Add default constructors to the JSON parsers so they can be const constructed.
  • Ensure that the lengths match before comparing the data in crypto_compare.
  • Added initial support for minting and checking JWT.
  • Extra information for the not_implemented constructor can now be anything coercible to JSON. Also remove the exception from the fost/core header.
  • Make public a jcursor constructor so we can copy part of another one.
  • jcursor parts can be compared for equaility with string literals.
  • The not_implemented exception can now be given JSON as its third argument.
  • Add in nliteral comparison overloads in a couple of places they were missing.
  • Fix a long standing bug in the Base64 encoder where it would add bad data when the data length was exactly divisible by 3.

fost-beanbag

  • Make the function for converting a path to a jcursor generally available.

fost-internet

  • Make the remote address properly available on the server HTTP request.
  • The HTTP server now adds a header describing the remote address.
  • Handle setting MIME headers via JSON.
  • Swap a std::list for a std::vector in the query string interface.
  • Fix a bug in the server request so it properly returns a reference to the query string.
  • Allow a jcursor to access header sub-values.
  • Allow header content to be created from a JSON object.
  • Allow access to some parts of the server request using a jcursor.
  • Drop MIME headers that have an underscore in their names.
  • Add shortcut method on HTTP request for getting to the headers.

fost-postgres

  • Add ability to set other settings on the database connection.
  • Add basic API that allows SELECT to be ordered.
  • Add support for setting the zone info on the connection.
  • Add APIs for creating and deleting databases.
  • Added support for fetching varchar and time values.
  • Stored procedures can now be called with JSON arguments.
  • Make the database connection move constructible.
  • Add support for JSON objects in the SQL, on the assumption that they are for either json or jsonb in Postgres.
  • Make use of table OIDs to distinguish names of columns.
  • Warn about type OIDs that are unkown and completely disallow time stamps with time zone information.
  • Allow JSON to be used in connection configuration and for the effective configuration to be retrieved.
  • Add basic support for stored procedures.
  • Add support for fetching the column names.
  • Start to sketch out a new Postgres specific API which will eventually displace libpqxx.

fost-web

  • Add a middleware that logs the HTTP request details and some response details.
  • fost.view.pathprefix can now take an embedded configuration.
  • fost.response.401 can now be given an inner view for the response data.
  • Add middleware that can alter the request by adding headers to it.
  • Add execute method to the view to make forwarding to embedded views easier.
  • Add a basic 401 response.
  • Improve some diagnostic output whilst loading.
  • Include configuration files for various logging levels.
  • Show type information for caught std::exception instances.

fostgres

  • Set the remote address as fostgres.remote_addr on the database connection.
  • Set source address on the network connection when possible.
  • The test script can now check CSJ results are what is expected.
  • Can configure a zone info on the view to control which time zone to use.
  • Logging options can be set for fostgres-test.
  • The fostgres-test testserver can now be given header values to use for all requests.
  • fostgres-test only turns not_implemented exceptions into 501s if that is the expected response.
  • Add a command for running SQL from a file.
  • Add a language extension mechanism.
  • Object PUT support can now have configurations for multiple tables.
  • Add DELETE support and a scripting language for testing the views.
  • Deprecate the old configuration for JSON based PATCH.
  • SQL can be run with a list of JSON arguments.
  • Add a connection factory function that can read some values from the request.
  • Basic implementation of CSJ and JSON options for views that fetch data from the database.

Categories: