-
Notifications
You must be signed in to change notification settings - Fork 24
Dev's Guide: Backend basic concepts
Ashar Fuadi edited this page Aug 10, 2018
·
17 revisions
This section explains the basic knowledge required for understanding Judgels codebase on the backend side.
- Java 8
- Dropwizard for main REST server app
- MySQL for database
- JPA implemented with Hibernate for ORM
- Caffeine for cache
- Dagger for dependency injection
- Immutables for objects immutability
- Guava for collections
Judgels adapts the database design explained here: Phabricator Database Schema. Some highlights:
- Each object in Judgels has a JID (Judgels ID) in the form of JID-XXX-YYYYYYYYYYYYYYYYYYYY, where X is object type code and Y is a shortened UUID.
- No foreign keys, since we want that objects can be migrated between different Judgels app instances.
- Properties that have complex structure are stored either on disk database as JSON strings. For example: grading result details.
Additionally, each object may have the following columns:
- createdBy, createdAt, createdIp: user, time, and IP when this object is created.
- updatedBy, updatedAt, updatedIp: user, time, and IP when this object is updated.
-
Service: where the REST API endpoints are declared. Example:
UserService
.