Skip to content

Instantly share code, notes, and snippets.


Jacek Kunicki rucek

View GitHub Profile
rucek /
Last active Dec 12, 2017

Here's a simple diagram to start with.

There's indeed a single WS flow created and materialized for every WS connection, i.e. for every browser window/tab. This happens when the UserActor receives WatchStocks - the created flow is then passed back to the HomeController.

Now, a WS flow consists of two endpoints: a sink which accepts the data that comes from the browser and a source which emits the data that is sent to the browser. So, to create a WS flow you need to have those two and combine them with Flow.fromSinkAndSourceCoupled.

In this example, those endpoints are:

  • the sink is the jsonSink, which accepts a stock name and, in turn, creates and runs a source with some random values for this stock (the purple ones in the diagram); the source is then attached to the hubSink (the yellow part in the diagram)
  • the source is the hubSource (the green part in the diagram), which emits all values o
View gist:a2507bfda03163257c04
1. scp jar
sudo cp vote-reporter-assembly-1.5.jar /opt/voter/ && sudo vim /opt/voter/application.conf
sudo /etc/init.d/voter restart && tail -f /opt/voter/voter.log
View TemplateControllerTest.groovy
def "OVF download should end with status code #expectedStatusCode when #condition"() {
checkTaskStatus(taskId, expectedStatusCode)
rucek /
Created Jul 13, 2011
Removing directories from last month
ls /the/directory | grep .*-`date -d"1 month ago" +%Y%m`.* | xargs rm -rf
You can’t perform that action at this time.