-
Notifications
You must be signed in to change notification settings - Fork 9
Comet Stream
Marc Larue edited this page Aug 13, 2016
·
71 revisions
NEW Fuse is an example of Comet Stream multiplayer with C++/Unity/HTML5 on rupy.
NEW Aeon Alpha is an example of Comet Stream on rupy.
You can now stream messages over HTTP with rupy.
As RFC I supply this reference implementation.
Termination is now \n for this text based implementation.
The message energy price performance per second of the test included above:
This table is biased on the fact that most energy is lost on idle CPUs.
CPU(s) | load | M/s | watt | M/j | $ | M/j/$ | T* |
---|---|---|---|---|---|---|---|
3770S(4) | 0% | 13.000 | 20 | 650 | 500 | 1.3 | |
4010U(2) | 7.5% | 9.000 | 10 | 900 | 400 | 2.25 | |
D510MO(2) | 50% | 9.000 | 15 | 600 | 400 | 1.5 | |
NEO(4) | 150% | 13.000 | 2 | 6.500 | 10 | 650 | 60C |
ONE(4) | 200% | 13.000 | 2.5 | 5.200 | 10 | 520 | 70C |
RPi3(4) | 130% | 13.000 | 2 | 6.500 | 50 | 130 | 60C |
RPi2(4) | 200% | 6.500 | 1.5 | 4.333 | 30 | 144.4 | |
RPi1(1) | 100% | 1.000 | 2 | 500 | 35 | 14.2 |
*
With same small heatsink, no case.
You can try it quickly by going to this flash demo:
Flash: stream (see code below) (server is in Helsingborg, Sweden)
Or right-clicking these two links and opening them in different tabs/windows/devices (so you can see the stream in real-time):
HTTP | one | < "hello" | two | -Chrome doesn't render without a html tag now.Now it does again.
event-stream | one | < "hello" | two |
You will then send "hello" from two to one.
Reloading two will resend the message.
You can play around with more windows
and name=three&message=hi values.
If it doesn't work, try later, somebody else might
be trying it at the same time.
IE doesen't render until a certain amount is
received, so hold down F5 in two for a while.
This code allows you to receive dynamic chunks with other languages: C# C++