Re: [Neo] Object binding using annotations?

2008-08-13 Thread Andreas Ronge
Neo4j.rb does support object bindings (and soon other nice things like
a graph query language DSL)
http://github.com/andreasronge/neo4j/tree/master

/Andreas

On Wed, Aug 13, 2008 at 8:54 AM, Nils Kaiser <[EMAIL PROTECTED]> wrote:
> Hello folks,
>
> has anyone implemented an object binding framework for Neo? I imagine
> sth. that allows to define fields and relationships in POJOs using
> annotations, and binds them using runtime code generation or reflection.
>
> Cheers,
>
> Nils
> ___
> Neo mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] Object binding using annotations?

2008-08-13 Thread Peter Neubauer
Nils,
if you are the adventurous type, head over to www.qi4j.org and start
building an extremely DDD focused proejct while still being in plain
Java (syntax). Neo4j is one of the backends you can use for storing
entities.

However, for more "normal" use, there is the Meta package for applying
constraints and structure to a Node Space,
http://components.neo4j.org/neo-meta/, and I think there are some
folks here using it already?

Third on the roll-your-own front, there are some pointers in the wiki,
e.g. http://wiki.neo4j.org/content/Design_Guide ...

Plese let us know if that helps!

/peter

GTalk: neubauer.peter
Skype peter.neubauer
ICQ 18762544
GTalk neubauer.peter
Phone +46704 106975
LinkedIn http://www.linkedin.com/in/neubauer
Twitter http://twitter.com/peterneubauer

http://www.neo4j.org - New Energy for Data - the Graph Database.
http://www.ops4j.org - New Energy for OSS Communities - Open
Participation Software.
http://www.qi4j.org - New Energy for Java - Domain Driven Development.




On Wed, Aug 13, 2008 at 8:54 AM, Nils Kaiser <[EMAIL PROTECTED]> wrote:
> Hello folks,
>
> has anyone implemented an object binding framework for Neo? I imagine
> sth. that allows to define fields and relationships in POJOs using
> annotations, and binds them using runtime code generation or reflection.
>
> Cheers,
>
> Nils
> ___
> Neo mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
>
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] Object binding using annotations?

2008-08-13 Thread Peter Neubauer
Ahh yes,
sorry for not mentioning Andreas' cool work on that front!

/peter

GTalk: neubauer.peter
Skype peter.neubauer
ICQ 18762544
GTalk neubauer.peter
Phone +46704 106975
LinkedIn http://www.linkedin.com/in/neubauer
Twitter http://twitter.com/peterneubauer

http://www.neo4j.org - New Energy for Data - the Graph Database.
http://www.ops4j.org - New Energy for OSS Communities - Open
Participation Software.
http://www.qi4j.org - New Energy for Java - Domain Driven Development.




On Wed, Aug 13, 2008 at 9:12 AM, Andreas Ronge <[EMAIL PROTECTED]> wrote:
> Neo4j.rb does support object bindings (and soon other nice things like
> a graph query language DSL)
> http://github.com/andreasronge/neo4j/tree/master
>
> /Andreas
>
> On Wed, Aug 13, 2008 at 8:54 AM, Nils Kaiser <[EMAIL PROTECTED]> wrote:
>> Hello folks,
>>
>> has anyone implemented an object binding framework for Neo? I imagine
>> sth. that allows to define fields and relationships in POJOs using
>> annotations, and binds them using runtime code generation or reflection.
>>
>> Cheers,
>>
>> Nils
>> ___
>> Neo mailing list
>> User@lists.neo4j.org
>> https://lists.neo4j.org/mailman/listinfo/user
>>
> ___
> Neo mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
>
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] Neo4j for personal information database

2008-08-13 Thread Tobias Ivarsson
On Wed, Aug 13, 2008 at 8:51 AM, Nils Kaiser <[EMAIL PROTECTED]> wrote:

> Comments inline.
>
> Johan Svensson schrieb:
> >> A part I am struggeling with in the design of the app, is that the UI
> >> should support viewing of very large collections, for example all email
> >> messages in "work" collection. These will have to be sortable by
> >> different fields, in case of a mail message even sorting by the name of
> >> the contact (which needs to follow a relationship). I don't really know
> >> how to use Neo4j (or another persistence mechanism, or another layer on
> >> top of Neo4j) to implement such functionality.
> >>
> >>
> >
> > This can either be solved by reading in the full collection (using a
> > traverser) then sort it or keep the items sorted in the node space
> > (using linked lists like Timeline utility in index-util component).
> >
> Are there some examples of this somewhere? Or maybe something I might
> use to leverage the task?
>
> With a relational DB, I wouldn't have to care as the sorting could be
> made by the database. I could then use a cursor to implement some kind
> of lazy loading in my UI.


