Re: [Neo] Using BatchInserter and ReadOnlyService
Hi Tobias Please look to the example of code. Seems like it's do very simple action and fails: GraphDatabaseService neoService = new EmbeddedReadOnlyGraphDatabase(D://DB); BatchInserter inserter = new BatchInserterImpl(D://DB); tx = neoService.beginTx(); try { neoService.getReferenceNode(); } finally { tx.success(); tx.finish(); } Exception: Exception in thread main org.neo4j.kernel.impl.nioneo.store.UnderlyingStorageException: Unable to load position[0] @[0] at org.neo4j.kernel.impl.nioneo.store.AbstractPersistenceWindow.readPositio n(AbstractPersistenceWindow.java:94) at org.neo4j.kernel.impl.nioneo.store.PersistenceWindowPool.allocateNewWind ow(PersistenceWindowPool.java:538) at org.neo4j.kernel.impl.nioneo.store.PersistenceWindowPool.expandBricks(Pe rsistenceWindowPool.java:506) at org.neo4j.kernel.impl.nioneo.store.PersistenceWindowPool.acquire(Persist enceWindowPool.java:135) at org.neo4j.kernel.impl.nioneo.store.CommonAbstractStore.acquireWindow(Com monAbstractStore.java:459) at org.neo4j.kernel.impl.nioneo.store.NodeStore.loadLightNode(NodeStore.jav a:129) at org.neo4j.kernel.impl.nioneo.xa.NeoReadTransaction.nodeLoadLight(NeoRead Transaction.java:74) at org.neo4j.kernel.impl.nioneo.xa.NioNeoDbPersistenceSource$ReadOnlyResour ceConnection.nodeLoadLight(NioNeoDbPersistenceSource.java:234) at org.neo4j.kernel.impl.persistence.PersistenceManager.loadLightNode(Persi stenceManager.java:67) at org.neo4j.kernel.impl.core.NodeManager.getNodeById(NodeManager.java:384) at org.neo4j.kernel.impl.core.NodeManager.getReferenceNode(NodeManager.java :461) at org.neo4j.kernel.EmbeddedGraphDbImpl.getReferenceNode(EmbeddedGraphDbImp l.java:159) at org.neo4j.kernel.EmbeddedReadOnlyGraphDatabase.getReferenceNode(Embedded ReadOnlyGraphDatabase.java:109) at Example.main(Example.java:69) Caused by: java.io.IOException: The process cannot access the file because another process has locked a portion of the file at sun.nio.ch.FileDispatcher.pread0(Native Method) at sun.nio.ch.FileDispatcher.pread(FileDispatcher.java:35) at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:230) at sun.nio.ch.IOUtil.read(IOUtil.java:206) at sun.nio.ch.FileChannelImpl.read(FileChannelImpl.java:625) at org.neo4j.kernel.impl.nioneo.store.AbstractPersistenceWindow.readPositio n(AbstractPersistenceWindow.java:89) ... 13 more Nikolay Lagutko ICQ: 457203926 Skype: lagutko_nikolay Jabber: lagutk...@jabber.ru -Original Message- From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On Behalf Of Tobias Ivarsson Sent: Monday, May 03, 2010 8:22 PM To: Neo user discussions Subject: Re: [Neo] Using BatchInserter and ReadOnlyService This is not a setup I would recommend, but I still find it interesting, could you please supply some more information on the exception (with traceback) that you are seeing? Cheers, Tobias On Mon, May 3, 2010 at 3:54 PM, ???, ??? nikolay.lagu...@gersis-software.com wrote: Hi all, Some time ago I tried to use BatchInserter and ReadOnlyService together and I had exception. But in latest Neo release seems like this was fixed and it's possible to run BatchInserter if I have ReadOnlyService already run. With this change I thought that it's possible to use Traversing through nodes with ReadOnlyService but it throws Exception. Is it a correct situation? Nikolay Lagutko ICQ: 457203926 Skype: lagutko_nikolay Jabber: lagutk...@jabber.ru ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user -- Tobias Ivarsson tobias.ivars...@neotechnology.com 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] Neo4j node identity, property types, security
2010/5/3 Kevin Cox kc6...@att.com Hi, I have some questions about how Neo4j works regarding node/edge identity, property types and security. 1) Vertex/Node Identity: The Node interface has a [long getId()] method with description: Returns the unique id of this node. Ids are garbage collected over time so they are only guaranteed to be unique during a specific time span: if the node is deleted, it's likely that a new node at some point will get the old id. Note: this makes node ids brittle as public APIs. Making the graph database expose UUIDs (or some client controlled ID) instead of longs is on our internal road map. As a result, I understand I need to create a stable ID for a public API in the form of a URI/URN probably including a UUID. As such, I would want to be able to access specific nodes in a graph using this ID without traversing the graph to search to it. However, I haven't found this capability in the docs yet? Does it exist? Do I really have to do a IndexService search in Lucene to get a single node back when its ID in known? Is there a concept of an entry-point? The example use cases are: 1a) A web page round trip where subsequent web pages display subgraphs as the user drills down into the levels. I would want to be able to find a subgraph by ID directly when working within a graph. Ex: A leaf node on the last page would become the top node for the next page. The natural entry point in the graph is the reference nodehttp://api.neo4j.org/current/org/neo4j/graphdb/GraphDatabaseService.html#getReferenceNode%28%29where it's common to create sub reference nodes to all your own entry points. Another common pattern is to use the IndexServicehttp://components.neo4j.org/neo4j-index/apidocs/org/neo4j/index/IndexService.html(as you mentioned) for an initial lookup on e.g. your UUIDs which you'd have to add to the index preferably when creating them. The LuceneIndexService class integrates well with Neo4j and automatically participates in its transactions, taking care for f.ex. when a transaction is rolled back over both the graph database and the index service. 1b) A distributed graph, where the whole graph is located across multiple DB instances that contain portions of the larger graph (concept of sharding). What is the strategy for sharding in Neo4j? Sharding is scheduled for version 2.0, due end of year. For now the best way would be to use the REST http://components.neo4j.org/neo4j-rest/ api or online-backup http://wiki.neo4j.org/content/Online_Backup_HA (essentially replication w/o cluster management). We're working on cluster management right now, let us know if you're interested in beta testing it. Another strategy could be to partition your graph along sub graphs that match your problem domains, e.g. a reduced social graph for friend recommandations, a transaction graph for fraud detection. Then you can query different instances (possibly read-scaled in a master/slave scenario) with specific queries that they can answer. -- 2) Property Types: The PropertyContainer interface has [setProperty(String key, Object value)] with description: Sets the property value for the given key to value. The property value must be one of the valid property types, i.e: * boolean or boolean[] * byte or byte[] * short or short[] * int or int[] * long or long[] * float or float[] * double or double[] * char or char[] * java.lang.String or String[] This means that null is not an accepted property value. So, my question is, what property types are really recommended to be stored in Neo4j? There are things one could but should not do and things that one should and are recommended to do. I am wondering what I should and should not attempt to store in Neo4j? For example, can I treat Neo4j like a document DB and store (in terms of Oracle, our RDBMS) BLOB and CLOB type data? Or, would I be better off just storing small java intrinsic types and using a hybrid (with Oracle) and only store primary keys to BLOB/CLOB records in a property in the graph? (I am not referring to data that is tabular in nature and belongs in an rdbms in the first place) Neo4j isn't optimal for storing big blobs of strings or byte arrays, for that it might be better to store such data in a key/value store or document database or RDBMS (like you suggested). -- 3) Is there any concept of a user, groups, permissions, or ACLs in Neo4j? I am wondering if I need to build my own? (similar to following the pattern given at http://wiki.neo4j.org/content/ACL). Would I just create my own ACL graph? Neo4j has no built-in concept of users, groups, permissions or ACLs. That wiki page is one approach of how to model it. However that model is used to model security on an application level, not security for the graph database itself (although it might be used for that as well). Thanks, Kevin
Re: [Neo] Neo4j node identity, property types, security
The example use cases are: 1a) A web page round trip where subsequent web pages display subgraphs as the user drills down into the levels. I would want to be able to find a subgraph by ID directly when working within a graph. Ex: A leaf node on the last page would become the top node for the next page. A short comment - This use case seems to only require an id unique over a limited time (session). I would think the node-id is good enough for this case, without needing an extra long-term unique UUID. What I would do is deal with the starting point (at login, or session start) by traversing from the reference node to the main node of interest to the user session (for example the node representing the logged in user, or the session itself), and then keep a reference to the node-id of that node in the session, and lookup the node on each subsequent web access. ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
[Neo] neo rdf
Hello, Is it possible to update the context value in verbose triple store ? Thank you, Luda ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
[Neo] Community Program Review at FOSS4G 2010
Hi guys, I've applied to present Neo4j Spatial (Neo4j as a true GIS database for mapping data) at the FOSS4G conference in September. To increase the chances of the presentation getting accepted, it helps to get community votes. So, if you think Neo4j Spatial is a cool idea, vote for it :-) Please follow this link to express your opinion: http://2010.foss4g.org/review/ Regards, Craig -- Forwarded message -- From: Lorenzo Becchi lbec...@osgeo.org Date: Wed, May 5, 2010 at 2:02 AM Subject: Community Program Review at FOSS4G 2010 To: Lorenzo Becchi lore...@ominiverdi.com I would like to personally thank you for submitting your abstract for FOSS4G 2010. Here below there's the message to promote the public review of the 360 abstracts we've received. I imagine you want your abstract to be voted and your community to support you. Please feel free to forward this message to as much people as possible to make this public review something really useful. best regards Lorenzo Becchi -- At FOSS4G 2010 the community and conference registrants will have an opportunity to read through and score potential presentations prior to the selection of the final conference program. There is enough room in the conference schedule for 120 presentations. The conference committee will use the aggregate scores from the community review process to help choose which presentations to accept, and to assign presentations to appropriately sized rooms. The top quoted presentations will receive a special attention from the organization. Please follow this link to express your opinion: http://2010.foss4g.org/review/ ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user