Giter VIP home page Giter VIP logo

ticker-elixir's Introduction

Build Status Coverage Status

ticker-elixir

ticker-elixir is an example Elixir OTP app which periodically pulls quotes for configured symbols. In this example, quotes are pulled from the defunct, but still available, Google Finance API. Additiionly, quotes can be simulated (the current default). Retrieved quotes are stored within individual symbol GenServers. These quotes are then rolled up into time-frame intervals using ETS tables, stored within additional GenServers, all supervised by OTP.

To broadcast quote/time-frame information, callbacks can be configured to notify of updates. These callbacks are how the ticker-phoenix application captures quotes/time-frames and publishes them to Phoenix channels.

While currently not implemented at this time, it might be interesting to build an adapter layer to configure this OTP app to consume different quote endpoints. Obviously, Google Finance is just a very simple example, but there's no reason why professional quality feeds couldn't be consumed.

A HUGE missing piece to this puzzle is that historical data is currently only stored within ETS. The 2nd phase will be to wire this into Cassandra, a perfect solution for time-based historical data. Stay tuned!

To see the ticker-elixir app in action, head over to

To run the three apps togther, follow the startup instructions for both ticker-phoenix & ticker-react. This app, ticker-elixir, will be included within ticker-phoenix

Example screenshot of the three applications being used together

Stock Ticker

Environment

The sample was developed using the following

  • Elixir 1.3.0
  • OS X El Capitan (10.11)

Note: Pull the elixir_1.4 branch to use Elixir 1.4. This branch also includes an update to use the Elixir 1.4 Registry in place of gproc ๐Ÿ‘

Setup

Clone Repo

git clone https://github.com/philcallister/ticker.git

Dependencies

mix deps.get
mix deps.compile

Run It

Start the server

mix ticker.server

OR within iex

iex -S mix ticker.server

Installation within OTP app

  1. Add ticker to your list of dependencies in mix.exs:

    def deps do
    	[{:ticker, git: "https://github.com/philcallister/ticker-elixir.git"}]
    end
  2. Ensure ticker is started before your application:

    def application do
    	[applications: [:ticker]]
    end

License

MIT License

Free Software, Hell Yeah!

ticker-elixir's People

Contributors

philcallister avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ticker-elixir's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.