But also adapting the API’s in a way that is also fast, is harder.” Robin concludes that “adapting the API’s was easy. It was solved upstream, however, in sabre/dav by making it possible for sabre/dav to notify that it wants the metadata of the folder. ownCloud can request all metadata in a folder at once, but sabre/dav did not support this. This was “related to the way sabre/dav reads the properties of the file system.” Elaborating, he explains that “internally, sabre/dav just iterates over all the files in a folder,” requesting the meta data for each file separately, “which was fairly slow, as you can imagine.” For each call, ownCloud had to go back into its database or even request the information from external storage. The only difficulty with sabre/dav was with performance. For example, for the tags we wrote a plugin that would add an additional attribute without having to change the main code.” Robin agrees, stating that “sabre/dav is built from the ground up to be modular, to allow users of the library to extent on top of it.” Vincent also points out that “it has a plugin system. “The basic implementation is fairly small,” he says, “because it is just an adoption between one API, from sabre/dav, to another– ours.” sabre/dav is “meant to do your own thing on top of WebDAV,” he adds. Porting our old code was fairly easy according to Robin. For the synchronization by the desktop client, there is additional information required to properly sync, such as the FileID and information like sharing state or write permissions so that the client can show the proper overlay icons in the file manager, restrict edits to files and so on. This flexibility in WebDAV, exposed through sabre/dav’s plugin system, is important. “For example, we have our own properties we communicate via the protocol like the file ID, the permissions, if a user can read a file, or if the file is shared.” With the new version of ownCloud 8, tags are handled over the WebDAV protocol as well. With the old implementation, Robin notes that “we were forced to make changes to the library to let it call our own functions instead of its internal.”Īnother benefit of sabre/dav is that with it, as Thomas points out, “we have the possibility to easily extend the protocol to our own needs ” one of the great advantages of WebDAV. But ownCloud “has its own file system layer which allows us to mount the external storage, do sharing and all kinds of things.” sabre/dav, however, allows better integration. This means ownCloud had no control over where the files were stored or how they were named. Sabre/dav was introduced into ownCloud 3, but WebDAV has been supported since “the beginning” explains Robin, but “that was with a different library.” It was what he called “a complete implementation ” implementing both protocol and the logic behind it, on top of the normal file system of a server. These are used in sabre/dav itself, as well as useful stand-alone tools. The decision about what data to grab or the folder to present, however, is a decision made by the ownCloud code.įruux offers some more technologies in the sabre/ family including sabre/vobject, sabre/http, sabre/xml and other libraries. We don’t have to care too much about how WebDAV works.” Robin adds that “it does the implementation before the call itself not the logic but just the WebDAV protocol.” Actions like downloading a file or receiving the contents of a folder are handled by sabre/dav using the WebDAV protocol. “If something requests a file, we just send a file. Vincent explains that “if you want to support WebDAV you’d have to write a lot of code yourself, like parsing XML knowing what answers to send.” But sabre/dav can do the heavy lifting. WebDAV, a http-based protocol built to deal with remote ‘resources and collections’ including files, appointments and contacts, offers all basic operations for handling data over the web. In a conversation with the core team working on the file management side of ownCloud, Thomas Müller, Robin Appelman and Vincent Petry, we explored sabre/dav and its value for a project like ownCloud.įrameworks like sabre/dav aid in building functionality. ownCloud builds on sabre/dav for its WebDAV, CalDAV and CardDAV support and is looking into even deeper integration. It is open source and developed by fruux, a German company developing a unified contacts/calendaring system that works across platforms and devices. Sabre/dav (or SabreDAV) is the most popular WebDAV/CardDAV/CalDAV framework for PHP.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |