You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Hanasaki JiJi <ha...@hanaden.com> on 2003/02/26 03:17:40 UTC

VFS and JNDI

Any comparisons on VFS vs JNDI?  seems very similar to me.
-- 
=================================================================
= Management is doing things right; leadership is doing the     =
=       right things.    - Peter Drucker                        =
=_______________________________________________________________=
=     http://www.sun.com/service/sunps/jdc/javacenter.pdf       =
=  www.sun.com | www.javasoft.com | http://wwws.sun.com/sunone  =
=================================================================


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: VFS and JNDI

Posted by Costin Manolache <cm...@yahoo.com>.
Henri Yandell wrote:

> 
> 
> On Wed, 26 Feb 2003, Costin Manolache wrote:
> 
>> James Strachan wrote:
>>
>> > From: "Costin Manolache" <cm...@yahoo.com>
>> >
>> > It'd me nice to move the Tomcat JNDI implementation into Commons so it
>> > can be a general purpose JNDI implementation for those that want/need
>> > one.
>>
>> +1 - if someone has the time :-)
>>
>> It is pretty well separated - but there are few things that are specific
>> to tomcat ( caching is specific to resources, etc). I started a small
>> refactoring - with the goal of making it completely separate in
>> jakarta-tomcat-connectrs/naming. A second goal was to make it much easier
>> to write plugins. It is pretty low on the priority list for me - but if
>> other people are interested I can make some time to help.
> 
> I'm happy to work/help on this. I've another little crappy jndi project
> and James has hassled me about doing the right thing and refactoring
> tomcat-jndi before.

The nice thing about JNDI is that the API and the provider API are as stable
as it can get, and it proved to allow very low coupling. 

In other words - there is no need for an "all or nothing" or dependencies, 
it can be done step by step. 

I already started a refactoring in j-t-c ( I'll commit today the latest
changes ), my main focus was on having some base classes that make it much
easier to implement drivers. I choose Name over String because I feel it can
be made more efficient and may support recycling and MessageBytes-based
implementation. I think it would be nice to have another set of base
classes based on Strings - duplication is good :-)

One big issue is refactoring the cache - right now it is very specific to
the tomcat use-case, and to the filesystem provider ( casts, etc ). 


Costin





  




---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: VFS and JNDI

Posted by James Strachan <ja...@yahoo.co.uk>.
From: "Henri Yandell" <ba...@generationjava.com>
> On Wed, 26 Feb 2003, Costin Manolache wrote:
>
> > James Strachan wrote:
> >
> > > From: "Costin Manolache" <cm...@yahoo.com>
> > >
> > > It'd me nice to move the Tomcat JNDI implementation into Commons so it
can
> > > be a general purpose JNDI implementation for those that want/need one.
> >
> > +1 - if someone has the time :-)
> >
> > It is pretty well separated - but there are few things that are specific
to
> > tomcat ( caching is specific to resources, etc). I started a small
> > refactoring - with the goal of making it completely separate in
> > jakarta-tomcat-connectrs/naming. A second goal was to make it much
easier
> > to write plugins. It is pretty low on the priority list for me - but if
> > other people are interested I can make some time to help.
>
> I'm happy to work/help on this. I've another little crappy jndi project
> and James has hassled me about doing the right thing and refactoring
> tomcat-jndi before.

I'm happy to help too - and I publicaly appologise for hassling Henri :)


James
-------
http://radio.weblogs.com/0112098/

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: VFS and JNDI

Posted by Henri Yandell <ba...@generationjava.com>.

On Wed, 26 Feb 2003, Costin Manolache wrote:

> James Strachan wrote:
>
> > From: "Costin Manolache" <cm...@yahoo.com>
> >
> > It'd me nice to move the Tomcat JNDI implementation into Commons so it can
> > be a general purpose JNDI implementation for those that want/need one.
>
> +1 - if someone has the time :-)
>
> It is pretty well separated - but there are few things that are specific to
> tomcat ( caching is specific to resources, etc). I started a small
> refactoring - with the goal of making it completely separate in
> jakarta-tomcat-connectrs/naming. A second goal was to make it much easier
> to write plugins. It is pretty low on the priority list for me - but if
> other people are interested I can make some time to help.

