New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question: back end other than Mongo? #787
Comments
Could you do some Google searching for projects that make interface like Mongo but translate it to another database backend like PostgreSQL or MySQL ? And also find examples how Meteor / Mongo projects have added support for other databases? |
Somebody else did ask about this before, so I added it to roadmap. I have not had time to add all feature requests from original wekan project to roadmap yet. |
From @romu70 on November 16, 2016 10:58 Thanks a lot, so I think you deserve a little explanation ;-) Self hosting is great but raises some issues, even more if you plan to do self-hosting with Docker:
Personally, I don't need specifically a SQL DB, Redis would be great also, and maybe easier for switching from a NoSQL DB, but I don't know well both. Thanks a lot. |
From @pierreozoux on November 17, 2016 10:18 Meteor is using Mongo. Closing this for now. Feel free to reopen once meteor add support to other db. |
There can be some way to use Meteor with other databases, I did see some search results about that, it's not impossible. This is looking for somebody needing other database support to do the research. Reopening issue. |
From @aegrey on December 18, 2016 2:34 Meteor said last year it was a high priority, but with MongoDB's growing popularity I would assume it's become less so. There's a library that does it (numtel:mysql - haven't used it in a while). Hasn't been updated since mid-2016, but his example project is active (https://github.com/numtel/meteor-mysql-leaderboard). For those interested, you could try integration in your fork (I am just delving into Wekan's code, so couldn't say how heavy of a lift it'd be). |
Currently Wekan works like this:
Is there this kind of Database Query converter somewhere?
When Node.js sends MongoDB query, Database Query converter would then use something like search-replace/regex/parsing to convert it to MariaDB syntax, get results from MariaDB and send them in MongoDB format back to Node.js. This Database Query converter would have it's own web interface, where database queries can be translated to different database syntax, storing those at converter's own syntax database. If some syntax was not able to be converted, there would be error listed at error log page of converter's own web interface. This way we could use any database, so if there is already some existing database then it's not required to install MongoDB, just use existing database. That Database Query converter could be also used for auditing, stats, logging, permission management, limiting to only allowed queries, exposing REST API to other software etc. |
It's quite possible. IMO, you need to have the following changes,
If not from scratch, then we could try to use some other libraries available online to avoid repetition.
We can try to find if this is possible or not. |
I do not mean changing anything in Wekan code. I mean replacing MongoDB with, for example, single executeable binary:
|
I'm currently looking at ToroDB: |
Ok I got ToroDB working on docker-compose, so this it Wekan reporting with new LibreOffice 3.5 native PostgreSQL support, using Wekan <=> MongoDB <=> ToroDB => PostgreSQL read-only mirroring. I will create new repo wekan-postgresql for this. You can use any programming language, Office suite or reporting package to get read-write MongoDB data and read-only PostgreSQL data with SQL queries. |
Ok I have now added docker-compose.yml etc code to: |
At ToroDB website was said, that it could be possible to use only ToroDB/PostgreSQL and not write data to MongoDB at all, completely replacing MongoDB, but I did't yet figure out how to do it. |
Does this help with your use case in any way? |
Hi there, A ToroDB developer here! As you may know, ToroDB Stampede is on beta right now, in fact, we are looking for real applications to find (and solve!) possible incompatibilities and we would be glad to help if you find problems. On the other hand, Stampede has been designed to read from a MongoDB. We have another product called ToroDB Server which can be used instead of MongoDB (talking the same protocol), but it is on developer preview version and Meteor is not supported (as ToroDB Server does not support replication yet). \cc @ahachete |
As @gortiz said, ToroDB Stampede (https://www.torodb.com/stampede/) replicates from MongoDB and will provide a read-only, native SQL version of your MongoDB data in real-time. If you want to completely replace MongoDB, you will need to wait a bit for ToroDB Server (https://www.torodb.com/ "ToroDB Technology") to be available (ETA: Q3 2017). We would be happy to help out understand your requirements and how ToroDB may fit in your stack. Please let us know :) |
Some time ago I tried wekan-postgresql and it had errors starting, has something changed in docker-compose file? Is it possible to test Wekan with ToroDB server? |
Not sure if you guys noticed, mysql has had native support for json documents for over a year now also including a REST api built in into the database. IMO picking up support for mysql could be relatively easy + give anyone the luxury of combining things like joins, stored procedures and the whole sql thing including replication with the flexibility of a document store. Oh and performance is really good too. |
Are there Meteor.js projects that use JSON support or REST API in MySQL ? What does "relatively easy" mean in practice? How to convert Meteor.js project to use MySQL ? |
@xet7 , that I won't be able to answer well with respect to Meteor.js - javascript is definitely not my strong point. Nontheless I've been using the mysql xdevapi and the builtin sql functions to manipulate and query json documents since the feature was available with python and php - never looked back. Js has been a first class citizen here with https://devhub.io/repos/mysql-mysql-connector-nodejs appearing right after the feature has been made available. |
I made little research: https://stackoverflow.com/a/20616188/460695 recommends https://github.com/mysqljs/mysql (the link in the post is different but doesn't error out, which has to mean the original was renamed) for complete support (looking at the source code it has a wide array of features, so I can see why it's recommended) in pure Node.js but doesn't have reactive Seems, with those you're most of the time using functions instead of writing MySQL yourself. However, should you have to and need help, I'm available. I'm not awesome at it (or SQLite 3, which is largely similar) but not trash either. |
Database abstraction layer by using functions would make supporting more databases much easier. Is there documentation how to port Meteor.js/MongoDB application like Wekan to it? |
If you have time to try even beginning steps of implementation to see what is actually required, it would be nice. There is no requirements for spending a long time or being awesome at it. |
^ Meant MySQL code that's known to be needed, and is known what it should do. |
Is there any update? |
More about WeKan with FerretDB/PostgreSQL instead of MongoDB:
|
FerretDB High Level Roadmap https://github.com/orgs/FerretDB/projects/2/views/1 |
Hi, FerretDB maintainer there.
Thanks, we added that to our list to investigate. We are already working or plan to start working soon on all things that are needed for Wekan except GridFS. Is it a hard dependency? Do you plan to continue using it? |
Hi, WeKan maintainer here. No, I am trying to move from GridFS to Minio https://github.com/wekan/minio-metadata or other external file storage. There are lots of problems with GridFS. Currently WeKan has migrations from CollectionFS to Meteor-Files that temporarily writes file to disk to WRITABLE_PATH enviroment variable directory that is different on each platform, and back to MongoDB GridFS different structure: https://github.com/wekan/wekan/blob/master/server/migrations.js#L1248-L1404 Then there is Meteor-Files features to move files from GridFS to filesystem and back. I'm trying to add Minio support by adding minio-js package https://github.com/minio/minio-js because Meteor-Files only supports AWS S3, not custom endpoint like Minio veliovgroup/Meteor-Files#862 MongoDB uses a lot of CPU and RAM on Raspberry Pi etc smaller platforms. SQLite would be better, both on Raspberry Pi, https://sandstorm.io etc. |
Currently we are trying to get those attachment and avatar fles migrations working so that those files would stay visible: It would be better to not write all file chunks to disk and back, instead only rename collections. |
We are working on the SQLite backend for FerretDB, by the way. |
Added FerretDB support to WeKan Roadmap |
We changed our plans a bit and are going to support OpLog in a few months before Change Streams. |
That's great! I presume many more Meteor apps use OpLog. Not many use Change Streams. |
2023-07-31 FerretDB and other database support progress
Prisma vs TypeORM
|
I am not an IT administrator or anything. So I had the problem with MongoDB 6. Wekan had worked previously on my laptop, which obviously is newer than the server I then tried to install it. On my laptop it also would run directly in Brazilian Portuguese, by default. I changed the docker-compose.yml file to use MongoDB 4.4 or 4.6 then, on the server. It worked and Wekan run. BUT the language was set to English and it was impossible to set it to any other language. I had two brower tabs open at the same time, one with the local laptop Wekan (at MongoDB 6) and the server Wekan (running on MongoDB 4), and in the laptop I could change between languages, while at the other tab I was stuck to English and when opening the languages dropdown list, it was just impossible to select anything else. |
That is not a database question. That is translations question, see #4518 WeKan uses newest MongoDB 6.x. Currently it is 6.0.9. |
My apologies. As I was running a Wekan on my laptop localhost and on a server where I had to install MongoDB 4.6 (because the server doesn´t run MongoDB 5 and above), and looking at the info from both, it seemed the ONLY difference was the database. I will make some tests from the thread you linked about language, while running on MongoDB 4. Thank you very much xet7! |
I don't know does newest WeKan work with MongoDB 4. It's possible that there are some errors and bugs. |
Thank you. Right now I am running Wekan 6.22 on MongoDB 4.4.24. I am using 6.22 because that is the last version that people said they were able to choose language according to the threads you directed me above, by using a correct root URL config. |
I am using WeKan 7.09 with MongoDB 6.0.9 , and I can change language just fine. |
Well, I followed what people on the other thread were talking. I have no clue and debugging is complicated for me. I could not even select different languages. Clicking over them resutled in nothing when using the last version with MongoDB 4.4. You gave me the tip to check that other thread which was about language, and people suggested using version 6.22 and setting properly the root-url. So I used version 6.22 and I think I set up root-url. You might ask how the hell I don´t know that? Well, ignoramuses like me use ChatGPT to set up the Docker-Compose YML based on what people said on that thread LMAO. ChatGPT said it would use 6.22 and set the root url. "Given the range of issues mentioned in the GitHub threads and the settings in your Docker Compose file, here are some steps you can consider: Version Compatibility: "Language Issue: "Language Issue: |
VMX? Do you mean AVX? There is MongoDB 6.x without AVX here: That could be used as MongoDB image in newest docker-compose.yml from https://github.com/wekan/wekan |
Hmm. I'm thinking, maybe I should just compile newest compatible MongoDB without AVX and use it at all platforms. Because I already have my compiled Node.js version too. Or alternatively, migrate to other database. |
Ok. I need to build the MongoDB no AVX image, however, right? |
To this line: https://github.com/wekan/wekan/blob/master/docker-compose.yml#L94 Change this:
Then in docker-compose.yml change your server IP address, for example like this:
And then start WeKan:
|
No, that is prebuilt MongoDB without AVX. No need to compile. |
OK... I used the available docker-compose and changed the required lines. This already happened before but I had forgotten. Mongo Db keeps restarting. when running the logs ChatGPT suggests the following
Option 2: Specify Entry Point Update your docker-compose.yml as follows:
I am aware that ChatGPT can be quite dumb if you are not surewhat you are asking... so if you can give your input in whats happening... thanks a lot for your patience. |
I will try both options above, but I am not very optimistic. Will probably end up returning to Mongo 4.4 |
Language settings has nothing to do if you are running Mongo 4.4, Mongo 5 or Mongo 6. |
Yes, I think Xet7 already established that before. As I said in a post above
The problem is that language selection only works with Mongo 4.4 on WeKan 6.22. And the reason I need to use an old version of WeKan is because I need Mongo 4.4 because the newer Mongo versions have AVX. So while language is not directly related to database, the problem with the language selection has as a root cause the database Mongo 5 and above requiring AVX processors. |
From @romu70 on November 16, 2016 10:11
Hi,
Is there any simple way to setup WeKan with another back end than Mongo? Is this on the roadmap?
Thanks.
Copied from original issue: wefork#9
The text was updated successfully, but these errors were encountered: