Ian Truslove ● @iantruslove ● Sonian.com
- Overview
- Lifecycle
- Components
jupiterctls
with Carouseldefadmins
- Config with Carica
- Embedded webservers
- Sonian
- Emails
- Analytics
- Jupiter
- Jupiter: It’s Just a JAR
- We use
lein tar
for packaging (very similar to uberjar) - lein-tar
- We use
- Shell script to start server
jupiterctl
shell script interface for shutdown (more later)- System model:
- One “master” per JVM
- Thread pool for workers
- Queue for job management (PostgreSQL)
- Zookeeper for distributed locks
For managing and composing system state
- Based on Stuart Sierra’s component
- Multimethod dispatch:
- start
- stop
- status
- All state contained in one atom
- Worker system plus ad-hoc test-time systems
- Carousel runs a socket server
- Carousel is open source
defadmin
sets up socket-invokable functionsjupiterctl
is a simple wrapper aroundnc
- Auto-documented via docstrings
- Interesting jupiterctls:
- help
- status
- config
- repl
- stop
- EDN config files in multiple places
- Carica is open source
- Ring Jetty adapter (api)
- Maintains its own threadpool
- Alternatives: