#tesla-microservice
"If Edison had a needle to find in a haystack, he would proceed at once with the diligence of the bee to examine straw after straw until he found the object of his search." - Nikola Tesla
This is the common basis for some of otto.de's microservices. It is written in clojure using the component framework.
[de.otto/tesla-microservice "0.1.18"]
tesla-microservice is used for a number of different services now. Still it is a work in progress. See CHANGES.md for instructions on breaking changes.
- Load configuration from filesystem.
- Aggregate a status.
- Reply to a health check.
- Deliver a json status report.
- Report to graphite using the metrics library.
- Manage handlers using ring.
- Shutdown gracefully. If necessary delayed, so load-balancers have time to notice.
As of version 0.1.15
there is no server included any more directly in tesla-microservice.
This gives you the freedom to a) not use any server at all (e.g. for embedded use) b) choose another server e.g. a non-blocking one like httpkit or immutant. The available options are:
- tesla-jetty: The tried and tested embedded jetty.
- tesla-httpkit: The non-blocking httpkit.
The basis included is stripped to the very minimum. Additional functionality is available as addons:
- tesla-zookeeper-observer: Read only access to zookeeper.
- tesla-mongo-connect: Read/write access to mongodb.
- tesla-cachefile: Read and write a cachefile. Locally or in hdfs.
More features will be released at a later time as separate addons.
- A growing set of example apllications can be found at tesla-examples.
- David & Germán created an example application based, among other, on tesla-microservice. They wrote a very instructive blog post about it
- Moritz created tesla-pubsub-service. It showcases how to connect components via core.async channels. Also the embedded jetty was replaced by immutant.
Q: Is it any good? A: Yes.
Q: Why tesla? A: It's a reference to the ingenious scientist and inventor.
Q: Are there alternatives? A: Yes. You might want to look at modularity.org, system and duct.
Christian Stamm, Felix Bechstein, Ralf Sigmund, Kai Brandes, Florian Weyandt
Apache License