kirit.com

Created 26th April, 2005 13:12 (UTC), last edited 22nd December, 2016 03:24 (UTC)

Writing about C++, Programming, Fost 5, the web, Thailand and anything else that catches my attention—with some photos thrown in

Fost 5 release 5.18.12.45070 now out

Posted 22nd December, 2018 03:42 (UTC), last edited 22nd December, 2018 04:20 (UTC)

There are some large changes in process at the moment. We're revamping the string handling in f5-cord to used shared ownership and persistent data. The new string has many improvements and fostlib::string will continue to bridge the gap between the old and new designs, although we will start on a track of deprecation of much of the old API.

We are also tidying up the JSON implementation to work with the new string type. This will split it apart from the rest of fost-base and make it much easier to use in other projects.

The Android unit test runner is now fully working and stable. It runs all of the “check” tests from all of the relevant libraries. For details check it out on Github. The Apple Mac builds are now also fully stable (at least for Mojave) and we are working on a Mac iOS test runner to complement the Android one. This should be working by the next release.

Lots of changes have been made to the cmake builds to make them more flexible. The f5-json-schema library is now usable for validating request bodies for web APIs.

Building on Linux & Mac

You should install Boost development packages using your package manager or brew to safe you from having to build them.

git clone --branch=5.18.09.45065 --recursive git@github.com:KayEss/fost-hello.git
cd fost-hello
mkdir build.tmp
cd build.tmp
cmake -G Ninja .. -DCMAKE_INSTALL_PREFIX=../dist
ninja install/strip
export LD_LIBRARY_PATH=../dist/lib
../dist/bin/hello-world-d

On the Mac you will need to set DYLD_LIBRARY_PATH before running hello-world-d

export DYLD_LIBRARY_PATH=../dist/lib
../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
  • test-android — Android application that runs Fost unit tests — git@github.com:KayEss/test-android.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-json-schema — JSON Schema validation — git@github.com:KayEss/json-schema.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-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-postgres — PostgreSQL — git@github.com:KayEss/fost-postgres.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

Detailed change log

cord

  • Add const iteration of shared_buffer.
  • Support (explicit) conversions of the string types to std::string_view
  • Add a new f5::cord::string type, immutable shared string.
  • Add a starts_with member to u8view.
  • Add a missing comparison operator.

threading

  • Remove the old deprecated eventfd based code.
  • Add clear member to tsmap and improve the return type for unique_ptr.
  • Fix a bug in tsmap::insert_or_assign which caused it to return the wrong value.
  • Small improvement to API for moving things into a tsmap.
  • Fix a horribly broken search API in tsmap.

json-schema

  • Complete the implementation of fetching schemas over HTTP(S).
  • The implementation now fully conforms to the V7 test suite.
  • Added an API that can be used to register schema loaders.
  • Refactor the assertion functions so that they will be easier to extend in future.

fost-base

  • Split the CMake configuraion into smaller parts.
  • Changes to string handling to support wider adoption of f5::u8string
  • Support EdDSA JWTs.
  • JWT secrets can now be looked up via a function passed to the load function.
  • Add iterator traits to JSON iterator.
  • Tidy up some headers.
  • Do less work when stringifying JSON.
  • Refactor the integral to integral coercions to remove a lot of complex template meta-programming.
  • Add a way to get a JSON pointer URL fragment string for a jcursor.

fost-internet

  • Allow setting a URL fragment from a jcursor.
  • Implement a better URL join that covers many more of the required cases.
  • Remove usernames and passwords from URLs.
  • Rename url::anchor to url::fragment as that is the proper term.

fost-web

  • Add fost.schema.validate view

fostgres

  • Extend schema validation to fields and CSJ.