I'm happy to work/help on this. I've another little crappy jndi project
and James has hassled me about doing the right thing and refactoring
tomcat-jndi before.

Hen


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: VFS and JNDI

Posted by Costin Manolache <cm...@yahoo.com>.
James Strachan wrote:

> From: "Costin Manolache" <cm...@yahoo.com>
>> Hanasaki JiJi wrote:
>>
>> > Thinking out loud here....  What do you think?
>> > 1. turn the VFS providers into JNDI SPI
>> > 2. implement VFS via JNDI or the JNDI SPI's directly
>>
>> +1
>>
>> Tomcat abstracts the file system using JNDI - it may be worth taking
>> a look.
> 
> It'd me nice to move the Tomcat JNDI implementation into Commons so it can
> be a general purpose JNDI implementation for those that want/need one.

+1 - if someone has the time :-)

It is pretty well separated - but there are few things that are specific to
tomcat ( caching is specific to resources, etc). I started a small
refactoring - with the goal of making it completely separate in
jakarta-tomcat-connectrs/naming. A second goal was to make it much easier
to write plugins. It is pretty low on the priority list for me - but if
other people are interested I can make some time to help. 

Costin



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: VFS and JNDI

Posted by Costin Manolache <cm...@yahoo.com>.
Nicola Ken Barozzi wrote:

> Why not make Tomcat a TLP and make this a subproject?
> <hint><hint><nudge><nudge>

I think we are quite happy in jakarta :-)

The place for any component/library that is general purpose is (IMHO) 
in jakarta-commons. However, since there is some hope that
jakarta walls will go gradually down - I think keeping the code
in tomcat or moving it will be the same thing :-)

Costin







---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: VFS and JNDI

Posted by Nicola Ken Barozzi <ni...@apache.org>.

James Strachan wrote, On 26/02/2003 9.05:
> From: "Costin Manolache" <cm...@yahoo.com>
> 
>>Hanasaki JiJi wrote:
>>
>>
>>>Thinking out loud here....  What do you think?
>>>1. turn the VFS providers into JNDI SPI
>>>2. implement VFS via JNDI or the JNDI SPI's directly
>>
>>+1
>>
>>Tomcat abstracts the file system using JNDI - it may be worth taking
>>a look.
> 
> 
> It'd me nice to move the Tomcat JNDI implementation into Commons so it can
> be a general purpose JNDI implementation for those that want/need one.

+0

There are projects that are interested, but it can equally remain in 
Tomcat if it is avaliable as an indipendent jar.

Why not make Tomcat a TLP and make this a subproject? 
<hint><hint><nudge><nudge>

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: VFS and JNDI

Posted by James Strachan <ja...@yahoo.co.uk>.
From: "Costin Manolache" <cm...@yahoo.com>
> Hanasaki JiJi wrote:
>
> > Thinking out loud here....  What do you think?
> > 1. turn the VFS providers into JNDI SPI
> > 2. implement VFS via JNDI or the JNDI SPI's directly
>
> +1
>
> Tomcat abstracts the file system using JNDI - it may be worth taking
> a look.

It'd me nice to move the Tomcat JNDI implementation into Commons so it can
be a general purpose JNDI implementation for those that want/need one.

James
-------
http://radio.weblogs.com/0112098/

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: VFS and JNDI

Posted by Costin Manolache <cm...@yahoo.com>.
Hanasaki JiJi wrote:

> Thinking out loud here....  What do you think?
> 1. turn the VFS providers into JNDI SPI
> 2. implement VFS via JNDI or the JNDI SPI's directly

+1

Tomcat abstracts the file system using JNDI - it may be worth taking 
a look. That means any JNDI based VFS would be easy to plug into tomcat,
and you can get some pretty well tested and optimized modules for .war and
file system.

You may also take a look at the caching and other optimizations that Remy
put into the jndi layer. 

One of the big benefits of using JNDI as the API for the VFS is the
stability of the API, and the huge number of people who are already 
familiar with it. 

A disadvantage is the greater complexity - even if you don't have to
implement all JNDI methods, there is a bit more work. However Name and
few other things allow some very interesting optimizations that are just
imposible otherwise.

If VFS switches to JNDI - it may be worth merging some of the code from
tomcat. 

Costin
 


