requarks / wiki

Wiki.js | A modern and powerful wiki app built on Node.js
https://js.wiki
GNU Affero General Public License v3.0
24.25k stars 2.68k forks source link

Usage without MongoDB (e.g. NeDB alternative) #263

Closed ellogwen closed 6 years ago

ellogwen commented 6 years ago

Will there some time be an alternative for mongo ?(it's the only thing holding me back for using wikijs). Since mongo is only used for user management and settings, NeDB is quite compatible with mongo and for small setups the performance would be enough?

NGPixel commented 6 years ago

Thanks for the suggestion but MongoDB will be deprecated in the upcoming 2.0 release, in favor of PostgreSQL.

An in-memory JS database was considered in the past (Loki.js) but was turned down because of scalability issues and to keep RAM usage down as much as possible.

ellogwen commented 6 years ago

Oh, good to hear that you drop mongo. Do you require a separate server for postgres as well or will there be an embedded option?

NGPixel commented 6 years ago

It can be on the same server.

ellogwen commented 6 years ago

No, i mean can you use postgres with an embedded database file (like sqllite, NeDB, etc...) or do you still have to install and manage a separate database server (postgres in this case, or mongo in the other case). For small installations it would be "overkill" to setup and manage a whole (in some cases new) database server just to manage some user restrictions for a wiki service. I get it that for larger cases this is fine, but for small use cases (like intranet) an embedded user management system would be much more appealing

NGPixel commented 6 years ago

Wiki.js makes use of many features unique to PostgreSQL not present in SQLite or NeDB... such as JSONB type and search.

Also, SQLite requires binary dependencies in the project, which is a big no for this project. NeDB is using a mongo like interface, which is simply not compatible with Sequelize.

NGPixel commented 6 years ago

As a note, you'll be able to use a ready-made Docker image which will contain Wiki.js, PostgreSQL and Redis already installed and setup.