Giter VIP home page Giter VIP logo

dashboard-clj's Introduction

dashboard-clj

Join the chat at https://gitter.im/multunus/dashboard-clj

A clojure mini-framework to build dashboards inspired by dashing.

A lot of plumbing work goes into building a dashboard. Setting up a dashboard involves the following challenges:

  • Fetching data
  • Scheduling data retrieval
  • Transferring data to the client
  • Visualizing
  • Deployment

Fetching

Data source, used for fetching data, is just a clojure function! The scheduler will run the function and broadcast the result to the client side as per the schedule. We take care of caching the data so that a client who joins later can immediately use the last results available.

Scheduling

In order to periodically update the dashboard with the latest data, every data source can optionally have a schedule. Data gets fetched and sent to the client at the configured intervals.

Here is an example configuration for a data source with schedule,

{
  :name :sample-dashboard-stats
  :read-fn :sample-dashboard.fetcher/fetch
  :params ["multunus" "dashboard-clj"]
  :schedule {
    :in [0 :seconds]
    :every [5 :minutes]}}

Transferring data

Sente is a great websocket library that we use to broadcast the data fetched by every data source to the clients. On the client side, we use re-frame, and the data will be cached on the client - this happens under the hood. The widgets will be re-rendered when data changes on the client side. So, no confguration is required here.

Visualizing

We are still trying to improve this part. We are shipping a basic layout(react grid layout) but not any widgets yet. We found that widgets and their look and feel vary greatly, and we are still pondering over a good common set of widgets to ship.

Since widgets are just reagent components, they are easy to create. Above all, tons of great libraries can be found here. In addition, the reagent cookbook talks in depth on how to setup common libraries.

Deployment

We can host this dashboard on Heroku in no time! Read about it here.

![Screenshot] (https://db.tt/Z5WnyEpj)

About

Multunus logo

dashboard-clj is maintained and funded by Multunus Software Pvt. Ltd. The names and logos for Multunus are trademarks of Multunus Software Pvt. Ltd.

We built this as part of learning Clojure in our 20% time. We will be supporting this library during our investment time and using it to create internal dashboards at Multunus.

dashboard-clj's People

Contributors

kp2222 avatar tacticiankerala avatar jerryjohnjacob avatar vignesh1115 avatar gitter-badger avatar suttonwilliamd avatar

Watchers

Vlad Bokov avatar James Cloos avatar  avatar

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.