> 
> Adam Murdoch wrote:
>> On Wed, 26 Feb 2003 02:17 am, Hanasaki JiJi wrote:
>> 
>>>Any comparisons on VFS vs JNDI?  seems very similar to me.
>> 
>> 
>> 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).
>> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: VFS and JNDI

Posted by Hanasaki JiJi <ha...@hanaden.com>.
Thinking out loud here....  What do you think?
1. turn the VFS providers into JNDI SPI
2. implement VFS via JNDI or the JNDI SPI's directly

Adam Murdoch wrote:
> On Wed, 26 Feb 2003 02:17 am, Hanasaki JiJi wrote:
> 
>>Any comparisons on VFS vs JNDI?  seems very similar to me.
> 
> 
> 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).
> 

-- 
=================================================================
= Management is doing things right; leadership is doing the     =
=       right things.    - Peter Drucker                        =
=_______________________________________________________________=
=     http://www.sun.com/service/sunps/jdc/javacenter.pdf       =
=  www.sun.com | www.javasoft.com | http://wwws.sun.com/sunone  =
=================================================================


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: VFS and JNDI

Posted by Henri Yandell <ba...@generationjava.com>.

On Thu, 27 Feb 2003, Costin Manolache wrote:

> - A JNDI wrapper for VFS providers will allow people to write providers
> using a simpler API ( and have them exposed as JNDI via the VFS->JNDI
> wrapper ).

+1. I looked into using VFS underneath my JNDI provider but ended up
skipping it as I couldn't see if I could ask if an element in the FS was a
container [ie directory] and because VFS didn't seem to support the
classpath.

> I think we do need a separate component to:
> - simplify creation of generic JNDI drivers ( like config file abstraction,
> etc).
> - implement JNDI drivers for common config files
> - eventually map to and from jdk1.4 prefs
> - provide high-level JNDI tools - replication, deep copy, ant tasks, etc.
> Those will operate on both VFS and any other kind of JDNI ( config, etc ).

All sounds good.

Hen


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: VFS and JNDI

Posted by Costin Manolache <cm...@yahoo.com>.
James Strachan wrote:

>> 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.
> 
> This sounds good. Just a thought about another idea; what if VFS also
> provided an optional JNDI-extension interface. i.e. provide an API on top
> of JNDI's Context / DirContext so that the VFS-like API can be used or the
> underlying JNDI API all from the same objects. Or to put that another way,
> would implementing Context & DirContext & Name as part of the VFS API be a
> good thing?


I think we are all talking about the same thing - from different angles.

Both wrappers are needed:
- a VFS wrapper on top of a JNDI provider ( like tomcat's, or Sun minimal
file provider ) would allow people who want to use the VFS-oriented API,
and may absorb differences in attribute namming and support some
conventions for random access. 

- a JNDI wrapper on top of VFS allow people who are familiar with the JNDI
API to use it, and allows JNDI tools ( browsers, ant tasks, etc ) to
manipulate the VFS.

- A JNDI wrapper for VFS providers will allow people to write providers
using a simpler API ( and have them exposed as JNDI via the VFS->JNDI
wrapper ). 
- In the same sense, one or several base classes and utils to simplify 
the creation of JNDI providers are usefull. All JNDI providers would be
useable as VFS - just like all VFS providers could be used as JNDI.

I think the main point is to make it as easy as possible to create JNDI
drivers - and to be able to use drivers from any source. It 
doesn't matter how JDNI driver is implemented, as long as it follows the
spec. 

What's important is to treat VFS as:
- a collection of drivers that can be used by JNDI application
- a set of tools to simplify the creation of JNDI drivers for VFS-like
systems
- a set of APIs to porvide a VFS-centric view of JNDI or VFS drivers.

I think we do need a separate component to:
- simplify creation of generic JNDI drivers ( like config file abstraction,
etc).
- implement JNDI drivers for common config files
- eventually map to and from jdk1.4 prefs
- provide high-level JNDI tools - replication, deep copy, ant tasks, etc.
Those will operate on both VFS and any other kind of JDNI ( config, etc ).

Remy - are you still on this list :-) ?

Costin





---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: VFS and JNDI

Posted by James Strachan <ja...@yahoo.co.uk>.
From: "Adam Murdoch" <ad...@apache.org>
> 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.

