Re: [Neo] In-memory Neo

2009-02-01 Thread Tobias Ivarsson
On Sun, Feb 1, 2009 at 8:43 PM, Emil Eifrem  wrote:

> On Sun, Feb 1, 2009 at 6:47 PM, Johan Svensson 
> wrote:
> > A real implementation optimized of in-memory would require some work.
>
> Tobias, didn't you do some work on this for NeoMock and/or RemoteNeo?
> Maybe something we could refactor out to an InMemoryNeoService at some
> point.
>

I outlined the requirements for writing a InMemoryNeo based on RemoteNeo.
What the most simple version would need is:
1. Set the caching policy to do as much of each transaction on the client as
possible.
  - This would mean that the only requests being sent to the "server" before
commit would be create node/relationship (to allocate an id), then every
other change would be cached on the client and sent on commit, or dropped on
rollback.
2. Implement a simple transport layer / "server" that stores all state in
memory. (With the extra logic to allocate and be able to rollback node and
relationship creations)

In the first prototype of RemoteNeo, the cache configuration mentioned above
is the default. This is not the case in the second prototype. The second
prototype has swappable cache configurations, and the configuration needed
for this setup is not implemented yet.
The first prototype is in the repository as RemoteNeo (the second is called
remote-neo), in my labs-directory.
The first protype is has more testing behind it but does not support
concurrent transactions. The second prototype is a moving target, but will
be (closer to) the final version. I have a number of outstanding changes on
the second prototype, but am not working actively on them at the moment
since I am completely swamped with other committments.

Cheers,
-- 
Tobias Ivarsson 
Hacker, Neo Technology
www.neotechnology.com
Cellphone: +46 706 534857
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] In-memory Neo

2009-02-01 Thread Emil Eifrem
On Sun, Feb 1, 2009 at 6:47 PM, Johan Svensson  wrote:
> A real implementation optimized of in-memory would require some work.

Tobias, didn't you do some work on this for NeoMock and/or RemoteNeo?
Maybe something we could refactor out to an InMemoryNeoService at some
point.

Cheers,

-- 
Emil Eifrém, CEO [e...@neotechnology.com]
Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] In-memory Neo

2009-02-01 Thread Johan Svensson
Hi David,

Currently there is no in-memory implementation. It would be fairly
easy to implement the
org.neo4j.impl.persistence.ResourceConnection/PersistenceSource
interfaces but you would still have the global transaction manager
that would keep a transaction log on disk.

The easiest way would be to mount a ramdisk and point Neo to it.

Both of these would waste memory compared to a real in-memory
implementation. The current implementation is built to handle large
graphs that don't fit in memory with durability so most of the code
there is not fit for reuse. A real implementation optimized of
in-memory would require some work.

-Johan

On Sun, Feb 1, 2009 at 1:47 AM, David Montag  wrote:
> Hi,
>
> I'm developing a small application that is launched through Java Web Start.
> I want to use Neo for the node space features, but I don't need any
> persistence, as the application won't need to save any state between runs.
> What I'm wondering is, is there an in-memory NeoService implementation that
> doesn't access the file system at all?
>
> /David
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo] In-memory Neo

2009-01-31 Thread David Montag
Hi,

I'm developing a small application that is launched through Java Web Start.
I want to use Neo for the node space features, but I don't need any
persistence, as the application won't need to save any state between runs.
What I'm wondering is, is there an in-memory NeoService implementation that
doesn't access the file system at all?

/David
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user