Code Monkey home page Code Monkey logo

arimaa-server's People

Contributors

brendanator avatar lightvector avatar mattj256 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

arimaa-server's Issues

Message lengths, rate limiting

Eventually, before we actually go live, we probably want to consider adding limits on message size and rate for things like sending of chat messages, opening of new games, etc.

Add ScalaStyle

Add ScalaStyle target for sbt.

Scalastyle examines your Scala code and indicates potential problems with it. If you have come across Checkstyle for Java, then you’ll have a good idea what scalastyle is. Except that it’s for Scala obviously.

http://www.scalastyle.org/sbt.html

Once you add the sbt plugin you can do:

sbt scalastyleGenerateConfig
sbt scalastyle

Overview of SBT plugin: http://www.scalastyle.org/sbt.html
XML file configuration options: http://www.scalastyle.org/configuration.html
Example config file. (Used by ScalaStyle team, and Martin Odersky): http://www.scalastyle.org/scalastyle_config.xml
List of all implemented rules: http://www.scalastyle.org/rules-0.2.0.html

Add some simple server bots

A decent number of fixed-strength near-instant-move bots might go a long way to populating the site and giving people things to do.

Password changes and other account management

There needs to be a page for people to change their password and email account and possibly another details of account management. Perhaps, it would be convenient as well to have a page for all the site settings in one place such as animation speed, sounds, preferences related to postal games, etc, once we have such options.

Memory leak in when testing webserver

There's a memory leak in when running SBT to test the webserver. Enough runs of ChatTests.scala will result in something like the following:

Exception in thread "Thread-32"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Thread-32"

OR

java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: PermGen space

As far as I can tell, this is because the web server infrastructure leaks in Java's permanent generation memory on multiple runs. Using "jmap" to probe the memory usage of java, it seems like every run of the tests consumes about 20-40 MB more memory in the permanent generation that is then never freed.

I also haven't find any online resources explaining how to fix it. I only find resources that explain how to increase the limit (and thereby require less frequent restarts of sbt).

Decide on software license.

Neither mattj256 nor lightvector have strong feelings on this one.
Lightvector is going to talk to Omar and/or the community.

User-specified time controls

Add a way for users to specify their own time controls in the UI, rather than hardcoding only some fixed available choices.

Game comments

Add the ability to comment on games after they're played. The design of this should think carefully about how much it should share with with in-game chat. In fact, the in-game chat database and JSON API was designed to leave a bit of a foothold for this, although I don't know if that's ultimately the best way to go.

Support backward/forward for game moves

Need to add the ability to scroll backward and forward through moves in a game to view earlier turns in a game. Particularly when viewing a historical played game, but also when playing or spectating a game.

Hash conflict when downloading paranamer-2.7 library

The following error occurs in sbt when trying to download a library that is depended on by the json parsing libraries we use:

[warn] problem while downloading module descriptor:
https://repo1.maven.org/maven2/com/thoughtworks/paranamer/paranamer/2.7/paranamer-2.7.pom:
invalid sha1: expected=deea673ac6c495cfca3c2fecce26bd9b67295e5b computed=36ef984e4403f800d8aeb5b82045ea4cec0db07b

(libraries added with this revision):
b1c87a9

For now, the following line in Build.scala disables checksum checking.
checksums in update := Nil

Once the mismatching checksum issue is fixed in the library, we should remove this line and retest.

Alternate move controls

Implement or experiment with alternate controls for moving pieces, such as edge-clicking or drag-and-drop.

Allow either player to abort the game before the first move has been played

Allow either player to abort the game before the first move has been played, with no ratings penalty.

(There is some potential for abuse here, so that should be either monitored automatically, or else players should have a way to report abuse to the admin staff.)

(I believe the Free Internet Chess Server allows either player to abort without penalty, i.e. first white moves, then black has the option of aborting with no penalty rather than continuing the game. Again, there's potential for abuse here and that has to be managed in some way.)

Postal games

Selectable default time controls for postal games, email reminders for moves, perhaps the ability to start them without both being logged on at the same time.

Support alternate move formats.

Initially we're only going to support the official Arimaa notation:
2. Ee2n Ee3n Ee4n Ee5n

Some in the community (clyring, SilverMitt) want to use alternate notation(s).
(The exact format of these alternate notations hasn't been specified yet.)

Add sounds to the site

Implement sounds in the game client (steps, captured pieces, low-time, setup, end-of-game win/loss), and a way to turn them on or off (and/or adjust volume?). Perhaps also sounds for chat messages, with a separate on/off control.

Decide on top-level package structure

The current package structure (namespace) is not intended to be permanent.
We should decide whether we will be under arimaa.com or some other domain name, then change the package to match.

Options:

  • arimaa.com (Requires Omar's permission and maybe permission of the community.)
  • playarimaa.com / playarimaa.net / playarimaa.org (These domain names are available. Requires Omar's permission because he owns the trademark.)
  • arimaa.club (This is rabbits' domain name?)
  • Something without "arimaa" in it.

Implement main server queries for playing a game

Implement the server queries roughly as sketched out in the draft API ( issue #30 ) for querying the gamestate and for making moves.

Note: this doesn't need to wait until the board and rules implementation is entirely done, since the interface and data structures exist for them already, but testing of course will need to wait on that.

Enough long-polling blocks other queries

In Chrome, at least, there are a max of 6 open connections per domain (I think shared across all tabs). Since several different things in the site use long polling, if the user has enough game client windows open, or games open in a single gameroom window, this will cause other queries to block (potentially missing heartbeats and such).

I don't know of a solution that doesn't take a lot of work. We want to switch to websockets as a replacement for possibly many long-polling connections, but this requires working around what seems to be bugginess in Scalatra, or switching our web framework entirely if indeed the bugginess is not work-around-able.

Replace org.playarimaa.util.Result with scala.util.Try

Scala has a built-in monadic class scala.util.Try.
It is a case class and the types are Success or Failure.
(I hope I'm getting the terminology right!)

This class integrates with Scala's exception handling. (If an exception is thrown it returns Failure and a message, otherwise Success.)

Bot registration page?

Should we have a standard page for registering bot accounts for developers? But the API actually doesn't distinguish between bots and non-bots almost anywhere. So maybe this isn't so important, not sure.

Use ScalaTest for unit testing

I just set up JUnit because that's what I'm familiar with and that's what was easiest, but ScalaTest has better features and better support for behavior-driven development.

Player information page

A page for each user to display basic stats (rating, win/loss record, last login time, etc) about that player.

Use sbt to build the application.

We might want to use sbt to build our server.
I don't see any compelling reason to set this up right now:

  1. We don't have a lot of source files.
  2. It's straightforward to change later on.
  3. The online reviews of sbt are mixed.
  4. Ant already does everything we need.

Also the learning curve is a bit too steep for me right now.

Add database libraries support to server

After some research, probably going with this.
http://slick.typesafe.com/

The latest version (3.0) supports asynchronous queries, an abstraction layer that lets you access database contents as if they were Scala containers, and if that becomes a problem for performance (as some have reported online with more complex joins and queries), the ability to fall back to direct SQL queries.

Display captured pieces

Add a simple display for captured pieces to the game client. Currently there is none, so it's sometimes tricky to tell the material balance at a glance.

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.