| Literature DB >> 27199843 |
Vanessa V Sochat1, Ian W Eisenberg2, A Zeynep Enkavi2, Jamie Li2, Patrick G Bissett2, Russell A Poldrack2.
Abstract
The administration of behavioral and experimental paradigms for psychology research is hindered by lack of a coordinated effort to develop and deploy standardized paradigms. While several frameworks (Mason and Suri, 2011; McDonnell et al., 2012; de Leeuw, 2015; Lange et al., 2015) have provided infrastructure and methods for individual research groups to develop paradigms, missing is a coordinated effort to develop paradigms linked with a system to easily deploy them. This disorganization leads to redundancy in development, divergent implementations of conceptually identical tasks, disorganized and error-prone code lacking documentation, and difficulty in replication. The ongoing reproducibility crisis in psychology and neuroscience research (Baker, 2015; Open Science Collaboration, 2015) highlights the urgency of this challenge: reproducible research in behavioral psychology is conditional on deployment of equivalent experiments. A large, accessible repository of experiments for researchers to develop collaboratively is most efficiently accomplished through an open source framework. Here we present the Experiment Factory, an open source framework for the development and deployment of web-based experiments. The modular infrastructure includes experiments, virtual machines for local or cloud deployment, and an application to drive these components and provide developers with functions and tools for further extension. We release this infrastructure with a deployment (http://www.expfactory.org) that researchers are currently using to run a set of over 80 standardized web-based experiments on Amazon Mechanical Turk. By providing open source tools for both deployment and development, this novel infrastructure holds promise to bring reproducibility to the administration of experiments, and accelerate scientific progress by providing a shared community resource of psychological paradigms.Entities:
Keywords: assessment; behavior; docker; experiments; reproducibility; web-experiments
Year: 2016 PMID: 27199843 PMCID: PMC4844768 DOI: 10.3389/fpsyg.2016.00610
Source DB: PubMed Journal: Front Psychol ISSN: 1664-1078
The fields required in the standard config.jsonž for an Experiment Factory Experiment.
| name | Not required, warning | Descriptive label of experiment | Antisaccade |
| run | Required, not valid without | Scripts required for the experiment to run | experiment.js style.css |
| exp_id | Required, not valid without | Unique identifier | Antisaccade |
| cognitive_atlas_concept_id | Not required, warning | Mapping of experiment to cognitive concepts it measures | trm_4b1968619b00b |
| contributors | Not required | Credit and source of help | Ian Eisenberg Vanessa Sochat Zeynep Enkavi |
| time | Required, not valid without | Run time in minutes | 8 |
| experiment_variables | Not required | Variables for allocation of credit or reward | reaction_time |
| reference | Not required, warning | Full documentation of paradigm | doi:10.1006/cogp.1999.0734 |
| notes | Not required | Additional information to capture | Should not wear glasses |
| publish | Required, not valid without | Ready for deployment | True |
| template | Required, not valid without | Experiment library base | jspsych |
The definition of files and a template are essential to validate the function of the experiments. The examples for each field above are limited and not in JSON, full config.json are available for inspection in the experiment folders (https://github.com/expfactory/expfactory-experiments).
Glossary of terms for technical jargon, software, and tool references.
| Amazon Mechanical Turk (MTurk) | A platform provided by Amazon Web Services to allow individuals (Requesters) to deploy “human intelligence tasks,” or computer-based tasks that are difficult for computers, for other people to complete |
| Battery | A set of experimental paradigms presented in sequence to a study participant |
| Celery | A distributed task queue to allow for scheduling of function executions on a server |
| Continuous Integration | The continuous testing of functions in code whenever a change is made to ensure functionality does not break with changes |
| Cognitive Atlas | A collaborative knowledge base of ideas (e.g., cognitive concepts and experimental paradigms) in cognitive science |
| Docker | A container-based infrastructure to package an entire software environment (code, system libraries, files) for consistent deployment on different computers |
| Docker Compose | A tool for specification of how different Docker containers work together to build an application with multiple containers |
| Django | A Python-based web framework that makes it easy to extend Python-based functions into the web browser |
| Flask | A Python-based micro-framework with less stringent requirements than Django to extend Python-based functions into a web browser |
| jshint | A code analysis tool to check static (not running) JavaScript code for common errors |
| jsPsych | A JavaScript library for creating and running behavioral experiments |
| Psiturk | A Flask application to deploy web-based experiments to Amazon Mechanical Turk |
| Selenium | A tool to allow for programmatic control of web browsers |
| Sphinx | A documentation generation language for Python |
| Redis | An open source data structure store that can easily handle storage of different data structures for use with other applications |
| uWSGI | A tool to easily deploy web applications, including load balancing, process and task management, and monitoring |
Figure 1The experiment factory core: Experiments, a battery skeleton, and the software are openly available on Github. Installation of the Experiment Factory tool allows a researcher to run a sequence of experiments on the fly (right) or to generate a local folder or virtual machine to deploy experiments to Amazon Mechanical Turk using Psiturk (left).
Docker Containers utilized in expfactory-docker to run the .
| expfactorydocker_uwsgi_1 | Django application, and uwsgi protocol for serving it | expfactory |
| expfactorydocker_db_1 | Postgresql database for Django application and storing results | postgres |
| expfactorydocker_nginx_1 | “Engine X” web server | nginx |
| expfactorydocker_worker_1 | Celery worker for running tasks | expfactory |
| expfactory_redis_1 | Redis database for tasks, serialized as JSON | redis |
The container images are downloaded from the Docker hub. The container image “expfactory” corresponds to the expfactory-docker repository, and is built automatically from this source. For a more substantial deployment, the database can be external to the instance (e.g., Amazon RDS) with an encrypted connection.
Figure 2Docker containers: Expfactory-docker includes the main application container (expfactory), a database for storing application data (postgres), a job queue (redis) and worker (Celery) for running computationally intensive tasks, and a web server (nginx) to serve the application to the web.