Skip to content

gorillalabs/tesla

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#tesla

Tesla is a basic set of components to build microservices in Clojure plus some useful components. It is built upon Mount to support stateful components in a very clojuresque way.

These are the (stateful) components defined by Tesla (gorillalabs.tesla/core) itself:

  • a metrics reporter to gather and distribute metrics
  • a handler component to manage your http handlers and register them to your http server.
  • an http server (actually, it's httpkit with a minimal wrapper)
  • a state to aggregate component state to an appstate, so we can get a view into the state of our application as a whole. Register your components to use this.
  • a health check you can set to UNHEALTHY from your code (will be set if Tesla is shutting down). This will give your loadbalancers a signal to take a certain instance off the balancing.
  • a scheduling component based upon Quarzite.
  • a Shutdown mechanism. If necessary delayed, so load-balancers have time to notice.

Tesla is a fork of Tesla Microservices by Otto.de, or to be more precise one of Kai Brandes' fork.

Build Status

gorillalabs/tesla (Parent project)

Dependencies Status Downloads Clojars Project

gorillalabs.tesla/core

Downloads Clojars Project

gorillalabs.tesla/titan

Downloads Clojars Project

gorillalabs.tesla/mongo

Downloads Clojars Project

gorillalabs.tesla/quarzite

Downloads Clojars Project

gorillalabs.tesla/sente

Downloads Clojars Project

gorillalabs.tesla/aws-s3

Downloads Clojars Project

gorillalabs.tesla/timbre-logstash

Downloads Clojars Project

Breaking changes

We us tesla for a number of different services now. However, it's not a 1.0.0 version and it still is to be considered work in progress. See CHANGES.md for instructions on breaking changes.

    (ns gorillalabs.ms-example
      (:require [gorillalabs.tesla :as tesla]
                [clojure.tools.logging :as log]
                [gorillalabs.tesla.component.httpkit :as server])
  (:gen-class))

(defn -main [& args]
  (log/info "Starting MS-EXAMPLE")
  (tesla/start
    {:http-server #'server/server}
    ;put your custom states you want to start with the default states here
    ))

Can I Contribute?

Yes, just fork the Github repo, make changes and create a pull request against the develop branch. Make sure to have documentation, tests, etc. Whatever it takes to be a good OSS citizen.

License

Apache License

About

Clojure Microservice/Component library

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Clojure 97.8%
  • Java 2.2%