SocialOS Components and Tools
In this post, rather than discusing a specific facet of the Social OS API, we'll be looking at some of the components we've used to build Social OS and our Social OS apps.
Social OS is primarily written in Python. The code is written to run on Python 2.6, 2.7, and 3.3 and later, as many popular versions of Linux still ship with Python 2.6. It also works under the PyPy compiler, but apparently Social OS is something of an edge case, as it is actually slower under PyPy than under the standard interpreter; we don't recommend PyPy at this time.
The main database for Social OS is MongoDB. We recommend that instead of using the default release, you download TokuMX, a fork of MongoDB with a compatible API but a significantly more advanced storage engine. TokuMX is required if you want to use the transactional extensions in Social OS, including the payments module. We also use MongoDB or TokuMX as an application-level database in our sample apps.
Search functionality is built using Elasticsearch. This allows free-form text search of all fields in public data, from message text to user biographies to geolocation.
Scripting support is offered by Lua and Mustache. Mustache is used throughout the sample apps as well as in the Content module of the Social OS API.
The REST API itself is built on CherryPy, a simple, robust, and extensible web framework for Python. CherryPy includes a built-in web server that can be used to run Social OS in a development environment. For production, we recommend Green Unicorn or uWSGI; Social OS is easy to deploy with either server.
Our sample web apps are built with Bootstrap and jQuery, but Social OS can be used with any programming language and any web toolkit.