[Neo4j] Neo4j-Rails and Ext-JS

2010-10-30 Thread Ahmed Abdelsalam
Hi,

 

I'm working on a project for using Neo4j as a database for JRuby-based Rails
application. I found a good example here:
http://github.com/maxdemarzi/neo4j-rails-example and I was able to start
developing my application.

 

However, I have another requirement that needs to implement the rails
application using Ext-JS library. 

 

I know that the plugin ext_scaffold is helpful in generating resources based
on Ext-JS, however, I tried this but no success. Neo4j-Rails removes the
dependency on ActiveRecord ad replaces it with Neo4J as a database, while
the ext-scaffold plugin requires ActiveRecord.

 

Any help on this? Thank you in advance.

 

Regards,

 

Ahmed Abdelsalam

 

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


[Neo4j] Indirection

2010-10-30 Thread Andres Taylor
Guys,

I'm trying to grokk the code. In a couple of places, there are indirections
that I don't understand. Like EmbeddedGraphDatabase, which is, as far as I
can see, mostly a thin wrapper around EmbeddedGraphDatabaseImpl. Why is
this?

Andrés
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Indirection

2010-10-30 Thread Chris Gioran
On Sat, Oct 30, 2010 at 12:51 PM, Andres Taylor
andres.tay...@neotechnology.com wrote:
 Guys,

 I'm trying to grokk the code. In a couple of places, there are indirections
 that I don't understand. Like EmbeddedGraphDatabase, which is, as far as I
 can see, mostly a thin wrapper around EmbeddedGraphDatabaseImpl. Why is
 this?

 Andrés

I second that. It isn't like there is a factory in
EmbeddedGraphDatabase that will provide different implementations of
something based on the Config (besides, the read-only vs the full r/w
db issue is handled differently). The EmbeddedGraphDatabaseImpl field
is hardwired there. I can only assume this was supposed to (or will?)
augment the GraphDatabaseService interface with operations other that
the EmbeddedGraphDatabaseImpl ones, given that the latter does not
implement that.

I also have difficulty grasping the EventConsumers concept. They are
created in the XaConnection only to be stored in the
NioNeoDbPersistenceSource.NioNeoDbResourceConnection and then used to
forward calls about primitives. Why is that level of abstraction
necessary? I think it would be cleaner and without loss of
extensibility for the ResourceConnection to forward directly to the
XaConnection. But I admit there are many things happening there, I may
be missing something.

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


Re: [Neo4j] Neo4j-Rails and Ext-JS

2010-10-30 Thread Anders Nawroth
Hi!

I think you should try asking over here:
http://groups.google.com/group/neo4jrb


/anders

2010-10-30 09:19, Ahmed Abdelsalam skrev:
 Hi,



 I'm working on a project for using Neo4j as a database for JRuby-based Rails
 application. I found a good example here:
 http://github.com/maxdemarzi/neo4j-rails-example and I was able to start
 developing my application.



 However, I have another requirement that needs to implement the rails
 application using Ext-JS library.



 I know that the plugin ext_scaffold is helpful in generating resources based
 on Ext-JS, however, I tried this but no success. Neo4j-Rails removes the
 dependency on ActiveRecord ad replaces it with Neo4J as a database, while
 the ext-scaffold plugin requires ActiveRecord.



 Any help on this? Thank you in advance.



 Regards,



 Ahmed Abdelsalam



 ___
 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


Re: [Neo4j] Moving a DB from one machine to another...

2010-10-30 Thread Craig Taverner
Hi Axel,

GeoJSON and other GIS formats are planned to be supported in Neo4j Spatial.
In fact to support export to GeoJSON on the current code would be very easy,
I believe. I hope to get 'round to it soon. However, should you want to give
it a try now, I would be more than willing to give advice and pointers.