Yeah, and it does it in the same way, either you define that you want the DB
to store a sorted index, or it does the sorting by reading all data and sort
it when you request it. And defining that you want something to be sorted in
Neo is by using the index-utils to define sorted datastructures. Using for
example the timeline is as simple as:

import org.neo4j.util.timeline.TimelineIndex;
import org.neo4j.util.timeline.Timeline;

...

NeoService neo = ...
Node timelineStartNode = ...
TimelineIndex timeline = new Timeline("Timeline name", timeline, neo);
...
timeline.addNode(someNode, getSortKeyFromNode(someNode));
...

private long getSortKeyFromNode(Node node) {

}

For information on how to include index-util in your project, see this
previous thread:
http://lists.neo4j.org/pipermail/user/2008-August/000666.html


> I guess the solution to sort the objects as a
> linked list has the disadvantage not to be able to sort on multiple fields.


Well, the same object could be contained in more than one list...

>
>
> Would lucene help here?
> ___
> Neo mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>


A note to my fellow Neo developers:
It could be a good idea to create some sorted structure that keeps nodes
sorted based on a String, since this is quite a common use case.

-- 
Tobias Ivarsson <[EMAIL PROTECTED]>
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] Neo4j for personal information database

2008-08-13 Thread Peter Neubauer
Tobias,
sounds like an issue in Trac regarding the String node-sorting
utility. you or me?

/peter

GTalk:neubauer.peter
Skypepeter.neubauer
ICQ18762544
Phone   +46704 106975
LinkedIn   http://www.linkedin.com/in/neubauer
Twitter  http://twitter.com/peterneubauer

http://www.neo4j.org - New Energy for Data - the Graph Database.
http://www.ops4j.org - New Energy for OSS Communities - Open
Participation Software.
http://www.qi4j.org- New Energy for Java - Domain Driven Development.




On Wed, Aug 13, 2008 at 9:37 AM, Tobias Ivarsson
<[EMAIL PROTECTED]> wrote:
> On Wed, Aug 13, 2008 at 8:51 AM, Nils Kaiser <[EMAIL PROTECTED]> wrote:
>
>> Comments inline.
>>
>> Johan Svensson schrieb:
>> >> A part I am struggeling with in the design of the app, is that the UI
>> >> should support viewing of very large collections, for example all email
>> >> messages in "work" collection. These will have to be sortable by
>> >> different fields, in case of a mail message even sorting by the name of
>> >> the contact (which needs to follow a relationship). I don't really know
>> >> how to use Neo4j (or another persistence mechanism, or another layer on
>> >> top of Neo4j) to implement such functionality.
>> >>
>> >>
>> >
>> > This can either be solved by reading in the full collection (using a
>> > traverser) then sort it or keep the items sorted in the node space
>> > (using linked lists like Timeline utility in index-util component).
>> >
>> Are there some examples of this somewhere? Or maybe something I might
>> use to leverage the task?
>>
>> With a relational DB, I wouldn't have to care as the sorting could be
>> made by the database. I could then use a cursor to implement some kind
>> of lazy loading in my UI.
>
>
> Yeah, and it does it in the same way, either you define that you want the DB
> to store a sorted index, or it does the sorting by reading all data and sort
> it when you request it. And defining that you want something to be sorted in
> Neo is by using the index-utils to define sorted datastructures. Using for
> example the timeline is as simple as:
>
> import org.neo4j.util.timeline.TimelineIndex;
> import org.neo4j.util.timeline.Timeline;
>
> ...
>
> NeoService neo = ...
> Node timelineStartNode = ...
> TimelineIndex timeline = new Timeline("Timeline name", timeline, neo);
> ...
> timeline.addNode(someNode, getSortKeyFromNode(someNode));
> ...
>
> private long getSortKeyFromNode(Node node) {
>
> }
>
> For information on how to include index-util in your project, see this
> previous thread:
> http://lists.neo4j.org/pipermail/user/2008-August/000666.html
>
>
>> I guess the solution to sort the objects as a
>> linked list has the disadvantage not to be able to sort on multiple fields.
>
>
> Well, the same object could be contained in more than one list...
>
>>
>>
>> Would lucene help here?
>> ___
>> Neo mailing list
>> User@lists.neo4j.org
>> https://lists.neo4j.org/mailman/listinfo/user
>>
>
>
> A note to my fellow Neo developers:
> It could be a good idea to create some sorted structure that keeps nodes
> sorted based on a String, since this is quite a common use case.
>
> --
> Tobias Ivarsson <[EMAIL PROTECTED]>
> Hacker, Neo Technology
> www.neotechnology.com
> Cellphone: +46 706 534857
> ___
> Neo mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
>
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] Object binding using annotations?

