Skip to content

PhilippMa/scala-loci

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ScalaLoci is a distributed programming language embedded into Scala. The language provides a coherent model based on placement types that enables reasoning about distributed data flows, supporting multiple software architectures via dedicated language features and abstracting over low-level communication details and data conversions. ScalaLoci simplifies developing distributed systems, reduces error-prone communication code and favors early detection of bugs.

Getting ScalaLoci

  1. Enable support for macro annotations in your build.sbt

    • for Scala 2.13

      scalacOptions += "-Ymacro-annotations"
    • for Scala 2.11 or 2.12 (Macro Paradise Plugin)

      addCompilerPlugin("org.scalamacros" % "paradise" % "2.1.1" cross CrossVersion.patch)
  2. Add the resolver for the ScalaLoci dependencies to your build.sbt

    resolvers += Resolver.bintrayRepo("stg-tud", "maven")
  3. Add the ScalaLoci dependencies that you need for your system to your build.sbt

    1. ScalaLoci language (always required)

      libraryDependencies += "de.tuda.stg" %% "scala-loci-lang" % "0.4.0"
    2. Transmitter for the types of values to be accessed remotely (built-in Scala types and standard collections are directly supported without additional dependencies)

      • REScala reactive events and signals

        libraryDependencies += "de.tuda.stg" %% "scala-loci-lang-transmitter-rescala" % "0.4.0"
    3. Network communicators to connect the different components of the distributed system

      • TCP [JVM only]

        libraryDependencies += "de.tuda.stg" %% "scala-loci-communicator-tcp" % "0.4.0"
      • WebSocket (using Akka HTTP on the JVM) [server: JVM only, client: JVM and JS web browser APIs]

        libraryDependencies += "de.tuda.stg" %% "scala-loci-communicator-ws-akka" % "0.4.0"
      • WebSocket (Play integration) [server: JVM only, client: JVM and JS web browser APIs]

        libraryDependencies += "de.tuda.stg" %% "scala-loci-communicator-ws-akka-play" % "0.4.0"
      • WebSocket (using Javalin on the JVM) [server: JVM only, client: JS web browser APIs]

        libraryDependencies += "de.tuda.stg" %% "scala-loci-communicator-ws-javalin" % "0.4.0"
      • WebRTC [JS web browser APIs only]

        libraryDependencies += "de.tuda.stg" %% "scala-loci-communicator-webrtc" % "0.4.0"
    4. Serializer for network communication

      • µPickle serialization

        libraryDependencies += "de.tuda.stg" %% "scala-loci-serializer-upickle" % "0.4.0"
      • Circe serialization

        libraryDependencies += "de.tuda.stg" %% "scala-loci-serializer-circe" % "0.4.0"

Using ScalaLoci network communication as a library

ScalaLoci’s underlying network communication library abstracting over different network protocols can be used directly without ScalaLoci’s language abstractions. The library provides pluggable communicators for different network protocols and transmitters implementing the remote transmission semantics for values of different types.

  1. Add the resolver for the ScalaLoci dependencies to your build.sbt (same as above)

  2. Add the ScalaLoci dependencies that you need for your system to your build.sbt

    1. ScalaLoci communication library (always required)

      libraryDependencies += "de.tuda.stg" %% "scala-loci-communication" % "0.4.0"
    2. Transmitter for the types of values to be accessed remotely (built-in Scala types and standard collections are directly supported without additional dependencies)

      • REScala reactive events and signals

        libraryDependencies += "de.tuda.stg" %% "scala-loci-transmitter-rescala" % "0.4.0"
    3. Network communicators to connect the different components of the distributed system (same as above)

    4. Serializer for network communication (same as above)

Examples and Case Studies

About

A programming language for distributed applications

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Scala 100.0%