[TYPO3-dev] Change driver of a FAL file

Philipp Gampe philipp.gampe at typo3.org
Wed Oct 29 19:01:56 CET 2014


Hi Christian,

Christian Opitz wrote:

> I think, a method addFileFromUrl(...) in an interface extending the
> DriverInterface would be enough: The target storage could then check if
> the source storage is remote and publicly available. If yes, it would
> simply tell the target driver to import the file(s) from their public
> URLs. If not, local copies would be required anyway

IMHO you are thinking too generic and too specific at the same time. In most 
cases drivers are written explicitly for a project.
Therefore the author know what drivers exists and what is the best way to 
copy between the storages.
Thus both drivers definitely should know about each other to hand over the 
all required data for a copy operation (which might be done be a dedicated 
service).
Your idea is a nice default implementation, but image two storages with fast 
interconnects and a much slower webserver running the TYPO3 instance with 
the copy operation. If you want to transfer a large file (e.g. a video) it 
would be senseless to first download it to the webserver, just to upload it 
again to the other remote storage. It would be much better to copy it 
directly. But in order to do this, the receiving storage needs to know which 
storage is the originating storage without parsing some potentially public 
URL. Also the public URL might not be the fastest way to access the file 
internally.

In general, we should use queues for central FAL operations and be default 
run them instantly, but allowing to replace the queue implementation for 
bigger sites. That way, we could delay expensive operation and either run 
them via AJAX or via dedicated services in the background.
This needs more thoughts, because we would need a placeholder implementation 
for each operation, such that the editor gets feedback about pending actions 
and the current and future state.
This is AFAIK partially implemented for indexing but I did not take a closer 
look yet. 

It would be cool to create a concept to make FAL work nicely with remote 
storage and to make implementing drivers easy, yet allowing to create 
powerful functionality that scales well.

I could organize a room up to 10 people in Bonn if some devs would be 
willing to meet in person. However there is no budget for travel and hotels.

Best regards
-- 
Philipp Gampe – PGP-Key 0AD96065 – TYPO3 UG Bonn/Köln
Documentation – Active contributor TYPO3 CMS
TYPO3 .... inspiring people to share!




More information about the TYPO3-dev mailing list