2015-07-18 Solsort backend tech

I am in the process of updating the solsort backend tech stack. These are the criterias that I look into.

  • Good support for building html5-apps, preferably with offline support, – and backend code. I want to write all of this in ClojureScript.
  • Framework for having clients updating content etc., and also support for building simple web solutions.
  • Easy operations, – few moving parts, and prepared for scaleability.

My conclusion is to use the following backend technologies:

  • Own backend code is running on top on nodejs. If written such that all shared state are stored in the database then several instances of the backend code can run in parallel on different nodes, and thus it can be very scaleable.
  • Web-like semi-static content managed by the clients are stored in WordPress, which is also used for simple web solutions. Data can be accessed directly through the WordPress REST API.
  • Other data are stored in couchbase, – we already need a database that syncs with pouchdb for the html5 apps, and couchbase has good low-latency performance characteristics, which is important if backend-code should scale.

So the low-end software, and service and stack that needs to be managed on the server(s) are:

  • nginx as http-server/proxy for WordPress and couchbase-sync-gateway
  • nodejs for running own backend code.
  • MariaDB/MySQL and PHP for WordPress.
  • Couchbase+sync-gateway for backend-data as well as persisted/sync’ed app data.

All of these technologies are easy to quickly get up and running, – and also has the possibility to scale well if managed correctly.

If I later need search capability, I would also add ElasticSearch. If I later need serious geographical data or relational database support, I would also add PostgreSQL. But neither of these are needed yet.

The main issues that I feel with above stack are:

  • While sync between PouchDB and Couchbase is possible, it is not as mature as the sync with CouchDB, – but CouchDB does not scale nor perform as well as Couchbase.
  • PHP/MySQL is not my favourite technologies, but that is the price I must pay to include a mature mainstream CMS.
  • While Couchbase is opensource, the culture around it feels more enterprise-like that opensource-like.

But otherwise this seems to me to be the very best bet for a backend technology stack, for the area of solution that I am going into.