Git Product home page Git Product logo

scastie's Introduction

Build Status

Join the chat

Scala pastebin

https://scastie.scala-lang.org

Goals

  • enhance communication and collaborative debugging by providing extensive insight in code snippets
  • fast and easy to use, no ads, no registration

Current Features

  • reusing sbt instances for fast compilation
  • distributes workload amongst multiple sbt instances (including remote)
  • realtime update of snippet compilation/running progress
  • timeout long-running snippets
  • allow specifying scala version, target and external libraries

Why it does it this way, benefits and drawbacks

Scastie relies on existing scala infrastructure to provide close to real world experience inside a pastebin-like sandbox. This minimizes the effort to create meaningful snippet but might require some prior experience to fully unleash its (and scala) power.

High-level design and architecture

The application consists of three modules:

  • scastie - standard akka-http web application module
  • sbt-runner - encapsulates snippets processing
  • balancer - split the load across multiple sbt instances

For each snippet create/read request Application controller in scastie module creates a message and sends it to DispatchActor in renderer module. The DispatchActor routes messages to a remote SbtActor via akka router.

SbtActor(s) interacts with locally running sbt instance via process I\O streams, which is quite hacky, but works good enough. If the sbt instance terminates or otherwise encounters an error while processing a snippet, the actor will be restarted.

Currently the snippet are stored directly on file system on master node (the one which is running web application).

scastie's People

Contributors

arminio avatar dominv avatar gitter-badger avatar jlprat avatar jorgegalindocruces avatar masseguillaume avatar olegych avatar opensas avatar travissarles avatar xuwei-k avatar

Watchers

 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.