Giter Club home page Giter Club logo

quasar-stocks's Introduction

Quasar Stocks

This is a porting of TypeSafe's Reactive Stock example to Quasar Actors and Comsat Web Actors. Run on Jetty embedded servlet container plus its WebSocket module.

Getting started

  1. ./gradlew run.
  2. Open http://localhost:8080 in Firefox.
  3. Play with it.

Notes

  • The Java implementation is almost as compact as the half-Scala original one.
    • ...And much easier to understand.
  • Quasar Actors are based on Quasar's lightweight threads or fibers which make all the code is code straightforward, sequential imperative style.
    • No declarative-functional-monadic-async programming is forced down your throat just to work around JVM threads' heavy footprint.
  • Since calls are (fiber-)blocking and full control flow language can be used around them, no tick message is needed: just use the straightfoward blocking receive with a timeout.
  • By default Web Actors automatically assign a new actor to a request or WebSocket connection, which can be configured for automatic termination upon connection closing with a simple watch call.
    • So, supervision isn't really necessary and Quasar doesn't make it mandatory (it is there just to showcase it).
  • Actors and Web Actors do just one thing well: everything is conf- and JSON-library agnostic, you're not forced into a full-blown lock-in web framework.
  • 100% Servlet compatible, no need to run a non-standard embedded server if you don't want to.

TODO

  • Currently generated web resources are just copied: add build steps from original CoffeeScript and LESS source files.
  • Do away with the comsat-testutils dep.
  • Add Capsule-based deployment.

quasar-stocks's People

Watchers

none-p avatar James Cloos 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.