17 January 2013

Notes on SOA @ Square

My notes from Service Oriented Architecture at Square talk:

monolithic app -- becomes
bigger & bigger
- generally try to make a new service
unless it is really, really related to what's
already there

since they are independent, they can be put
in different data centers

json
(others use a messaging system: a giant queue,
where you can throw all you)

to quickly start a service,
setup a "template" to "rails new":
 - documentation, testing, code quality,
   deployment, monitoring, security
and you can reusing that template

these are apis:
so documentation driven development
docs have to "work" - makes the build green

documentation is the main thing; there is 
even a empty scaffolding generator for the
the documentation

description:
reqParams:
  properties:
    user_id:
      description:
      require:
      type:
      example:
resParams:
resCodes:

https://github.com/square/fdoc

growing oos, guided by tests

mock the services
http://ddollar.github.com/foreman/
services.yml


code quality:
https://github.com/square/cane

small, fast and can embed into your
rails app:
http://jetty.codehaus.org/jetty/
use jetpack to package it
to deploy:
jetpack . && cap deploy
https://github.com/square/jetpack

deployed and now it needs monitoring:
airbrake
hoptoad
collect exception and comment on them

monitoring tool:
cubism.js
cool dashboards
https://github.com/square/cubism

use splunk to figure out what's breaking:
search for all your logs from one place

security:
ssl certificates with mutual authentication
ssl certificate for each new service
on ssl certificate there is a key called
organizational unit -> name of service

have a acl for each service -- (25:29) including
all clients allowed to talk to this resource

how to pull out services from the monolithic rails
app: inttially take out the code then do a redirect
and then chop it off.