[OpenAFS-devel] Java JNI access to Venus, Vlserver and Volserver ??

Jeffrey Hutzelman jhutz@cmu.edu
Wed, 5 Dec 2001 11:14:50 -0500 (EST)


On Tue, 4 Dec 2001, Jim Doyle wrote:

> Has anyone done anything w.r.t. writing Java JNI accessors to
> native AFS APIs ?
> 
> Is it even possible to do this, given the fact that LWPs and
> Java Threads (pthreads) in the same address space may conflict ?

Sure, it's theoretically possible -- just use the same pthread-aware
tools that are used in building the fileserver.  Not all of these are
available in library form, but most of what you need should be:

- com_err, rx, rxkad, des, and fsint are in libafsrpc
- syscalls, auth, kauth, pts, and ubik are in libafsauthent
- for volserver, vlserver, and bosserver interfaces, you're more or less
  on your own, though I suspect a patch to add a library with these
  interfaces would be readily accepted.

Also interesting are libafsadminutil and libXXXadmin; these provide a
fairly complete set of pthreads-aware administrative API's, but they're
not the same as the normal AFS RPC interfaces. 

Of course, the cache manager interface is via system calls, and lpioctl() 
is safe to call from any threading environment. 

-- Jeff