[Neo4j] Checking for unfinished transactions

2011-07-31 Thread Felipe Oliveira Carvalho
How can I check if there are unfinished transactions? I want to do the
same thing that is done when EmbeddedGraphDatabase is instantiated
after a non-clean shutdown.

Jul 31, 2011 5:06:12 PM
org.neo4j.kernel.impl.transaction.xaframework.XaLogicalLog
doInternalRecovery
INFO: Non clean shutdown detected on log
[/home/felipe/graph.db/nioneo_logical.log.2]. Recovery started ...
Jul 31, 2011 5:06:12 PM org.neo4j.kernel.impl.transaction.TxManager init
INFO: Unresolved transactions found, recovery started ...
Jul 31, 2011 5:06:12 PM org.neo4j.kernel.impl.transaction.TxManager init
INFO: Recovery completed, all transactions have been resolved to a
consistent state.

Is it too slow? I want to check if there are unfinished transactions
to roll back them all.

I'm writing a server and clients may not call finish() for some reason
(unexpected errors) disobeying
http://wiki.neo4j.org/content/Neo_Mistakes#Transactions_usage. I want
to cleanup transactions on every new client connection so that every
connection starts clean.

Thanks,
Felipe
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Hybrid Relational + Graph solution

2011-07-23 Thread Felipe Oliveira Carvalho
 Your approach is sensible if you have a lot of tooling / code around your 
 relational model.

I don't have.

 Do you use JPA or some other ORM or just plain JDBC ?

None. I'm using PHP for the front end and Java for services using
Thrift for communication between the PHP and Java.

 You might have a look at Spring Data Graph cross-store approach:
 http://bit-ly/sdg-html#cross-store (and perhaps Spring Data Graph in general 
 http://springsource.org/spring-data/neo4j )

 If you want to use the properties while traversing the graph it would 
 probably more sensible to move the data to the graph? How big is your dataset?

 You wrote I'm _creating_  so if you start out, I'd try to go with the graph 
 database.

 I think the APIs are clean and easy enough for your developers to get them, 
 and you now also got cypher as query language which should be understandable 
 for a developer.

I will use Neo4J for the data that fits better in a graph and use
PostgreSQL for table-friendly data because I'm really excited about
Neo4J.

 Does your data(base) also contain like large blobs and such? Those should 
 perhaps not be stored in the graph (it's not optimized for that kind of data).

I'm actually starting this project now. I'll have posts and comments
(not really large text fields). I don't think this kind of data should
be modeled as a graph.


I'm trying to make the code cache friendly using these abstractions
used by Facebook:
http://www.infoq.com/presentations/Evolution-of-Code-Design-at-Facebook

I think this approach fits even better with NeoJ4 than any other ORM
based solution.

Thanks!
Felipe
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo4j] Hybrid Relational + Graph solution

2011-07-22 Thread Felipe Oliveira Carvalho
I'm creating a social network. I would like to use Neo4J to represent the
relationships between people (FOLLOWS, WENT_TO, LIKES) and other objects I
have in my network. I already started storing the users (and other objects)
in PostgreSQL tables.

Is it reasonable to use PostgreSQL to store the objects while using Neo4J to
store the relationships between these objects? I would use ids as vertex
properties and would fetch the data for each object from PostgreSQL.

One problem I see with this approach is that if I want to traverse the graph
and use the data of the objects I would have to duplicate the data and add
more properties to the vertexes.

But I also think that minimizing the use of Neo4J would make it easier for
the other developers of the team that are used to relational databases.

Do you see more problems on this approach? Does it make thinks much more
complicated?

Thanks!
Felipe
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user