johnding1996 / HKUST-COMP3111H-Group

Group Project of COMP 3111H in Fall 2017 at HKUST
Apache License 2.0
0 stars 0 forks source link

Build the database skeleton package #19

Closed johnding1996 closed 6 years ago

johnding1996 commented 6 years ago
johnding1996 commented 6 years ago

Several notes on the database package design.

  1. We implement connection pools for both Keepers and Queriers. This allow concurrency on the user-interaction level and can better cooperate the event-triggering model of controller.
  2. In principle, all non-volatile memories of the chatbox should be stored in the database, whether SQL or Redis cache. But it is allowed, for milestone 2, to use some "global" lists or maps to store those information. It is the duty of the corresponding people in charge to consult database team to connect the interfaces and change the storage location from memory to database.
  3. The database APIs is changed a lot, in principle, we prefer "flat" JSONObject and "isotropic" JSONArray, and we allow the JSONObject to be a subset of recognizable fields but a superset of not-nullable fields. We preserve the datatype of values during the I/O process of database, so feel free to use int, double, boolean type when constructing corresponding JSONObjects.
  4. The detail structure and design of API interfaces and tables will go through a reviewing process, in separated issues. So people in corresponding modules who will use this please reach me as soon as possible.
  5. I will update the github wiki as a tutorial, and host the javadoc of database package as an ultimate reference for you to use it.
  6. I will open up a reviewing issue for you to point out the possible changes urgently needed before milestone. And I will revise the code according to these and publish version 1.2 at least one day before releasing.
johnding1996 commented 6 years ago

Close since finished.