moreal / archiver

An application to collect chats and archive, from multiple platforms.
GNU General Public License v3.0
0 stars 0 forks source link

Determine Model Schema #1

Open moreal opened 4 years ago

moreal commented 4 years ago

This project uses couchbase as database. Though it's schemaless, I realized anyway it needs to determine schema of the data. It should be completed before 2020-01-21 24:00 KST.

moreal commented 4 years ago

Sadly, it's over the milestone. I'll do this task afternoon today.

moreal commented 4 years ago

I want to struct it like below.

messages : {
  guilds : {
    "<guild_id>": {
      channels: {
        "<channel_id": [ { Message }, ... ]
      }
    }
  }
}

But I am not sure it has performance issue to have many subdocuments. If it is, it will use messages_<guild_id>_<channel_id> as the key of the message list and save channels' metadata will be saved in each document.