These services from core.services.yml use SQL (there are more but those are written):

path.crud
lock
router.dumper
router.builder

Also we need to write entity storage backend; base and every entity type plus entity query for it.

We need to port session and watchdog.

Comments

deimos’s picture

Hi there,

I and @bohart were working on Oracle database driver for Drupal 8 (with some success https://drupal.org/comment/8283729#comment-8283729 :)). And now we want to make some contribution in Drupal 8 port of MongoDB project.
Can you tell us what current state of the project is?
What can be done? and maybe what should be done first?

Thanks

chx’s picture

Oh! I am superb glad help appears. So most of what's in the issue summary needs to be written still, there's a start for path.crud but that's hung on #2126421: Decouple \Drupal\Core\Path\AliasManager and \Drupal\Core\Path\Path

Depending on how much time you have for the project, the biggest help without a doubt would be field storage. Most of the logic can be salvaged from D7 just needs to be moved around.

deimos’s picture

Depending on how much time you have for the project, the biggest help without a doubt would be field storage. Most of the logic can be salvaged from D7 just needs to be moved around.

I'd like to work on this (it will be a chance for me to understand what "field/field instance" means and how it works in Drupal 8 :)).
But looks like porting of 'MongoDB field storage' module to Drupal 8 will not be quite "porting" according to Fields are no longer handled individually and are bound to an entity type :)
I am not sure that understand how this "porting" can be done. It will be great to here your advice(s).
Also, maybe some core issues exists which can block working on MongoDB "field storage" for Drupal 8?

Thanks.

fgm’s picture

Issue summary: View changes

Enabling the module currently requires a number of core patched to be included. In a specific order, to avoid conflicts:

Plus a patch in this issue, to complete the list.

fgm’s picture

Here is the patch to apply on top of the core ones.

fgm’s picture

Better version.

fgm’s picture

Watchdog ported. Will add some polish.

fgm’s picture

StatusFileSize
new11.28 KB

Path appears to work : the aliases UI is operational with this patch applied on top of #2209145: Move all path alias SQL queries to a single storage controller patch 21.

chx’s picture

This also seems to patch RouteProvider in some ways; I can't see why state is necessary as $this->state only occurs once. I am not sure I like putting the collection getter in a function especially one that has such a generic name as routing() -- is it worth factoring out when it's used only twice? I see no reason either to break up the return new Route line either -- there's no coding standard for this and also it's a copy-paste almost from the actual constructor function signature and so I like it on one line.

Also, since we are patching could we please kill $this->mongo_collection? Not sure whose idea it was, could've been mine even but it's really horrific, just hardwire the collection name. This comes from the time when we were unsure whether it's ok to hardwire collection name in the d7 times, but now I am sure we can.

fgm’s picture

  • RouteProvider: yes, I had to inject the RouteProvider because otherwise the core RouteProvider broke when dereferencing $this->state in getCandidateOutlines() : it found it to be null.
  • collection getter: not sure indeed. I used it for the url_alias and watchdog and I find makes purposes clearer when reading code, but with only these two references, the gain is indeed minor here. I still prefer it, but not by much in this case
  • wrapping long lines: there is indeed no coding standard for this AFAIK since it's neither a comment nor an array. I wrapped it because I dislike having to scroll horizontally to read code, but no big deal
  • mongo_collection: gladly ! I only renamed it from its previons "mongo_colleciton" name, though, didn't introduce it.

I will do this tomorrow morning if time permits.

fgm’s picture

StatusFileSize
new15.53 KB
new7.23 KB

New version, applies on top of #1987802: Convert path_admin_overview() to a new style controller, then #2209145: Move all path alias SQL queries to a single storage controller.

  • unwrapped the long line
  • removed the mongo_collection unused argument
  • fixed a problem with path loading for the url_alias edit form

Somehow interdiff generates a broken interdiff ?

chx’s picture

> the core RouteProvider broke when dereferencing $this->state in getCandidateOutlines() : it found it to be null.

Sorry, I didn't git pull. This is very new. You are right.

> Somehow interdiff generates a broken interdiff ?

It does...? Seems perfectly readable to me.

chx’s picture

It's a pity we posted the path patches straight into the meta, anyways, the child issues are now where attention is required. The entity storage backend is written and aggregator on top and some tests pass. Also see #2224635: [META] Services injecting @database in core for more issues.

fgm’s picture

Title: [meta] 8.x » [meta] 8.x-1.x
fgm’s picture

Status: Active » Closed (outdated)

No answer in 4 years, and 8.x-1.x has been broken and unsupported since 2014 anyway, so marking outdated.