Helpful scripts:
bin/run-server
- Starts an in-memory, dev-mode servicebin/load-events
- Loads mock data into the servicebin/top-users
- Query the top usersbin/score-for-user
- Get the score for a given user-id
NOTE: You MUST have the Clojure CLI Tool installed to use these scripts.
The system completely lacks sane error handling. The Async Writer will shut down if it encounters an error. The Http Server doesn't return any error codes, making it difficult for any user of the API.
Any production-grade system would require better error handling.
The Http Server currently just assumes every payload will contain the required data. This is an awful assumption.
The query endpoints weren't very well thought through. In fairness, it's difficult to assess what's appropriate without a real use case.
In theory, the Async Writer could lower its impact on Datomic by batching requests.
There's not a lot to unit test, but at the very least, unit testing
rentpath.scores.http-server/event->facts
would help develop some much needed
validation.