java.nio is used both for simplicity (code gets cleaner) and speed.
The transaction packages and nioneo packages can be rewritten to use but that would not perform very well. Basic file operations
needed would be:

o read/write into/from a buffer (byte array) from/to a file
o change position in a file followed by reading/writing at/to that position
o flush a file making sure all changes to that file are persisted
o file truncation is nice to have too but not absolutely needed


On Sun, May 3, 2009 at 2:26 PM, Antonello Provenzano
<> wrote:
> Johan,
> Thank you very much for the useful information and clarification: I
> will dig out and come back on this later, when I will have clearer
> view.
> Concerning the "java.nio" issue: in .NET there's not a counter part
> for the package. In fact, there's just the definition of the System.IO
> namespace, which provides implementations similar to The
> concepts before NIO are similar to the Remoting features of .NET, but
> the architecture is really different and not always is easily
> mappable.
> As said in my previous email, the architectural differences between
> the two technologies, specially after the latest developments (.NET,
> and C# in particular, were designed to be similar to Java and helping
> the transition of developers from one to another and reducing the
> learning curve, but latest technologies branched out of common
> aspects): *personally* I don't think that section would it be
> portable.
> Cheers.
> Antonello
> On Sun, May 3, 2009 at 2:10 PM, Johan Svensson <> 
> wrote:
>> Hi Antonello,
>> Have a look at the neo-android component, dependency on
>> javax.transaction has been dropped there
>> ( by just writing
>> empty interfaces for all the javax.transaction stuff needed.
>> javax.transaction / JTA and X/Open are just interfaces and
>> specifications. There is no concrete implementation or magic performed
>> by them so removing the dependency replacing with your own empty
>> interfaces should work. See org.neo4j.impl.transaction and
>> org.neo4j.impl.transaction.xaframework packages for the concrete
>> implementation of JTA, XA resources, 2PC and so on.
>> If it is possible to port for example the
>> package to .NET there should be no problem to port the transaction and
>> xaframework packages to .NET (they both use java.nio to manipulate
>> files).
>> Regards,
>> -Johan
Neo mailing list

Reply via email to