odin

  • Add odin.password.hash view
  • Remove deprecated warnings
  • Added odin.app.installation view
  • Support app OPEN access policy
  • odin.app.secure doesn't need app_id as a prefix anymore.
  • Fix table app_user PK order
  • Add table app_role_ledger
  • Add table app_user_role_ledger
  • Added app user roles
  • Tighten up some APIs in the example configuration.
  • Added module opts/installation-id
  • Added odin.app.handover view
  • Added odin.app.verify view
  • Added odin.app.secure view
  • Added Expire user module

Categories:

Fost 5 release 5.18.09.45065 now out

Posted 25th September, 2018 03:04 (UTC), last edited 25th September, 2018 10:37 (UTC)

The switch to CMake has been generally pretty good. There are a few rough edges, and some weird things that it just doesn't seem to want to do. As a consequence, things like examples don't work very well yet, but it is very good that the build process now follows a more “standard” approach.

The Mac support has also had it's ups and downs. The switch to C++17 caused problem due to the age of the compiler available, but that was fixed with the new command line tools that landed week. The final piece is some changes to the system libraries that are supposed to land with Mojave. Hopefully this will be smooth when it's used.

A new JSON schema validation library has been added and schema validation features are now available in Fostgres. It would make sense to also add them to the Beanbags, but that work hasn't been planned yet, let alone started.

Building on Linux & Mac

You should install Boost development packages using your package manager or brew to safe you from having to build them.

git clone --branch=5.18.09.45065 --recursive git@github.com:KayEss/fost-hello.git
cd fost-hello
mkdir build.tmp
cd build.tmp
cmake -G Ninja .. -DCMAKE_INSTALL_PREFIX=../dist
ninja install/strip
export LD_LIBRARY_PATH=../dist/lib
../dist/bin/hello-world-d

On the Mac you will need to set DYLD_LIBRARY_PATH before running hello-world-d

export DYLD_LIBRARY_PATH=../dist/lib
../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-json-schema — JSON Schema validation — git@github.com:KayEss/json-schema.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-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-postgres — PostgreSQL — git@github.com:KayEss/fost-postgres.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

Detailed change log

cord

  • Add a member to fetch the number of code points from u8view.
  • Fix a bug in the printing of u8view to streams.
  • Add more equality comparison for u8view.
  • Add better members for initialising the shared_buffer.

threading

  • Replace the use of eventfd with a pipe.
  • Remove the deprecated `f5/threading/boost-asio.hpp` header.

fost-base

  • Add a parser for JSON pointers.
  • fostlib::json::apply_visitor can now take any number of lambda like expressions.
  • An empty jcursor needs to be represented as an empty array in JSON.
  • Add an object and array member to json to make access and iteration simpler.
  • Add direct comparison between JSON and u8view.
  • Add iteration over the command line arguments passed to fostlib::arguments.
  • Remove info member from exception and change throw to noexcept.
  • Remove fostlib::variant as it's not used.
  • Switch fostlib::json to use std::variant.
  • Remove memoize, as it's never been used.
  • fostlib::nullable, fostlib::null_t and fostlib::null are now aliases to the std::optional types and values.
  • Add a logger that outputs single lines of JSON to the console.
  • Use guids to generate temporary file names.
  • Fix a potential problem with the pathname join function one of the paths is empty.
  • Fix up the library searches for dynlink
  • Add some missing append operation for string
  • Fixed password hashing to use u8view instead of utf8_string
  • Fixed include for fostlib::insert
  • Use a more efficient implementation for crypto_bytes — Reverted for now as the required system call header is not always available.
  • Added RIPEMD-256 cryptographic hash function.

fost-internet

  • Improve handling of weird ways TCP connections can be dropped and add more logging.
  • The HTTP response body doesn't really need to be const.
  • No longer make use of Boost regex library.

fost-wright

  • Fix a bug where a child death after all jobs had been handed out would result in the parent process being killed.
  • Add support for distribution of work over a network connection.

