-
Notifications
You must be signed in to change notification settings - Fork 3
Home
rolevax edited this page Mar 12, 2017
·
1 revision
- Go: network related logics
- C++: wrap the
libsaki
library
C++ is wrapped by SWIG.
See the database schema page for details.
There are some sub-packages in the main bitbucket.org/rolevax/sakilogy-server
package
-
srv
server logics -
saki
wrappedlibsaki
library
Long-live objects:
-
sing
singletons -
sing.UssnMgr
user session (connection) manager -
sing.TssnMgr
table session manager -
sing.BookMgr
book manager -
sing.Dao
DB access object -
sing.Rao
Redis access object
Most long-live objects have Loop()
methods.
Loop()
selects from incoming channels.
Methods named as handleXxx
runs in same goroutine as Loop()
,
and exported methods should run in different goroutines.
Ad-hoc objects:
-
ussn
: user session -
tssn
: table session
Most ad-hoc objects have a loopXxx
or xxx.Loop()
function/method.
Ad-hoc objects should always be allocated inside the loopXxx()
.
The naming convention (handleXxx()
vs Exported()
) is same as long-live objects.
- BookType: 0, 1, 2, 3 for 应援、替补、正选、ACE respectively.
- Number "2" of "choose one girl out of two" is hard coded everywhere. search around and refactor when it is needs to be changed to 3.