Giter Club home page Giter Club logo

monifu's Introduction

Idiomatic Reactive Extensions for Scala. Targets both the JVM and Scala.js.

Build Status Gitter

Teaser

import monifu.concurrent.Implicits.globalScheduler
import play.api.libs.ws._
import monifu.reactive._

// emits an auto-incremented number, every second
Observable.interval(1.second)
  // drops the first 10 emitted events
  .drop(10)
  // takes the first 100 emitted events  
  .take(100)
  // per second, makes requests and concatenates the results
  .flatMap(x => WS.request(s"http://some.endpoint.com/request?tick=$x").get())
  // filters only valid responses
  .filter(response => response.status == 200)
  // samples by 3 seconds, repeating previous results in case of nothing new
  .sampleRepeated(3.seconds)
  // processes response, selecting the body
  .map(response => response.body)
  // creates subscription, foreach response print it
  .foreach(x => println(x))

There's actually a lot more to Monifu.

Documentation

NOTE (Feb 27): the documentation is a little obsolete and incomplete in places. Currently the project is marching towards a stable 1.0 and properly documented version. Be patient :-)

The available documentation is maintained as a GitHub's Wiki. Work in progress.

API documentation:

Release Notes:

Usage

The packages are published on Maven Central. Compiled for Scala 2.11.5 and Scala.js 0.6.0. Older versions are no longer supported.

  • Current stable release is: 1.0-M1

For the JVM

libraryDependencies += "org.monifu" %% "monifu" % "1.0-M1"

For targeting Javascript runtimes with Scala.js

libraryDependencies += "org.monifu" %%% "monifu" % "1.0-M1"

License

All code in this repository is licensed under the Apache License, Version 2.0. See LICENCE.txt.

Acknowledgements

YourKit supports the Monifu project with its full-featured Java Profiler. YourKit, LLC is the creator [YourKit Java Profiler](http://www.yourkit.com/java/profiler/index.jsp) and [YourKit .NET Profiler](http://www.yourkit.com/.net/profiler/index.jsp), innovative and intelligent tools for profiling Java and .NET applications.

monifu's People

Contributors

creyer2 avatar alexandru avatar gitter-badger avatar

Watchers

James Cloos avatar Andre Carvalho 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.