fostgres

  • Add JSON schema validation for object PUT and PATCH.
  • Fix the order of the expected & actual results for object request.
  • Fix a bug in the HTTP request checking where expressions would be resolved twice.
  • Add fg quote function

odin

  • Returned Unprocessable Entity when user's email already exists in the system.
  • Added Login with Odin page
  • Added App module
  • Added odin.api.login view
  • Added link Facebook module
  • Added login with Google module
  • Added login with Facebook module
  • Added reset forgotten password API view
  • Added forgotten-password module
  • Added self registration API with full-name
  • Added self registration API with e-mail address
  • Change the way that Odin migrations are run.
  • Deprecate setting a password when a user is created. It should be done separately

Categories:

Fost 5 release 5.18.06.45062 now out

Posted 24th June, 2018 03:08 (UTC), last edited 24th June, 2018 10:35 (UTC)

This is the last release that will use Boost build (bjam). We're joining the cmake bandwagon instead. This is more of a sideways step than a forwards one, but hopefully might make some things easier in the long run, although in the short term there are likely poor choices in how to structure the builds.

We are deleting the old boost build files (Jamroots and Jamfiles) from everywhere and tidying up a few other small things at the same time.

With cmake it should become simpler to compile using odd compilers (especially cross compiling) and its ability to generate Visual Studio and XCode project files should make it simpler to work on those platforms, not to mention all of the IDEs that use cmake natively.

Some early advantages are that project layouts are now much more flexible because the cmake link directives don't need paths to targets and also that openssl can be easily replaced by boringssl.

As part of this work we're now dropping fost-orm and fost-py. The only library from fost-orm carried forwards is fost-jsondb which is now part of fost-beanbag. There are no new Python bindings.

Also, due to changes in OpenSSL the oldest version of Boost that will be supported by the cmake based builds will be 1.62.0.

Building on Linux & Mac

git clone --branch=5.18.06.45062 --recursive git@github.com:KayEss/fost-hello.git
cd fost-hello
Boost/build
hello/compile
dist/bin/hello-world-d

On the Mac you will need to set DYLD_LIBRARY_PATH before running hello-world-d

export DYLD_LIBRARY_PATH=dist/lib
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

Detailed change log

cord

  • Add a memory method to the u8view so that the underlying memory buffer can be accessed.

fostgres

  • Add support for password configuration on the connection strings.
  • Allow database connection string settings to come from the environment.

fost-base

  • Add coercions for jcursor index value types.
  • Add some basic base16 support.
  • Add various base32 encoding flavours (base32, base32hex and base32c)
  • Add a fork of Crypto++'s fork of tweetnacl to generate ed25519 signing key pairs.

fost-internet

  • Add fost-hod for handling packet oriented data over TCP.

fost-web

  • Add a pathname view and a file serving view.

Categories:

Fost 5 release 5.18.03.45059 now out

Posted 26th March, 2018 04:11 (UTC), last edited 26th March, 2018 08:53 (UTC)

The Mac builds are finally back! This means we now have Linux, Mac and Android. Regaining iOS support is still something for the future.

The Mac build does drop the Python 2 bindings and the Wright application. Wright isn't going to be a loss, and the Python 2 bindings need to be deprecated in favour of a newer set of Python 3 ones.

One upshot of this is that the oldest compiler we need to support is now likely to be the Mac one rather than the Android one, but it's hard to tell because Apple have a completely different versioning scheme than the llvm project uses.

There have been many changes to the string handling. This is still leading up to the large refactoring. The u8view has become much more useful and there is a shared version of this in the works. Eventually this will lead to the replacement and deprecation of the fostlib::string for a variant based constant string, and the use of std::string everywhere else.

There has also been more cleaning up and removing of Boost libraries. You may find you need to now include Boost threading headers or Boost function headers.

Building on Linux & Mac

git clone --branch=5.18.03.45059 --recursive git@github.com:KayEss/fost-hello.git
cd fost-hello
Boost/build
hello/compile
dist/bin/hello-world-d

