Re: [Neo4j] Transparent Distributed Queries?
You can try to implement Google Pregel http://dl.acm.org/citation.cfm?id=1807167.1807184 algorithm on top of Neo4j or use existing implementation http://www.goldenorbos.org/ On Tue, Oct 11, 2011 at 3:26 PM, amitp amit.port...@gmail.com wrote: Hey, - I'm designing a P2P application in which every peer have a partial graph - some nodes in the partial graph can be proxy nodes which contain contact information for another peer - that peer's partial graph includes that proxy node (and potentially other parts of the complete graph) Any chance you can give me some direction on how to implement this? is neo4j suitable? can you recommand something else? Thanks, Amit -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Transparent-Distributed-Queries-tp3414168p3414168.html Sent from the Neo4j Community Discussions mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user -- _ entia non sunt multiplicanda praeter necessitatem, (entities should not be multiplied beyond necessity.) ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Test and try/catch block
I use jUnit MethodRule that starts embedded server in temporary folder and cleans up transaction after the test: public class Neo4jRule extends TemporaryFolder { private GraphDatabaseService graphDatabase; private Transaction transaction; @Override protected void before() throws Throwable { super.before(); graphDatabase = new EmbeddedGraphDatabase(newFolder(neo4j).getAbsolutePath()); transaction = graphDatabase.beginTx(); } @Override protected void after() { transaction.finish(); graphDatabase.shutdown(); super.after(); } public GraphDatabaseService getGraphDatabase() { return graphDatabase; } public Transaction getTransaction() { return transaction; } } On Thu, Aug 25, 2011 at 7:18 AM, Jim Webber j...@neotechnology.com wrote: If you're using the standard try/catch/finally idiom in Neo4j then consider using Nat Pryce/Steve Freeman's transactor pattern. We have an example of this in the neo4j server code here: https://github.com/neo4j/community/blob/master/server/src/functionaltest/java/org/neo4j/server/helpers/Transactor.java It's not always appropriate, but it the general case it can keep your code a bit terser and more intent-ful. Jim ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user -- _ entia non sunt multiplicanda praeter necessitatem, (entities should not be multiplied beyond necessity.) ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Officially supported mechanism for J2EE
No, that's wrong. To create ( and shut down GraphDatabaseService in your bean, you should: 1) create @Singleton session bean. In its @PostConstruct method, create appropriate GraphDataBase service object, and stop it in @PreDestroy method. You can mark that bean as created on startup, if you wish to get possible database errors on deployment instead of the first use. 2) create producer method for GraphDataBaseService : @Produces public GraphDataBaseService getDatabase() { return db; } 3) inject GraphDataBaseService wherever you need it: @Inject private GraphDataBaseService db; The most tricky part is Transaction synchronization. There are two options: - manage transactions in your code by GraphDataBaseService , if you don't need to synchronize it with other resources. - create custom TransactionManagerProvider that enforces Neo4j to use TransactionManager provided by server instead of built-in. You can grab such code from Spring Data Graph project or my Neo4j connector. Spring implementation injects TransactionManager from framework, so you will need at least spring core while my code gets TransactionManager from JNDI, that works in some servers only. All other resources participated the same transaction with Neo4j should also use XA Transactions. On Fri, Jul 22, 2011 at 12:02 PM, eialbur ronalb...@gmail.com wrote: Sorry for the quantity of my questions, and I apologize in advance if any of them are trivial or stupid. ok - so I guess that in my Session Bean I would use the regular old @Resource annotation: @Resource GraphDatabaseService graphDb; Or do I need to declare Neo to jndi and then reference it? @Resource(name=neo/myGraphDb) GraphDatabaseService graphDb; Do I have to update the server.xml file so graphDb knows what to open? I am assuming that there is no connection pooling. I am assuming that my Session Bean does not need to be a Singleton. Is an alternative for me to actually open in ejbCreate? As you stated, it is important to release everything when I'm done ... would that be done thru ejbRemove? OK - so now I'll need XA transaction support. I have never done anything with XA. I am trying to look up articles on Google for Glassfish ... so far I have found very little. I'm not sure yet if Glassfish has built-in support for XA (I'm assuming it does) and I can just use the javax.transaction package, or if I have to do special app server configuration ... and not yet sure if/how to set it all up as a container managed transaction. Can you tell I am not yet comfortable with J2EE? :-) Frankly, I am evaluating the use cases to see if I ever need to share a transaction with the database or if they are always separate (or if I can design so they are always separate). I am essentially using Neo4j as a hierarchic index against a mysql table .. lots of queries but very very few inserts or updates. -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Officially-supported-mechanism-for-J2EE-tp3176938p3192177.html Sent from the Neo4j Community Discussions mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user -- _ entia non sunt multiplicanda praeter necessitatem, (entities should not be multiplied beyond necessity.) ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Neo4j 1.4 / Lucene 3.1 / OSGi - No index provider 'lucene' found
Just curious - as I traced down OSGI service loading from the neo4j Service class it commented out, so the only Java META-INF/services used in any environment. May be that's the case ? On Wed, Jul 20, 2011 at 4:55 AM, Jörg Richter j...@deepamehta.de wrote: Thanks for replies! Yes, the super bundle approach (putting *all* neo modules and *all* their dependencies in one bundle) works in principle. But to be a deployable solution ... 1) it must exist in the Maven repo and be on a par with the Neo4j release 2) A configuration mechanism is required to choose the modules actually needed To abandon the super bundle approach and as long as the original problem (Java Service Loader and OSGi) is not solved: how about bringing back the old-style (serviceloader-less) indexing API as an *alternate* entry point? This would allow thousands of OSGi users to use Neo4j 1.2 and they would love it. Cheers, Jörg On Jul 20, 2011, at 9:20, Peter Neubauer wrote: Could you please try the OSGi neo4j super bundle built in github / neo4j / Neo4j - osgi / bundle? Fine grained bundle deployment interferes with the java service loader which only looks in its own classpath. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user -- _ entia non sunt multiplicanda praeter necessitatem, (entities should not be multiplied beyond necessity.) ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Officially supported mechanism for J2EE
I use neo4j in Glassfish, with JCA connector ( https://github.com/alexsmirnov/neo4j-connector ), and currently tested it with Jboss7. The connector has been created for my startup project ( www.netoprise.com, sorry for horrible design, ot's only 10% done ), and I plan to convert it to HA connector before launch. Unfortunately, Neo4j uses two XA resources and wasn't designed for connector, that makes integration with JCA pretty hard. Seems that neotechnology guys decided to use Spring only :-) P.S. There are some mentions about binary network protocol suitable for JCA, but I don't see any code related to it in repo. I would help in development, if neo team doesn't have enough resources to implement it soon. On Sun, Jul 17, 2011 at 8:03 AM, eialbur ronalb...@gmail.com wrote: I really like Neo, but am concerned that there is so little official company support for J2EE. I want to use Neo as a standard data source in J2EE, with container managed transactions, etc. I don't want to use the REST interface - I want a standard data source interface. There does not appear to be an officially provided mechanism to use Neo as a data source in J2EE. I've seen a couple of people post their code to help someone get started, but shouldn't Neo provide a real official sanctioned mechanism? P.S. I don't want this thread to turn into a religious war over REST. If you like REST and want to defend it then please start a thread for that purpose. Please just accept that I don't want to use the REST interface - I want a standard DB interface for my DB. -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Officially-supported-mechanism-for-J2EE-tp3176938p3176938.html Sent from the Neo4J Community Discussions mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user -- _ entia non sunt multiplicanda praeter necessitatem, (entities should not be multiplied beyond necessity.) ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] polyglot persistence for neo4j
We use Neo4j and MySQL for our project, in the JEE environment, with XA datasource for RDBM + Neo4j JCA connector https://github.com/alexsmirnov/neo4j-connector that let us to synchronize transactions between these sources. The prototype http://www.netoprise.com is far away from production :-), but it's working. Cassandra does not support transactions, as I know, so integration with it would be more cumbersome. On Tue, Jul 5, 2011 at 7:25 AM, Marko Rodriguez okramma...@gmail.com wrote: ;-) The WebOfData/LinkedData/SemanticWeb has the biggest challenge of them all: data set merging via entity disambiguation at the large-scale over HTTP. Marko. http://markorodriguez.com On Jul 5, 2011, at 8:23 AM, Rick Bullotta wrote: Indeed. Though I think that the semantic web, if it ever materializes, will be the ultimate polyglot environment. ;-) -Original Message- From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On Behalf Of Marko Rodriguez Sent: Tuesday, July 05, 2011 10:19 AM To: Neo4j user discussions Subject: Re: [Neo4j] polyglot persistence for neo4j Yet another blog entry on the topic: http://teddziuba.com/2011/06/most-important-concept-systems-design.html I find polyglot environments a pain. Sounds cool, but in practice, its not. Data synchronization is difficult. Take care, Marko. http://markorodriguez.com On Jul 5, 2011, at 8:15 AM, Rick Bullotta wrote: Another blog entry on the topic: http://blog.stavi.sh/polyglot-persistence-integrating-low-latency -Original Message- From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On Behalf Of Marko Rodriguez Sent: Tuesday, July 05, 2011 10:07 AM To: Neo4j user discussions Subject: Re: [Neo4j] polyglot persistence for neo4j Hi, I have a few projects that mix and match Neo4j + (Oracle/MySQL). Basically, its these two architectures (not necessarily for recommendation in all projects): http://markorodriguez.com/services/development/recommendation-system/ (see the last two diagrams). Good luck, Marko. http://markorodriguez.com On Jul 5, 2011, at 3:35 AM, Aliabbas Petiwala wrote: Thanks for the info, It would help us a lot in using neo4j for our social network website if we can talk with the researchers involved in testing neo4j with cassandra as backend. Hence please let us know of them. Greetings for neo4j team, aliabbas On 7/5/11, Peter Neubauer neubauer.pe...@gmail.com wrote: Hi there, There have been experiments with Cassandra as a backend, but I don't think they are running in production. What are you thinking of? /peter Sent from my phone. On Jul 5, 2011 7:02 AM, Aliabbas Petiwala aliabba...@gmail.com wrote: i guess no body has used polyglot persistence with neo4j in production environment? On 7/1/11, Aliabbas Petiwala aliabba...@gmail.com wrote: i would be interested in knowing about anyone who has combined neo4j graph db with other dbs like Cassandra ,orient db what is an optimal configuration to do so? any other configurations for polyglot persistence to achieve high scalability and massive parallelism? -- Aliabbas Petiwala M.Tech CSE -- Aliabbas Petiwala M.Tech CSE ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user -- Aliabbas Petiwala M.Tech CSE ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user -- _ entia non sunt multiplicanda praeter necessitatem, (entities should not be multiplied beyond necessity.) ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] unique indexes
Check befor update could not help there, because Neo4j does not show uncommited changes to other transactions, so it's possible to store the same value in concurrent transactions. I also tried to figure out how to avoid duplicated values in database. Seems that it needed some locks on database objects. Can someone provide an example how to lock database objects properly ? On Fri, Jun 10, 2011 at 8:01 AM, Rick Bullotta rick.bullo...@thingworx.com wrote: If you need to, you could check the existence of a match prior to every attempted add/insert/update. -Original Message- From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On Behalf Of Matt C Sent: Friday, June 10, 2011 10:25 AM To: Neo4j user discussions Subject: Re: [Neo4j] unique indexes An index that would enforce every value added to it be unique. I don't even see support for that in Lucene, so, nevermind. Just something I'm used to SQL handling for me. On Fri, Jun 10, 2011 at 1:05 AM, Peter Neubauer peter.neuba...@neotechnology.com wrote: Matt, what do you mean by unique indexes? Cheers, /peter neubauer GTalk: neubauer.peter Skype peter.neubauer Phone +46 704 106975 LinkedIn http://www.linkedin.com/in/neubauer Twitter http://twitter.com/peterneubauer http://www.neo4j.org - Your high performance graph database. http://startupbootcamp.org/ - Öresund - Innovation happens HERE. http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party. On Fri, Jun 10, 2011 at 7:30 AM, Matt C yougotroo...@gmail.com wrote: Sorry if this is covered somewhere, I couldn't find it in the docs. I was wondering if its possible to create unique indexes with the LuceneIndexProvider? -Matt ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user -- _ entia non sunt multiplicanda praeter necessitatem, (entities should not be multiplied beyond necessity.) ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] performance issues with ubuntu
I have some clue about this problem. I did face it before, though not with Neo4j but with other programs that intensive use disks. For example, my linux box completely frozen by svn update command for huge projects. The symptoms are same : low CPU load with high iowait ( in your message, I saw 23% for iowait load ). MySQL faces the same problem: http://www.mysqlperformanceblog.com/?s=linux+high+io+wait There are some recommendations: 1) Tune io scheduler for disk with database. 2) disable access time update: noatime,nodiratime flags for disk mount command or /etc/fstab. Not sure what it can help a lot, though. On Mon, May 30, 2011 at 11:58 PM, Marco Gerber mger...@junisphere.net wrote: Hello everybody A collection of reference benchmarks would be great, but completely independent of this, my problem is making my application on linux as performant as on windows. Thanks guys, Marco -Original Message- From: user-boun...@lists.neo4j.org on behalf of Rick Bullotta Sent: Mon 30.05.2011 18:02 To: j...@neotechnology.com; user@lists.neo4j.org Subject: Re: [Neo4j] performance issues with ubuntu Hi, Jim. Not really thinking of benchmarks, which I agree are tricky to define and even trickier to standardize. Plus, given the nearly infinitely cool things you can do with neo, it borders on impossible. Rather, I'm just thinking of wikifying some of the platform specific best practices and gotchas/known issues for each. Rick - Reply message - From: Jim Webber j...@neotechnology.com Date: Mon, May 30, 2011 11:55 am Subject: [Neo4j] performance issues with ubuntu To: Neo4j user discussions user@lists.neo4j.org Hi Rick, I concur that we should perhaps have some perf figures, but it's one of those things that's easier said than done. For instance, right now we have performance tests running as part of the Windows/Linux/Mac continuous build and we will fail the build if we drop on those numbers. Yet creating representative benchmarks (similar to the TPC-X benchmarks perhaps) is not only difficult, but will almost certainly be of no use to users or customers when choosing a graph database or in designing out their own solutions because your access patterns are likely to be so different from the benchmark patterns. But if the community could come together and loosely agree upon some representative benchmarks that would be useful to them (platform/setup/access pattern) then we could get something into our build and publishing numbers with a little effort. Jim ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user -- _ entia non sunt multiplicanda praeter necessitatem, (entities should not be multiplied beyond necessity.) ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user