Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#10 | 1035186.patch | 10.3 KB | fgm |
#4 | crodas-MongoFS-7a9a684.tar_.gz | 6.72 KB | gauravkhambhala |
Comments
Comment #1
chx CreditAttribution: chx commentedDid 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.
Comment #2
chx CreditAttribution: chx commentedhttps://jira.mongodb.org/browse/PHP-79 here is the ticket, links crojas' PHP version.
Comment #3
crea CreditAttribution: crea commentedSubscribing
Comment #4
gauravkhambhala CreditAttribution: gauravkhambhala commentedAny 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.
Comment #5
Anonymous (not verified) CreditAttribution: Anonymous commentedJust wanted to see whether there is anything in the works with GridFS for Drupal 8?
Comment #6
fgmFWIW, 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).
Comment #7
fgmSeeing 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.
Comment #8
fgmNo 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.
Comment #9
fgmFWIW, 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/
Comment #10
fgmFist stab at it. PR : https://github.com/fgm/mongodb/pull/76
Comment #11
fgmTracking the underlying PHPLIB issue:
FWIW, MongoDB classified it as Major new feature, P3,
FY24Q4, so apparently not considered for at least one yearEDIT: 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.