On the Mac you will need to set DYLD_LIBRARY_PATH before running hello-world-d

export DYLD_LIBRARY_PATH=dist/lib
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

Detailed change log

cord

  • Add empty to the u8view and buffers.
  • Add ability to output u8view and move overloaded operator <<s to std namespace.
  • Allow appending of a u8view to a std::string.
  • u8views can be concatenated to form std::strings.
  • u8view supports operator <.
  • lstring now also has a string literal, _l.
  • Add empty() member to lstirng.
  • The const shared string buffers need to be immutable.
  • u8view can be explicitly converted to a std::string.
  • u8view is now comparable with const char *.

threading

  • Don't include any Fost headers.
  • Bypass the coroutine unwind exceptions for the reactor and sync.
  • Move the reactor_pool to reactor.hpp
  • The reactor_pool can be closed and its threads joined at any time.

fostgres

  • Fix the fg parser to allow whitespace and comments in more places.

fost-aws

  • Removed use of boost::function.

fost-base

  • Fix bug to handle requirements for autotest libraries properly.
  • Removed Boost lambda and bind
  • Remove previously deprecated fostlib::counter.
  • Allow the C++ version to be specified as std-version in the requirments.jam file.
  • crypto_compare works with Unicode strings.
  • More tagged strings can now be coerced to json and to f5::u8view.
  • Improve the converting nullable constructor so it uses explicit type conversions.
  • Make more string utilties compatible with f5::u8view, at the cost of wide character literals.
  • Make nullable<f5::u8view> coercions from JSON not throw errors if the value isn't a string.
  • Improve the jcursor APIs to better support u8view and move semantics.
  • Add f5::lstring as an option for storage inside fostlib::json.
  • Control characters need to be escaped when producing JSON strings.
  • Can now mint a JWT with an initial payload.
  • Remove uses of boost::function and make worker const sane.
  • Add missing namespaces to the log definition macros.
  • Small readability improvement to the default stdout logger.
  • Crypto hashes now take a f5::u8view which should remove some memory allocations.
  • Deprecate fostlib::utf::u8_view in favour of f5::u8view
  • Move utf::u8_view to f5-cord.
  • Remove array_view and replace with f5::array_view from f5-cord.
  • Deprecate use of the fostlib::string JSON coercion in favour of utf::u8_view.

fost-internet

  • Make the query_string API a bit less pathalogical by caching the stringified version.
  • JSON arrays used as header sub-values are now set as the JSON string.
  • Removed all uses of boost::function

fost-orm

  • Remove all instances of boost::function

fost-postgres

  • Put session variable names in double quotes.
  • Changed the upsert function to also take an array of strings for a RETURNING clause.

fost-py

  • Fix a problem with Boost 1.65

wright

  • Work is distributed between workers more evenly.

Categories:

Fost 5 release 5.17.12.45058 now out

Posted 28th December, 2017 04:42 (UTC), last edited 28th December, 2017 08:32 (UTC)

This release includes a step towards revised string handling. The eventual goal is to be able to remove the fostlib::string from most places in favour of a smarter structure based on a std::variant that can better handle different string sources. This work is ongoing and you can see progress in the develop branches.

We're also taking a look at macos and Windows again, but both platforms are quite difficult so no real progress yet.

Building on Linux

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

git clone --branch=5.17.12.45058 --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

Detailed change log

cord

  • Add string equality comparison and substr operations to u8view.
  • Fill in more of the lstring comparison members.
  • Add shared buffers who can own strings (and other things).
  • Rename array_view to buffer as it is not always immutable.
  • Add u8view and UTF8 decode function.
  • Added an array_view with some constexpr support.

fostgres

  • Add scripting call setting for manipulating settings.
  • Add parser support for all JSON atom values.
  • Add RETURNING support to PUT request for objects.
  • Move some tests so Postgres is not needed for a normal build.

Categories: