• Stars
    star
    173
  • Rank 220,124 (Top 5 %)
  • Language
    Clojure
  • License
    Eclipse Public Li...
  • Created over 9 years ago
  • Updated almost 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Tools and building blocks for building Systems in Clojure and ClojureScript

systems-toolbox

Applications are systems. Systems are fascinating entities, and one of their characteristics is that we can observe them. Read more about that here. Also make sure you read about the rationale behind this library.

Dependencies Status

What's in the box?

This library helps you build distributed systems. Such a larger system could, for example, consist of multiple processes in different JVM, plus all connected browser instances, which, if you think about it, are an important part of the overall distributed systems. Going forward, there is also support planned for native apps. Except for a different presentation layer, the required code should be the exact same as for single-page web applications.

This library only contains the bare minimum for building and wiring systems. Additional functionality can be found in these repositories:

  • systems-toolbox-ui: This library gives you a simple way to build user interfaces using Reagent. This provided functionality is somewhat comparable to React & Redux. I'll elaborate on this soon. This library powers the user interfaces of the example applications.

  • systems-toolbox-sente: This library connects browser-based subsystems with a backend system using WebSockets. This library contains everything you need for serving your application via HTTP, including support for HTTPS, HTTP2, deployment in application servers, and serving REST resources. This library serves the sample applications and provides the communication with their respective backends.

  • systems-toolbox-kafka: This library connects different systems via Kafka so that they can form a larger, distributed system.

  • systems-toolbox-metrics: This library is a small example for how functionality can be implemented across subsystems. Here, we have a server-side component which gathers some stats about the host and JVM, plus a UI "widget" that can be embedded in a systems-toolbox-ui interface. You can see it in use in both example applications.

Artifacts

Artifacts are released to Clojars.

With Leiningen, add the following dependency to your project.clj:

Clojars Project

In addition, you also need to add the dependency for core.async, e.g. with Leiningen:

[org.clojure/core.async "0.6.532"]

Testing

This library targets both Clojure and Clojurescript and is written entirely in .clc. Accordingly, testing needs to happen on both the JVM and at least one of the JS runtimes out there. For testing on the JVM, you simply run:

$ lein test

On the JavaScript side, you have more options, for example:

$ lein doo node cljs-test once

Instead of once, you can also use auto to run the tests automatically when changes are detected. For more information about the options, check out the documentation for doo.

Both ways of testing run automatically on each new commit. On the JVM, we use CircleCI: CircleCI Build Status

On TravisCI, the tests then run in a JS environment, on Node.js: TravisCI Build Status

Check out the circle.yml and .travis.yml files when you need an example for how to set up your projects with these providers.

Examples

Right now, there are two example applications:

  • There's an example project in this repository that visualizes WebSocket round trip delay by recording mouse moves and showing two circles at the latest mouse position. One of them is driven by a message that only makes a local round trip in the web application, and the other one is driven by a message that is sent to the server, counted and sent back to the client. Thus, you will see the delay introduced by the by the client-server-client round trip immediately when you move the mouse. Also, there are some histograms for visualizing where time is spent. There's a live example of this application here.

Example Screenshot

  • Then, there's the toy example I mentioned above, BirdWatch. This application provided the inspiration for this library. A running demo instance can be seen here.

BirdWatch Screenshot

Feedback and question

Please feel free to open issues here or in any of the related projects when you have a question. Also, you can send the author an email, but issues are generally preferred as more users would benefit from the resulting discussion. Also, there's a chat on Join the chat at https://gitter.im/matthiasn/systems-toolbox.

Contributions

Contributions always welcome! Unless it's nothing more than the fix of a typo though, the best approach is to start with an issue and a brief discussion of the problem or improvement, rather than start the process with a pull request. Cheers.

Project maturity

This project is quite young and APIs may still change. However, you can expect that minor version bumps do not break your existing system.

License

Copyright © 2015, 2016 Matthias Nehlsen

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

More Repositories

1

talk-transcripts

Transcripts of Clojure-related talks
2,737
star
2

BirdWatch

Tweet stream analysis and visualization with real-time updates.
HTML
858
star
3

Clojure-Resources

Compilation of useful links and resources for learning Clojure and ClojureScript
522
star
4

lotti

Achieve your goals and keep your data private with Lotti. This life tracking app is designed to help you stay motivated and on track, all while keeping your personal information safe and secure. Now with on-device speech recognition.
Dart
499
star
5

sse-chat

Chat example app using Server Sent Events plus REST calls. Scala, Play Framework 2.3, AngularJS or React (alternatively).
Scala
384
star
6

inspect

Inspect data structures flowing through your application
Clojure
93
star
7

clojure-system-book

64
star
8

sse-perf

Load testing for Server Sent Event streams (or other HTTP connections that deliver information in chunks) using Play Framework 2.1 -- this project needs an upgrade to the latest Play version. Anyone interested in submitting a PULL REQUEST?
Scala
56
star
9

systemd-watchdog

Frequently notify systemd's watchdog with a single line of code
Clojure
21
star
10

AngularUI-Code

Code samples for AngularJS UI Development Book
JavaScript
19
star
11

systems-toolbox-sente

Sente WebSockets components (client and server) for systems-toolbox
Clojure
9
star
12

WebComponents-Polymer-Resources

Compilation of useful links and resources for learning Web Components and Polymer
8
star
13

live-html5

HTML5 Starter Template with Live Page Reloading on any Device
CSS
7
star
14

scalar-conf

demo application for presentation at scalar conf
JavaScript
5
star
15

amzn-geo-lookup

Find user's local store for affiliate links by performing GeoIP lookup
Scala
5
star
16

ng-blog

Blog Engine based on AngularJS
CSS
5
star
17

systems-toolbox-kafka

Kafka producer and consumer components for systems-toolbox
Clojure
5
star
18

systems-toolbox-electron

Clojure
4
star
19

angular-grunt-protractor-starter

AngularJS sample project with a grunt-based build system using Protractor and Karma
JavaScript
4
star
20

systems-toolbox-ui

DEPRECATED: UI components for systems-toolbox
Clojure
4
star
21

systems-toolbox-redis

Redis Pub/Sub communication for systems-toolbox
Clojure
3
star
22

meins

Clojure
2
star
23

conf

systemd service declarations and install scripts for my live examples
Shell
2
star
24

potluck-recipes

1
star
25

emacs.d

Emacs Lisp
1
star
26

systems-toolbox-reagent

UI component building blocks for systems-toolbox
1
star
27

clj-el-migrate

Clojure
1
star
28

gatsby-blog

CSS
1
star
29

meetup-ionic-todo

JavaScript
1
star
30

octopress-blog

The octopress project that powers my blog.
HTML
1
star
31

meoSwift

Swift
1
star
32

systems-toolbox-metrics

JVM metrics component (with UI) for systems-toolbox
Clojure
1
star