I recently benchmarked a new app with tons of data using MongoDB, it was really fast and I decided to use it, with this module I was able to do so, except saving large data (> 4MB) where GridFS could be used to solve this issue. Are you interested in this feature to include it in this project?

I'll try to provide a patch for it when I'm done.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

chx’s picture

Component: Field storage » Miscellaneous

Did anything materialize? crojas promised a gridfs stream wrapper in C for the PHP driver for quite some time now I am waiting on that before writing stuff.

chx’s picture

https://jira.mongodb.org/browse/PHP-79 here is the ticket, links crojas' PHP version.

crea’s picture

Subscribing

gauravkhambhala’s picture

Any updates on GridFS support of this module?

I have downloaded and tested https://jira.mongodb.org/browse/PHP-79 With two modification the tests showing ok results.

It actually connects and stores file in MongoDB GridFS collection.

Would be happy if CHX can guide us on how to convert PHP streamwrapper to D7 stream wrapper.

I am uploading the working version for me locally.

Anonymous’s picture

Issue summary: View changes

Just wanted to see whether there is anything in the works with GridFS for Drupal 8?

fgm’s picture

FWIW, I think we could not use this code as such even if we wished to, as it is not provided under GPL-2.0+but under the old BSD 4-clause license (not an OSI-approved license).

fgm’s picture

Version: 7.x-1.x-dev » 8.x-1.x-dev
Status: Active » Needs work

Seeing how things evolved, with Drupal 8 being relased, GridFS support in MongoDB 3.2 with the new PHP driver based on the MongoDB (vs Mongo) PHP extension, I think any GridFS module will need to be rethought, and needs to be planned on the future D8 version, not D7. So bumping version.

fgm’s picture

Version: 8.x-1.x-dev » 8.x-2.x-dev

No answer in 3 years, and 8.x-1.x has been broken since 2014 anyway, so bumping as a feature for a future version of 8.x-2.x.

fgm’s picture

Issue tags: +ddd2023

FWIW, we discussed this with @Daffie today, and I just noticed this PHP stream wrapper for GridFS from alcaeus (the guy thanks to whom we can support MongoDB for D7 on the new mongodb extension), which looks like it could be an interesting base.

https://github.com/alcaeus/mongodb-gridfs-wrapper

It comes with a caveat, though: on packagist.org, this package is marked as abandoned, and it never had a change in 8 years.

Alternatively, in the newer PHP Library, it appears the Bucket class is now providing a php stream wrapper as standard, so maybe this won't be needed. See https://www.mongodb.com/docs/php-library/current/tutorial/gridfs/

fgm’s picture

FileSize
10.3 KB
fgm’s picture

Tracking the underlying PHPLIB issue:

FWIW, MongoDB classified it as Major new feature, P3, FY24Q4, so apparently not considered for at least one year EDIT: on MongoDB Jira, Andreas Braun clarified that what it appears to mean at all, but designates the fiscal year that finishes in 01/2024 (not 12/2024 as one could imagine).

Also, he gave lots of information on the PHPLIB-1206 ticket above: just follow the discussion there for more details.