Am I sure about what?
Why would you want to implement a resource manager in Java? Because there’s
lots of great APIs already available in Java. If I wanted to write a
resource manager that mapped a base URL to a directory, this would be
relatively easy using Java’s URL support (faking directories would be hard,
or impossible, but such a resource manager could be useful in some
situations, even without directory support). This is because Java does a
lot of work already to handle the URL glop - it’s unbelievably simple. As
it is with Python, and Perl as well. In C, well, I don’t know. I’m sure
there are some nice libraries to do HTTP access, but I’m already bought into
the KISS world of OO/Scripting languages, that I try to limit the amount of
C programming that I do these days. If accessing a URL in C means calling
more than 10 functions from some library, setting up a bunch of structures,
yadda/yadda/yadda, then I start pining to do it in Java/Python/Perl.
Then there is just the plain old “cool” factor
However, having said this, I run into a lot of people who actually >do< want
to do this, but it’s because they’ve bought into the Java/OO story too much.
It’s great for a lot of things. But sometimes, it’s just easier to revert
to C. In this particular case (resource managers), I suspect it would
almost always be easier to just do the resource manager in C, then talk to
it with java.io.File (assuming it understands standard read/write resource
manager calls). Until someone actually does the “Neutrino Bindings for
Java” piece of work … in which case, if they did it right, it would
probably be easier to do it in Java.
Performance is always a concern as well. You lose a little control over
your runtime when you use Java, although the Java Realtime work in helping
reign that in a bit …
When it comes right down to it, ‘language’ should never be the concern.
Size, speed, speed-to-market, maintainability, functionality are the only
things that count. Your customers >really< don’t care if your product is
implemented in C with the gcc toolchain or visual basic …
–
Andrej Timchenko <silpol@yahoo.com> wrote in message
news:39EF3A63.ECAE110@yahoo.com…
Hi
Patrick, are you sure? Juan was talking about writing “i.e. a simple I/O
Resource Manager, or something like that…”. Give me a reason why one
should implement device_driver in Java, even if JVM is so small in
footprint as J9 is? I don’t see any rationale in that…
Patrick Mueller wrote:
Well, that’s simply not true. You can native methods to do whatever you
need in Java, but implemented in C. Having said that, there exist no
‘bindings’ (JNI methods) for Neutrino-specific os services, for any Java VM,
that I’m aware of.
The interesting bit, actually, is all standard Java VMs (including IBM’s J9
vm) are implemented in such a way that JNI libraries (dlls for windows, so’s
for *nixs) can be used by any VM, as long as the JNI libraries stick to the
‘standard’ JNI functions available.
Juan, I suspect:
- you’re going to offer me some more pints
- you’ll get a better response in the vame newsgroup at the ibm site; there
just aren’t that many people using Java here, I’m guessing …
–
Andrej Timchenko <silpol@yahoo.com> wrote in message
news:39ED8771.79EB2DFE@yahoo.com…
Hi,
juan carlos wrote:
I’ ve just begun some days ago to star using J9.
is there anybody around who has done some work with that? , i.e. a
simple
I/O Resource Manager, or something like that… that can give a clue or
some orientation as I’m new in QNX stuff as well, an all the examples
are
only for C.
I don’t think you can implement anything system oriented in Java, and I/O
Manager is just good example > > All is Java about is just to be system
independent, and I/O Managers (i.e. drivers > > is from different Universe
–
BR, Andrej
\
BR, Andrej