Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@apache.org Received: (qmail 75350 invoked from network); 27 Feb 2003 00:21:26 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 27 Feb 2003 00:21:26 -0000 Received: (qmail 8469 invoked by uid 97); 27 Feb 2003 00:23:08 -0000 Delivered-To: qmlist-jakarta-archive-commons-dev@nagoya.betaversion.org Received: (qmail 8462 invoked from network); 27 Feb 2003 00:23:07 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 27 Feb 2003 00:23:07 -0000 Received: (qmail 75072 invoked by uid 500); 27 Feb 2003 00:21:22 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 75058 invoked from network); 27 Feb 2003 00:21:22 -0000 Received: from mail005.syd.optusnet.com.au (210.49.20.136) by daedalus.apache.org with SMTP; 27 Feb 2003 00:21:22 -0000 Received: from 192.168.0.14 (c17021.rochd3.qld.optusnet.com.au [211.28.126.134]) by mail005.syd.optusnet.com.au (8.11.6/8.11.6) with ESMTP id h1R0LRI10601 for ; Thu, 27 Feb 2003 11:21:27 +1100 From: Adam Murdoch To: "Jakarta Commons Developers List" Subject: Re: VFS and JNDI Date: Thu, 27 Feb 2003 10:16:12 +0000 User-Agent: KMail/1.5 References: <3E5C23C4.8040501@hanaden.com> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200302271016.12649.adammurdoch@apache.org> X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N On Wed, 26 Feb 2003 03:33 pm, Costin Manolache wrote: > Nicola Ken Barozzi wrote: > >> They are very similar. JNDI is a little more general: a namespace of > >> Objects. VFS is a little more specific: a hierarchy of files. > >> > >> VFS does not try to be as universal as JNDI does, even though there is > >> going to be plenty of overlap (find by name, create, delete, get/set > >> attribute, > >> etc). VFS adds things that don't make sense under JNDI's more general > >> model (get content as a stream, content signing, copy a tree, converting > >> to/from java.io.File, etc), and does things in a way that reflects how > >> files get used (as opposed to how generic namespaces of Objects get > >> used). > > > > And many don't want JNDI just to use VFS, just like we use io.File. > > But I agree that a JNDI wrapper to VFS would be very cool. > > JNDI is bundled with JDK1.3+ and is available to JDK1.1. It is well > documented ( books, etc ), required ( or strongly supported ) in Servlet > environments. I could say it is ubiquous. I can hardly see any reason > why someone would use a different API to use a VFS. For the same reason you'd use a different API for anything: a better fit for the task, and a model that is a better match for the user's mental model. It's argueable whether the current VFS API achieves this over JNDI. It largely comes down to personal preference, I think. I certainly prefer the VFS API to JNDI for file access. But I can understand how others would prefer to use JNDI. And I can picture cases where I'd rather use JNDI too. What I'd like to do is see if we can support both. There's a few approaches we could take. My preferred option is to do the interoperability at the provider level. Something like this: - Move the provider agnostic stuff into a core framework. This would provide services like caching, replication, event handling, federation, and so on. - Sit the framework on top of the providers, using a custom provider API (not the JNDI provider API). - Sit the VFS API on top of the framework. - Sit a JDNI provider adapter on top of the framework. This pretty much reflects the current VFS architecture - the missing piece is the JDNI adapter. The goal is to minimise the layering between the providers and the user API (be that JNDI or VFS), rather than sitting one API on top of the other. I think with a bit of reorganising, we can end up with a reasonably performant VFS for both APIs. I'd be willing to bias performance in favour of JNDI, if that were necessary. -- Adam --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org