Giter Club home page Giter Club logo

sse-chat's People

Contributors

berinle avatar jamesward avatar matthiasn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sse-chat's Issues

blog demo halts occasionally for a few minutes

suspicion: Concurrent.broadcast calls attached Iteratees sequentially. If SSE connection to client not properly closed: time-out

attempted fix: buffering:
Ok.stream(chatOut &> roomFilter(room)
&> ipFilter(req.remoteAddress)
&> toJsValue
&> Concurrent.buffer(20)
&> EventSource()).as("text/event-stream")

Ok.feed vs Ok.chunk

Hi Matthias,

We have deconnexion using Ok.feed on heroku. It seems that Ok.chunk should be more apropriate when the connexion is persistent without knowing the total lenght of the stream data and Ok.feed is usefull when streaming a know length, for example streaming a long file.
What is your experience/tests on both methods as the Play documentation is not very helpfull.

Unable to run the application

Hi Matthias,

I am trying to run your application and getting the following exception:

java.lang.NoClassDefFoundError: scala/StringContext
at sbt.CommandStrings$.(CommandStrings.scala:62)
at sbt.CommandStrings$.(CommandStrings.scala)
at sbt.BuiltinCommands$.initialize(Main.scala:195)
at sbt.xMain.run(Main.scala:27)
at xsbt.boot.Launch$.run(Launch.scala:55)
at xsbt.boot.Launch$$anonfun$explicit$1.apply(Launch.scala:45)
at xsbt.boot.Launch$.launch(Launch.scala:69)
at xsbt.boot.Launch$.apply(Launch.scala:16)
at xsbt.boot.Boot$.runImpl(Boot.scala:31)
at xsbt.boot.Boot$.main(Boot.scala:20)
at xsbt.boot.Boot.main(Boot.scala)
Caused by: java.lang.ClassNotFoundException: scala.StringContext
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 11 more
Error during sbt execution: java.lang.NoClassDefFoundError: scala/StringContext

I have play 2.1.4 installed on my box, sbt 0.13.0 and scala 2.10.3.

Thank you in advance!

Unable to run

I am trying to run this on Ubuntu 14.04, openjdk 7. After the initial downloading of dependencies, the run task seems to hang for a long time, with no messages except the below:

./activator run
[info] Loading project definition from /home/user/sse-chat/project

Play! does not handle more than 7 sse request in parallel

Hello,

Thanks for your app, it helped me a lot to understand how to do SSE with Play.

However, I did this test : I opened the chatroom in multiple tabs.
Everything works fine for the first 7 tabs. But on the 8th tab, the server does not respond!

Is it normal? Do you know how to increase this limitation?

mixed org.scala-lang dependencies

I notice you've set

scalaVersion := "2.10.1"

in build.sbt.

This results in

org.scala-lang:scala-library:2.10.1

being included as expected.

However,

org.scala-lang:scala-actors:2.10.0
org.scala-lang:scala-reflect:2.10.0

are not updated, presumably because they are being brought in by the Play framework code that is built with scala 2.10.0.

Is it a good idea to update scalaVersion independently of the Play framework?

Nice sample, thanks!

Max number of connections

Hi,

I am curious how many concurrent clients you were able to connect to your server. I wrote a express.js (Node) server supporting event source streams and could get up to 3000 clients without optimizations, which seems not that high to me. Also the CPU is maxed out with 3000 clients.

Did you benchmarked it? How does it perform?

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.