2008-08-13 Thread Peter Haensgen
Hi,

> has anyone implemented an object binding framework for Neo? I imagine
> sth. that allows to define fields and relationships in POJOs using
> annotations, and binds them using runtime code generation or
reflection.

no, I haven't, but I believe your question could also be read as: How do
I efficiently develop a domain-model for Neo?

Since I don't like annotated code and my special interest is
model-driven software development, I have built a little code generation
system for generating my domain classes. It consists of:

- a simple meta-model (defines things like "Namespace", "Bean",
"Attribute", "Relation", and so on...) built using the Eclipse Modeling
Framework
- some code generation templates based on openArchitectureWare Xpand for
generating bean classes (this is how I call the domain classes) and
factory classes for controlling the beans lifecycle
- some additional classes forming the runtime support for the generated
code

Works great!

(And sorry, no, it's not public yet, as it is still quite
experimental...)

regards,
Peter

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


Re: [Neo] Object binding using annotations?

2008-08-13 Thread Peter Neubauer
Wow,
this sounds cool, need to check that out. It might well be one more
very interesting way to harness DDD with Neo ... feel free to share
any public info on this here!

/peter

GTalk:neubauer.peter
Skypepeter.neubauer
ICQ18762544
Phone   +46704 106975
LinkedIn   http://www.linkedin.com/in/neubauer
Twitter  http://twitter.com/peterneubauer

http://www.neo4j.org - New Energy for Data - the Graph Database.
http://www.ops4j.org - New Energy for OSS Communities - Open
Participation Software.
http://www.qi4j.org- New Energy for Java - Domain Driven Development.




On Wed, Aug 13, 2008 at 10:49 AM, Peter Haensgen
<[EMAIL PROTECTED]> wrote:
> Hi,
>
>> has anyone implemented an object binding framework for Neo? I imagine
>> sth. that allows to define fields and relationships in POJOs using
>> annotations, and binds them using runtime code generation or
> reflection.
>
> no, I haven't, but I believe your question could also be read as: How do
> I efficiently develop a domain-model for Neo?
>
> Since I don't like annotated code and my special interest is
> model-driven software development, I have built a little code generation
> system for generating my domain classes. It consists of:
>
> - a simple meta-model (defines things like "Namespace", "Bean",
> "Attribute", "Relation", and so on...) built using the Eclipse Modeling
> Framework
> - some code generation templates based on openArchitectureWare Xpand for
> generating bean classes (this is how I call the domain classes) and
> factory classes for controlling the beans lifecycle
> - some additional classes forming the runtime support for the generated
> code
>
> Works great!
>
> (And sorry, no, it's not public yet, as it is still quite
> experimental...)
>
> regards,
> Peter
>
> ___
> Neo mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
>
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] neo online?

2008-08-13 Thread Emil Eifrem
On Wed, Aug 13, 2008 at 4:24 AM, Kai Devan <[EMAIL PROTECTED]> wrote:
> Hello everyone, I've been following neo4j for a little bit and really
> believe in the concept. The 8-page introduction is a little abstract for me
> to fully understand but as I read about the node, relationship, property
> structure it makes a lot of sense.

Great!

> I've setup maven to build the database so
> I can play with it and try to understand more. I come from a web development
> background and work mainly with design/css/html/php and I'm not familiar
> with Java. Will it be possible to use neo as a database for a web
> development project and still use php for the backend logic?

It's definitely possible, but will require some experience with
exposing Java services to PHP frontends. I would wrap Neo4j in a thin
domain-oriented REST layer -- i.e. a REST endpoint that exposes domain
abstractions (Customer, Cart, things like that) rather than Neo4j
primitives directly (Node, Relationship, etc). This means that your
domain layer will be implemented in Java (see patterns for this on the
wiki) whereas your presentation layer and action control flow will be
implemented in PHP.

Definitely doable, but maybe not trivial if you don't have any
experience with service oriented architectures.

