Thanks for this, you really put some good research into this and that’s really awesome
Could the object path mapping go to a cache instead of a entity?
The main issue there are the two queries inside the ObjectPathMappingRepository
, findOneByObjectTypeUriPatternAndPathSegment
and findOneByObjectTypeUriPatternAndIdentifier
. Those would need to implemented through simple key-value lookups in order to be able to use e.g. the Cache framework for persistence.
Perhaps introduce a Database cache backend
There is already the PdoBackend
Cache Backend, but that still only provides the normal Cache Backend interface of a key-value store.
Current state of affairs
Basically, the whole Persistence layer is already supposed to be pluggable with different implementations, and the original “generic” persistence implementation is still lying around, but pretty much unmaintained. So there is already some core principle to detach Flow from the massive Doctrine dependency in place. That of course would still leave you with the Persistence-Layer dependency.
So what I would see as a next step towards that goal of getting around the hard Doctrine dependency, would be to make the Doctrine implementation of the Persistence layer an own package, which could then be stripped from a custom (light) Distribution.
If the dependency to any Database is an issue, a Generic Persistence Layer backend could maybe be provided that works without a Database. BUT: That would mean we again have the huge effort to maintain a custom ORM layer and an underlying backend implementation.
Otherwise I guess the choice will always be: Want Security and/or ResourceManagent? Then you need the Persistence Layer (with a Database).