Giter Club home page Giter Club logo

reactive-streams-for-java-developers's Introduction

Introduction to Reactive Streams for Java Developers

TL;DR

  • gradlew run
  • go to http://localhost:8080
  • copy one or more files from src/main/resources/sample-data to data
  • observe the data being sent to the browser via a websocket

reactive-streams-for-java-developers's People

Contributors

rucek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

reactive-streams-for-java-developers's Issues

Trouble running demo

when I run
gradlew run

I see the following error in console:

[ERROR] [02/02/2018 13:26:31.219] [Server-akka.actor.default-dispatcher-3] [akka://Server/user/StreamSupervisor-0/flow-3-0-unnamed] Error in stage [akka.http.impl.engine.server.HttpServerBluePrint$ProtocolSwitchStage@7abfcf5d]: The path: 'data' does not exist
java.lang.IllegalArgumentException: The path: 'data' does not exist
        at akka.stream.alpakka.file.javadsl.DirectoryChangesSource.createLogic(DirectoryChangesSource.java:71)

The browser shows:
[13:26:31] WS connection opened [13:26:31] WS connection closed with code: 1006

I see ./build/resources/main/data exists...(data directory did not exist on clone, I created it under ./src/main/resources/data).

What is the correct location for the data directory -- the instructions just say to copy a csv file into it

Single stream broadcasting results to all web socket clients?

Looks like this code will materialize the full stream for each new web socket client, meaning duplicates of each processing step.

It can be expensive in real applications.

Is there a way to have just 1 stream and broadcast results to all web socket clients?

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.