> Would the
> neo4j.py project allow the database to be used with one of the python web
> frameworks?

This question is more for Tobias, but I assume the answer would be yes. Tobias?

> There's a personal project I'm working on for the web and I'd
> really like to be able to use neo4j as the database. I'll learn as much as I
> have to so I can get this working.

Great -- let us know how it progresses and if you have any questions!

>
> There was also a message a little bit ago talking about having someone more
> unfamiliar with neo4j read new documentation to see if it's clear and
> understandable. I might be a good subject for that since all of this is new
> to me, I'll offer comments on everything I read :)

Fantastic! Would be really appreciated. Please start at

   http://wiki.neo4j.org/content/IMDB_Example

and take it from there.

Cheers,

-- 
Emil Eifrém, CEO [EMAIL PROTECTED]
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] Object binding using annotations?

2008-08-13 Thread Emil Eifrem
On Wed, Aug 13, 2008 at 10:54 AM, Peter Neubauer
<[EMAIL PROTECTED]> wrote:
> Wow,
> this sounds cool, need to check that out. It might well be one more
> very interesting way to harness DDD with Neo ... feel free to share
> any public info on this here!

+1 on that. Sounds very interesting!

Cheers,

-- 
Emil Eifrém, CEO [EMAIL PROTECTED]
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] neo online?

2008-08-13 Thread Tobias Ivarsson
On Wed, Aug 13, 2008 at 5:25 PM, Emil Eifrem <[EMAIL PROTECTED]> wrote:

> On Wed, Aug 13, 2008 at 4:24 AM, Kai Devan <[EMAIL PROTECTED]> wrote:
> > Hello everyone, I've been following neo4j for a little bit and really
> > believe in the concept. The 8-page introduction is a little abstract for
> me
> > to fully understand but as I read about the node, relationship, property
> > structure it makes a lot of sense.
>
> Great!
>
> > I've setup maven to build the database so
> > I can play with it and try to understand more. I come from a web
> development
> > background and work mainly with design/css/html/php and I'm not familiar
> > with Java. Will it be possible to use neo as a database for a web
> > development project and still use php for the backend logic?
>
> It's definitely possible, but will require some experience with
> exposing Java services to PHP frontends. I would wrap Neo4j in a thin
> domain-oriented REST layer -- i.e. a REST endpoint that exposes domain
> abstractions (Customer, Cart, things like that) rather than Neo4j
> primitives directly (Node, Relationship, etc). This means that your
> domain layer will be implemented in Java (see patterns for this on the
> wiki) whereas your presentation layer and action control flow will be
> implemented in PHP.
>
> Definitely doable, but maybe not trivial if you don't have any
> experience with service oriented architectures.
>
> > Would the
> > neo4j.py project allow the database to be used with one of the python web
> > frameworks?
>
> This question is more for Tobias, but I assume the answer would be yes.
> Tobias?


The answer is yes. One thing to note is that most Python web frameworks
include some Object-Relational mapper, and since Neo isn't a relational
database, these cannot be used.
It would be interesting to do something similar to what Google did with
their Object-Bigtable mapper extension for Django in App Engine, but I
haven't had time to work more on that yet. Any help is greatly appreciated.

>
>
> > There's a personal project I'm working on for the web and I'd
> > really like to be able to use neo4j as the database. I'll learn as much
> as I
> > have to so I can get this working.
>
> Great -- let us know how it progresses and if you have any questions!
>
> >
> > There was also a message a little bit ago talking about having someone
> more
> > unfamiliar with neo4j read new documentation to see if it's clear and
> > understandable. I might be a good subject for that since all of this is
> new
> > to me, I'll offer comments on everything I read :)
>
> Fantastic! Would be really appreciated. Please start at
>
>   http://wiki.neo4j.org/content/IMDB_Example
>
> and take it from there.
>
> Cheers,
>
> --
> Emil Eifrém, CEO [EMAIL PROTECTED]
> 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
>



-- 
Tobias Ivarsson <[EMAIL PROTECTED]>
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] neo online?

2008-08-13 Thread Anders Nawroth
Hi!

Kai Devan skrev:
> with Java. Will it be possible to use neo as a database for a web
> development project and still use php for the backend logic?
>   

I'm looking into if this would be possible using the Quercus PHP5 engine 
written in Java.

I have Jetty (Java webserver) + Quercus + a PHP-script almost running 
fine, need to look into some configuration issues and then I'll try 
using Neo4j in this setup.

Hopefully I can tell you more about this by tomorrow!

/anders

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