Skip to content

Commit f151532

Browse files
committed
unnecessary code and tests removed, simple ApplicationSpec added
1 parent e197060 commit f151532

File tree

6 files changed

+32
-163
lines changed

6 files changed

+32
-163
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ BirdWatch is a reactive web application for visualizing a stream of live Tweets
66

77
Here is an overview of the information flow in the system:
88

9-
![Screenshot](./docs/dataflow.gif)
9+
![Data Flow](./docs/dataflow.gif)
1010

1111
A Play application connects to the **[Twitter Streaming API](https://dev.twitter.com/docs/streaming-apis)** and receives all Tweets that include at least one of a set of configured words. Twitter caps this to 1% of the FireHose, which basically means that the application will not receive more than one percent of all Tweets at any given moment of time. This limit still falls in the range of millions of Tweets per day; a well-defined area of interest should comfortably fit in.
1212

1313
Incoming Tweets are inserted into an **[ElasticSearch](http://www.elasticsearch.org)** index where they are almost instantly available for querying. Each Tweet is also compared with what is called a percolation query, a pre-registered query for each connected client. Every thus pre-registered query is run on every new Tweet. For every Tweet on which the query matches the client will immediately be informed by means of **[Server Sent Events (SSE)](http://dev.w3.org/html5/eventsource/)**.
1414

1515
**[AngularJS](http://angularjs.org)** clients hold a local data copy of all the Tweets they have asked for using the
16-
**[ElasticSearch query syntax](http://www.elasticsearch.org/guide/reference/query-dsl/query-string-query/)**, with 'AND' being the default operator. Every query is not only run on the existing Tweets in the ElasticSearch index but is also registered as a percolation query. A user selectable amount of previous Tweets is loaded, and then every new Tweet for which the query matches is appended immediately, allowing Tweets analysis in near-realtime. Queries are bookmarkable, making it easy to frequently look at interesting and potentially complex queries.
16+
**[ElasticSearch query syntax](http://www.elasticsearch.org/guide/reference/query-dsl/query-string-query/)**, with 'AND' being the default operator. Every query is not only run on the existing Tweets in the ElasticSearch index but is also registered as a percolation query. A user selectable amount of previous Tweets is loaded, and then every new Tweet for which the query matches is appended immediately, allowing Tweets analysis in near-real-time. Queries are bookmarkable, making it easy to frequently look at interesting and potentially complex queries.
1717

1818
Client-side analysis of the (live) search result is performed using **[Crossfilter](http://square.github.io/crossfilter/)**.
1919

app/utilities/Calc.scala

Lines changed: 0 additions & 17 deletions
This file was deleted.

test/ApplicationSpec.scala

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import org.specs2.mutable._
2+
import org.specs2.runner._
3+
import org.junit.runner._
4+
5+
import play.api.test._
6+
import play.api.test.Helpers._
7+
8+
/**
9+
* Add your spec here.
10+
* You can mock out a whole application including requests, plugins etc.
11+
* For more information, consult the wiki.
12+
*/
13+
@RunWith(classOf[JUnitRunner])
14+
class ApplicationSpec extends Specification {
15+
16+
"Application" should {
17+
18+
"send 404 on a bad request" in new WithApplication{
19+
route(FakeRequest(GET, "/boum")) must beNone
20+
}
21+
22+
"render the index page" in new WithApplication{
23+
val home = route(FakeRequest(GET, "/")).get
24+
25+
status(home) must equalTo(OK)
26+
contentType(home) must beSome.which(_ == "text/html")
27+
contentAsString(home) must contain ("BirdWatch")
28+
}
29+
}
30+
}

test/CalcSpec.scala

Lines changed: 0 additions & 14 deletions
This file was deleted.

test/TimeIntervalSpec.scala

Lines changed: 0 additions & 52 deletions
This file was deleted.

test/WordCountSpec.scala

Lines changed: 0 additions & 78 deletions
This file was deleted.

0 commit comments

Comments
 (0)