This sounds good. Just a thought about another idea; what if VFS also
provided an optional JNDI-extension interface. i.e. provide an API on top of
JNDI's Context / DirContext so that the VFS-like API can be used or the
underlying JNDI API all from the same objects. Or to put that another way,
would implementing Context & DirContext & Name as part of the VFS API be a
good thing?

James
-------
http://radio.weblogs.com/0112098/

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: VFS and JNDI

Posted by Costin Manolache <cm...@yahoo.com>.
Adam Murdoch wrote:

>> 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.

For "user mental model" - learning a new  model is usually more painful than
applying a model you know. And most people are used with JNDI and with the 
"content + attributes". 

It is possible to add a wrapper on top of JNDI to provide (or emulate) a
different API if you want. There is one particular case that is not very
well covered by JNDI - random access to a file. That's where some special
extensions or API would be needed. 


> 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.

That is basically wasting the benefits of JNDI... 
- A well-defined standard for implementing providers. 
- ability to do caching/replication in a generic way, not specific to VFS
( a JNDI cache can be used for caching LDAP auth  results for example ).
- built-in event handling, federation, etc.

JNDI is an API - i.e. it provides all those things. 


> 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.

The architecture of VFS seems close enough to JNDI - so why not use 
JNDI as the API ? 

Something like:
- refactor VFS providers to become JNDI providers
- create a VFS wrapper on top of JNDI - for backward compat and for people
who preffer to use VFS API
- all generic tools will be implemented using JNDI - this way they'll
be usefull in general JNDI, not only for VFS ( like deep copy of a JNDI
tree, replication, caching ). All this can be abolutely standalone
components ( if possible with ant wrappers :-)
- move the fs and cache from tomcat and merge. 

The only "framework" that is needed is a set of base classes and utils
to simplify the implementation of JNDI drivers. ( i.e. utils ).

Costin










---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: VFS and JNDI

Posted by Adam Murdoch <ad...@apache.org>.
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


Re: VFS and JNDI

Posted by Costin Manolache <cm...@yahoo.com>.
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. 

The only reason to chose a different API if you _implement_ a VFS is the
extra complexity ( JNDI does a pretty good job at keeping simple things
simple for _user_ ). However in the long run, the many small details that
JNDI covers and VFS doesn't might matter - I'm talking about security, the
very tricky isolation on class loaders ( java:comp ), federation,
optimizations ( caching, avoiding GC, etc ).


Costin



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: VFS and JNDI

Posted by Nicola Ken Barozzi <ni...@apache.org>.

Adam Murdoch wrote, On 26/02/2003 14.27:
> On Wed, 26 Feb 2003 02:17 am, Hanasaki JiJi wrote:
> 
>>Any comparisons on VFS vs JNDI?  seems very similar to me.
> 
> 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.

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: VFS and JNDI

Posted by Costin Manolache <cm...@yahoo.com>.
Adam Murdoch wrote:

> On Wed, 26 Feb 2003 02:17 am, Hanasaki JiJi wrote:
>> Any comparisons on VFS vs JNDI?  seems very similar to me.
> 
> They are very similar.  JNDI is a little more general: a namespace of
> Objects. VFS is a little more specific: a hierarchy of files.

The namespace of Objects is just 1/2 of JNDI ( the Context ).
The other half is objects with attributes (DirContext)- that maps very well
with files. As I mentioned in my previous post - there are few JNDI-based
VFS impl. already ( from the sample filesystem JNDI provider to the 
more featured and optimized one in tomcat )


> 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).

Get content as stream is certainly part of JNDI. There is also a pretty 
sophisticated system for conversion. The higher level utils should be
separated ( copy a tree, or more special operations on the content ). 

JNDI also have a reasonably good policy-based security, federation ( nice if
you work with multiple domains with different naming conventions ).

The real issue is stable, well known API - versus some extra complexity due
to the fact that it's more generic and optimizable. Of course, stability
has 2 sides - it's good because its frozen, well known
and tested - but bad because you can't change it.

Costin

  



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: VFS and JNDI

Posted by Adam Murdoch <ad...@apache.org>.
On Wed, 26 Feb 2003 02:17 am, Hanasaki JiJi wrote:
> Any comparisons on VFS vs JNDI?  seems very similar to me.

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).

-- 
Adam

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org