3. @cloudbees
Hosted apps (PaaS a la GAE etc)
Jenkins/hudson “as a service”
lotsa elastic servers, variable load
in production !
4. Where scala:
Provisioning:
Build servers, masters, new hosts, allocation
“cloud controller” app
Some Play! framework, some maven
5. CloudBees
controller providore storage
App pool DB clusters Master pool Slave pool
scala
6. Why scala?
Easy !
* Saved time (early startup - I had to wear
lots of hats)
* Types help hard to reach (test) places
* And why not
7. Result?
New staff come on, able to contribute,
maintain.
No issues.
But they aren’t idiots.
8. Next time?
Seriously look at scala “native” things (akka)
Avoid faux-oo
- instead use objects as namespaces
Monadic IO - Monadic server/cloud
operations?
9. server = do
instance = launch_server "image-id"
volume = create_volume_for instance "10G"
return attach_volume instance volume
10. To the cloud
(jclouds + scala)
Avert your eyes children...
11.
12. CloudClient
“Discovered” semantics:
Start, Stop, List, Status, Volume Create,
Attach etc..
Create own easily mockable cloud api (trait)
Don’t try this at home...
(EBS sob stories for another time - pushed
provisioning api to the limit)
13. Mockito + Scalatest
Runs nicely in IDEA runner
TestX extends ShouldMatchers (scalatest)
import org.mockito.{Matchers, ArgumentCaptor}
14.
15.
16.
17.
18.
19.
20. Also: the REPL
Invaluable:
Controlled “live” testing
Explore api behaviors, inspect
Data in “hazelcast” - reload new version, continue
Testing with real things == expensive