Common infrastructure for our web-services built on top of the JVM and Scala.
Warning: Highly unstable, sometimes broken.
The project is made of several smaller projects, that can be used independently:
- shifter-core - some utilities for dealing with reflection, also used to contain language backports from Scala 2.10 to 2.9.2 that I pulled out
- shifter-geoip - wrapper around Maxwind's GeoIP client, can download the GeoLite City database by itself
- shifter-http-client - wrapper around Ning's AsyncHttpClient for working with Futures/Promises
- shifter-db - wrapper around JDBC
- shifter-migrations - a simple system for dealing with migrations, like database migrations, though usage isn't restricted to JDBC databases at all
- shifter-cache - wrapper around SpyMemcached for working with Futures/Promises, also contains a stupidly simple in-memory cache implementation of the same interface
- shifter-web - for servicing web requests, built over Servlets 3.0 and Jetty
The following dependencies are used:
- Scala STM for software transactional memory
- SpyMemcached as a Memcached client, as mentioned
- Ning's AsyncHttpClient for doing http requests, as mentioned
- Maxmind's Java client
for GeoIP, though the source-code has been imported directly into
shifter-geoip
because I couldn't find a Maven dependency to link to - Typesafe Config for configuration files
- Typesafe ScalaLogging as an abstraction over SLF4J for logging
- Logback as a SLF4J implementation for logging
- Spray's Twirl templates rendering, which is an extraction of Scala Templates from Play 2
- Spray Json for JSON processing
- Commons Codec and Commons FileUpload for processing requests
- Yammer Metrics for gathering runtime stats from our servers
- Jetty 8 as the web server
First add the proper resolvers:
resolvers += "BionicSpirit Releases" at "http://maven.bionicspirit.com/"
For specifying all sub-projects as dependencies:
libraryDependencies += "shifter" %% "shifter" % "0.3.23"
For specifying individual subprojects:
libraryDependencies += "shifter" %% "shifter-cache % "0.3.23"
NOTE: this document may get out of date and the latest version may not be the one specified.
First add the repository resolvers:
<repositories>
<repository>
<id>BionicSpirit Releases</id>
<url>http://maven.bionicspirit.com/releases/</url>
</repository>
</repositories>
For specifying all sub-projects as dependencies:
<dependency>
<groupId>shifter</groupId>
<artifactId>shifter_2.10</artifactId>
<version>0.3.23</version>
</dependency>
For specifying specific sub-projects (e.g. shifter-db):
<dependency>
<groupId>shifter</groupId>
<artifactId>shifter-db_2.10</artifactId>
<version>0.3.23</version>
</dependency>
NOTE: this document may get out of date and the latest version may not be the one specified.