Gabbler is a simple chat demo for a modern web application: Single-page client based on AngularJS, highly scalable RESTful server written in Scala, Akka and spray.
The Gabbler server is built on top of Akka actors, non-blocking and asynchronous from top to bottom. Therefore it can easily be scaled up and out. In order to keep things simple and focus on the core message-passing architecture, Basic Authentication and Ajax with long polling are used. This might be revised when spray supports OAuth and WebSocket, but long polling is particularly well suited to showcase the strengths of Akka actors and spray.
Huge thanks to Mathias Doenitz from the spray team for his help and contributions!
Clone this repository, cd
into it and start sbt. Then simply execute run
to start the Gabbler server:
gabbler$ sbt
[info] ...
[info] Set current project to gabbler (in build file:/Users/heiko/projects/gabbler/)
> run
[info] Running name.heikoseeberger.gabbler.GabblerServerApp
Hit ENTER to exit ...
Open a browser and point it to localhost:8080/. Use the same value for username and password, e.g. "John" and "John".
Enter a message in the text area on the left, click the "Gabble away" button and watch the message appear on the right.
Open a second browser window which needs to be a different application if you want to use a separate login (e.g. first Safari, second Chrome), enter another message and watch it appear in both browser windows.
Finally, hit the ENTER key in the sbt session to stop the Gabbler server.
TODO
Contributions via GitHub pull requests are gladly accepted from their original author. Along with any pull requests, please state that the contribution is your original work and that you license the work to the project under the project's open source license. Whether or not you state this explicitly, by submitting any copyrighted material via pull request, email, or other means you agree to license the material under the project's open source license and warrant that you have the legal authority to do so.
This code is open source software licensed under the Apache 2.0 License. Feel free to use it accordingly.