Regards, Craig
On Oct 29, 2010 10:44 PM, Axel Morgner a...@morgner.de wrote:
 GraphML, not KMK, of course. Maybe I wrote this because I'm looking for
 KML and geoJSON export/import for neo4j data myself.


 On Fri, 29 Oct 2010 21:49:04 +0200, Peter Neubauer
 peter.neuba...@neotechnology.com wrote:
 Hi there,
 yes, the Neo4j Admin tool (we hope to package it in the next
 milestone) includes GraphML export/import. Besides, Alex is right,
 file copy on a clean shut down DB works just fine. For hot production
 use, you can choose Online Backup
 (http://wiki.neo4j.org/content/Online_Backup) or the upcoming HA to
 several slaves (part of the next milestone, too, still not totally
 finished testing).

 Would anything of this work for you?

 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://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.



 On Fri, Oct 29, 2010 at 9:18 PM, Axel Morgner a...@morgner.de wrote:
 Hi Chris,

 moving a neo4j db as an archived directory between different machines
 is
 fine. Normally, there's no need to remove any files from within the
 neo4j
 directory. Just make sure to archive the db while it's completely shut
 down. And take care of the access rights the files and the containing
 directory have. I had some issues with that when moving between a
 Windows
 and a Linux machine. Personally, I use 7-zip [1] on Windows and p7zip
 [2]
 on Unix as it has the highest compression rates.

 In addition, there might be other ways to import/export data, f.e. the
 KML
 export contained in the webadmin tool.

 Axel

 [1] http://www.7-zip.org/
 [2] http://p7zip.sourceforge.net/

 On Fri, 29 Oct 2010 12:02:02 -0700, Chris Diehl cpdi...@gmail.com
 wrote:
 Hi All,

 I have a neo4j DB on my laptop that I need to share copies of with
 others.
 As a first shot I tar'ed and ziped up the contents of the DB directory
 and
 gave it to my colleague (MacBook Pro - Windows laptop). Initially he
 got
 errors when trying to access it. So on a whim, he deleted all the
 files
 with
 'log' in their name. Then, after some complaints about needing to
 recover,
 all seemed well.

 I'm wondering if there is a more principled way of moving a DB from
 one
 machine to another short of this hack or going through a GraphML
 export/import sequence.

 Any suggestions?

 Chris
 ___
 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


Re: [Neo4j] Neo4j Spatial question

2010-10-30 Thread Craig Taverner
Hi Axel,

I was away on a trip for a couple of days and did not see this discussion
until now. I see several people have had good advice for you already. I
think I can add to the discussion with some suggestions.

Your original description says two things of interest, there is a GeoJSON
document for all countries (as multi-polygons) and there is an existing
neo4j database of all CMS data. I'm not sure what you mean by CMS data? Is
this an unrelated content management system, and so you are only saying that
you have exerience with neo4j in general, or is this data you wish to use in
a spatial context (together with the world map)? In the former case, I guess
we are only talking about a GeoJSON importer, in the later we are talking
about using Neo4j Spatial to expose spatial information in your existing
database, which is a good use case for Neo4j Spatial, so would be good to
do. Either way, I think the job is not too big.

For the GeoJSON importer, you could write a generic importer supporting the
full GeoJSON spec, or you could write one specific to your case of only
processing multi-polygons for countries.

Another factor to consider, if you model your importer on the code in the
shapefile importer, you will create a database structure somewhat
reminiscent of postgis, with each geometry saved as a WKB blob in a node of
the database. In this case the primary use of Neo4j is for the RTree index.
However, I personally think it would be nicer (better) to store the
world-map as a single connected graph, so that countries that share boarders
actually share the nodes along those boarders. Our OSMImporter for Open
Street Map maintains the OSM graph in Neo4j, as well as exposes individual
geometries for those tools that require them (eg. renderers). You could do a
similar thing if you had a data source that contained that topology. Normal
GeoJSON, however, does not, since it describes each feature or geometry as a
separate object, with no spatial relationship to any other object. Is
GeoJSON the main data source, or can you get a more topologically connected
data source from polymaps?

So, to summarize the options:

   - Write a plain GeoJSON importer that imports to individual WKB
   geometries - very simple, could even base on a raw JSON library and write a
   small mapping layer for your Geometries using JTS, or you could use a
   GeoJSON library like the GeoTools one already suggested
   - Write your own new data model, maintaining connectivity to your other
   data (if that exists) and a 'better' world map graph.
   - If you do not have access to a fully connected world map of countries,
   perhaps using OSM data for this is an alternative to your current data
   source.

Regards, Craig
On Fri, Oct 29, 2010 at 3:30 PM, Axel Morgner a...@morgner.de wrote:

 Thanks a lot, I'll give it a try soon.

 Am 29.10.2010 08:58, schrieb Jan Boonen:
  Hi Axel,
 
  The FeatureJSON class of GeoTools
  (
 http://docs.geotools.org/latest/javadocs/org/geotools/geojson/feature/FeatureJSON.html
 )
  should be able to do the work. Look at the code example in the Javadocs
  to see if this is what you need.
 
  In order to connect it to neo4j, you could use the code from the
  Shapefile importer.
 
  Cheers,
 
  Jan
 
 
  On 28-10-2010 17:24, Peter Neubauer wrote:
  some example on reading in a FeatureColllection from GeoJSON, but the
 
  ___
  Neo4j mailing list
  User@lists.neo4j.org
  https://lists.neo4j.org/mailman/listinfo/user


 --
 Axel Morgner

 Creative Solutions - Software Engineering
 GUI  UX Design - Project Management

 c/o inxire GmbH
 Hanauer Landstr. 293a
 60314 Frankfurt
 Germany

 Phone   +49 151 40522060
 E-mail  a...@morgner.de
 Web http://morgner.de






 ___
 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