hailiang-wang / nuwa

a dianping service platform for micro-plastic surgery.
0 stars 0 forks source link

Migrate persistence modules from wildfire into nuwa #5

Open hailiang-wang opened 9 years ago

hailiang-wang commented 9 years ago

Description

The default module to manage mongodb connection of nodeclub is not good enough. The piece of code in nodeclub is too ugly, should migrate wildfire/server/database.js into this new project.

Take a deep reading of the pervious code carefully, wildfire/server/database.js, persistence/multipromise.js.

Solution

hailiang-wang commented 9 years ago

@lymanlai 不必直接复制,因为wildfire/persistence/database.js 写的很负责,nuwa 目前只需要用其中的monogoose connection export and management parts.

lymanlai commented 9 years ago

@Samurais “很负责” 估计是 “很复杂”?

hailiang-wang commented 9 years ago

@lymanlai Well, just read the damn codes. Maybe you can leave this issue and try to close others. We will migrate this module later. Why this task is bit complicated ? (1) wildfire/persistence/database.js supports CRUD hooks and publish Event. (2) wildfire/persistence/database.js handles reconnecting. (3) wildfire/persistence/database.js will further import testing data.