% Bio4j + Statika
% [Alexey Alekhin](http://ohnosequences.com/aalekhin)
% Graph Devroom @ FOSDEM 2014
# Bio4j modules
----
### Bio4j data sources
![](resources/images/Bio4jDataSources.jpg)\
----
### Bio4j modules hierarchy
![](resources/images/Bio4jModules.png)\
----
### Bio4j custom releases
![](resources/images/Bio4jModulesSelected.png)\
----
### Bio4j custom releases
![](resources/images/Bio4jModulesSelectedWithDeps.png)\
----
### Goals
- Flexible module system
- Simple import process
- Dependencies management
- Easy and robust deployment
# Statika
----
### What is Statika
![](resources/images/ClockFacesStatika.jpg)\
----
### Abstract module system
- Modules as Scala types — _bundles_
- They can _depend_ on each other!
- It's validated by compiler —
i.e. _statically_
- Linearizing types graph to get them in the right order
----
### Managing artifacts
- Packing bundles into versioned artifacts (jars)
- Reusing [SBT](http://www.scala-sbt.org/) (Simple Build Tool) infrastructure
- Standardizing settings and release process with the [sbt-statika plugin](https://github.com/ohnosequences/sbt-statika)
----
### Deployment
[Amazon Web Services](http://aws.amazon.com/) + [aws-statika lib](https://github.com/ohnosequences/aws-statika)
- Bundles can be _applied_, i.e. deployed it to an EC2 instance
- Statika _distributions_ — an abstraction for the cloud infrastructure specifics
# Bio4j + Statika
----
### Defining Bio4j modules
- Raw data
- Node/relations type defs
- Importing process
- Exposing some API
----
### Inner bundles layout
![](resources/images/Bio4jStatikaBundles.png)\
----
### Inner bundles layout example
![](resources/images/Bio4jModulesExample.png)\
----
### Incremental import
- Incremental import of data
to existing Bio4j distributions
- Not repeating already done work
- Easy to describe abstractly
----
### Incremental import example
![](resources/images/Bio4jModulesExampleIncremental.png)\
----
### Custom release of Bio4j
- create a release-bundle with needed modules
- be sure not to spend resources on a wrong configuration —
compile it!
- use tools for easy release and deployment:
[sbt-statika](https://github.com/ohnosequences/sbt-statika) + [statika-cli](https://github.com/ohnosequences/statika-cli)
# Summary
----
### Bio4j + Statika = win!
- _Abstract_ layout of bundles
- Hierarchy of _concrete_ modules
- Tracking deps on _all levels_
- Doing it at _compile time_
- Using AWS _cloud_ infrastructure
for the actual work