Isolate the back end systems from the FE • IGN is going where the audience is, fast – Mobile Devices, Consoles, TVs, Aggregators • APIs are a specialized skillset • Expand the development to outside developers
a month • Average Response Tme of under 20ms on cache misses • 17 APIs between Social, OAuth, and Content • Hardest hit APIs doing about 25K RPM at peak
and the desktop site calling Java Services, which wrapped Oracle DB calls behind Hibernate. • Caching with Memcache – Near-‐far Cache Architecture to address hot spots • Not all content types were supported • Schema was sTll too complex
Content API, Java based Social API – Standards around request/response – Automated TesTng – MongoDB NoSQL storage to simplify the schema – Solr • Video and Blogs served by V2 API • Games and ArTcles sTll used V1 • Mixed-‐infrastructure with Rails and Java echosystem • Performance sucked royally
look at the APIs and IGN’s direcTon • First ajempt to – Integrate all content types – Open up the APIs to external consumers – Evolve the CMS, tradiTonally a monolithic system – ElasTcSearch – Varnish Response Caching • A learning opportunity for tradiTonal Java stack engineers
which marshals/unmarshals request and response data – Controller, which picks the right model to serve the request – Model, which has the necessary logic to talk to the database, or other APIs to fetch data
speed, i.e. concurrency • Ideal for API development – (relaTvely) simple to handle concurrency and immutability • JVM based = Performance • Re-‐use Java toolkits and libraries • Concise, expressive code (1:2.5 with Java) • Actor model makes the difficult parts easy
matching – Implicit conversions – Control abstracTons for collecTon mapping, filtering, iteraTng – Guaranteed Singletons at the classloader level – Almost non-‐existent boilerplate ….ProducTve, and fun!
lines of code, embrace immutability, use the funcTonal paradigms built into the language • Unmystrify the implicits magic nums.foldLeft(0)((n,c) => n+c)!
source – How well the code matches up to the JVM constructs • No (binary) compaTbility of dependencies for the major releases (2.8, 2.9, 2.10(?)) • Monitoring – No naTve instrumentaTon agents as they exist for Java
performance tuning has many knobs to work around with – Stateless services – Async calls with Akka Agents – Response level cache • Keep an eye on the database and network – Control the payload size – Use reasonable defaults – Allow field filtering – Paginate your response
reference, at least iniTally • StackOverflow • Twijer’s Scala School • Online blogs and tutorials • Book: Scala for the ImpaTent • Scala Meetup Groups in your area • Coursera course on FP by MarTn Odersky