Yes,
It's more like configuration and other potential metadata.Send from a device with crappy keyboard and autocorrection.
/peter
On Feb 29, 2012 10:25 PM, "Josh Adell" <josh....@gmail.com> wrote:So this isn't user data about the graph as a whole, but rather
configuration data the graph/server uses to manage itself. Is having
user data at graph-level (instead of just the node-/relationsip-level)
something that anyone would have a use for?
-- Josh
On Feb 29, 12:51 pm, Michael Hunger <michael.hun...@neotechnology.com>
wrote:
> I think it is not exposed by intent, as it is rather for "internal" config + metadata of the graph.
>
> Michael
>
> Am 29.02.2012 um 18:49 schrieb Josh Adell:
>
>
>
>
>
>
>
> > Is this exposed via the REST API? Could it be? Maybe doing a GET on "/
> > db/data/" gives it back as a JSON map called "data" along with all the
> > endpoints and server version.
>
> > -- Josh
>
> > On Feb 29, 11:59 am, Peter Neubauer <peter.neuba...@neotechnology.com>
> > wrote:
> >> Yes,
> >> same semantics as normal stuff, just without the requirement to be
> >> attached to a PropertyContainer.
>
> >> Cheers,
>
> >> /peter neubauer
>
> >> G: neubauer.peter
> >> S: peter.neubauer
> >> P: +46 704 106975
> >> L: http://www.linkedin.com/in/neubauer
> >> T: @peterneubauer
>
> >> Neo4j 1.6 released - dzone.com/6S4K
> >> The Neo4j Heroku Challenge -http://neo4j-challenge.herokuapp.com/
>
> >> On Wed, Feb 29, 2012 at 5:57 PM, Marko Rodriguez <okramma...@gmail.com> wrote:
> >>> Howdy,
>
> >>>> There are graph properties in since about early 1.6 which are intended for configuration and/or metadata. This is also transferred cross-cluster and in backups.
>
> >>> Just to be certain:
> >>> 1. Is it thread safe?
> >>> 2. Is it transactional? -- persisting is based on success/failure of a transaction.
>
> >>> Thank you,
> >>> Marko.
>
> >>>http://markorodriguez.com
>
> >>> On Feb 29, 2012, at 9:18 AM, Michael Hunger wrote:
>
> >>>> There are graph properties in since about early 1.6 which are intended for configuration and/or metadata. This is also transferred cross-cluster and in backups.
>
> >>>> AbstractGraphDatabase or GraphDatabaseSPI graph;
>
> >>>> PropertyContainer properties = graph.getKernelData().properties();
> >>>> properties.getProperty("key", "default");
>
> >>>> Michael
>
> >>>> Am 29.02.2012 um 16:29 schrieb Marko Rodriguez:
>
> >>>>> Hi,
>
> >>>>> Is there a way to store "metadata" with the graph. I don't want to make a node and add properties to it. However, I want to have (lets say) a Map that is simply serialized/transacted upon like other data in the graph, but not actually be graph data.
>
> >>>>> Thanks,
> >>>>> Marko.
>
> >>>>>http://markorodriguez.com
If you are embedded, you use internal classes if you can. If you use
REST, you write some Scripting language on the server side, or a
server plugin to provide additional REST endpoints not part of the
official API. Not a big issues IMHO.
The only way to bring the Java and non-native APIs on the same level
as I see it is via some language-independent declarative approach.
That is why we are working on mutating Cypher, amongst other reasons
(like much better remoting capabilities etc). This will make all
bindings first class citizens API (if stil not totally performance
wise), since ALL access to Neo4j then potentially could go via the
same (declarative) API. That is not feasible in the short term, but I
think you see the pattern.
Does that make sense?
Cheers,
/peter neubauer
G: neubauer.peter
S: peter.neubauer
P: +46 704 106975
L: http://www.linkedin.com/in/neubauer
T: @peterneubauer
Neo4j 1.6 released - dzone.com/6S4K
The Neo4j Heroku Challenge - http://neo4j-challenge.herokuapp.com/
Apologies if this is derailing the thread, but I notice a pattern where the REST API tends to get arguably less love than Neo4j embedded.As a web developer, it's a bit disappointing -- I don't want to have to fire up a Java IDE, write Java and run my own custom Java app just to use Neo4j as a database.(Imagine if MySQL required you to write C/C++ to customize this or that!)I know it's not quite black or white, and I know there are philosophical differences at play; just tossing out an observation that's been building up from my end for a long time.
>>> from bulbs.neo4jserver import Graph >>> g = Graph() >>> g.scripts.update(scripts_file_path)
>>> script = g.scripts.get('your_custom_query') >>> params = dict(_id=3) >>> elements = g.gremlin.query(script, params) >>> element = elements.next() >>> script = g.scripts.get('your_custom_command') >>> params = dict(_id=5) >>> resp = g.gremlin.command(script, params)
>>> g.scripts.refresh()
def save_blog_entry = {entry = create_or_update_vertex(entry_bundle, "docid");author = g.v(author_id)found = entry.out("author").filter{it == author}.count()if (!found) { g.addEdge(entry, author, "author"); }for (topic_bundle in topic_bundles) {topic = get_or_create_vertex(topic_bundle, "name");found = entry.out("tagged").filter{it == topic}.count()if (!found) { g.addEdge(entry, topic, "tagged"); }}return entry;}return transaction(save_blog_entry);}
Cheers,
/peter neubauer
G: neubauer.peter
S: peter.neubauer
P: +46 704 106975
L: http://www.linkedin.com/in/neubauer
T: @peterneubauer
Neo4j 1.6 released - dzone.com/6S4K
The Neo4j Heroku Challenge - http://neo4j-challenge.herokuapp.com/
Is there any way to create, edit and remove nodes and relationships
using just Cypher or Gremlin?
--
Javier de la Rosa
http://versae.es
Cypher is in the process of adding full CRUD, stay tuned. See
https://docs.google.com/document/d/1fs8gM4KDIsJ9XNbbUtPi9Pyo25KxjeIovmMcyk08liw/edit
for what it could look like.
Cheers,
/peter neubauer
G: neubauer.peter
S: peter.neubauer
P: +46 704 106975
L: http://www.linkedin.com/in/neubauer
T: @peterneubauer
Neo4j 1.6 released - dzone.com/6S4K
The Neo4j Heroku Challenge - http://neo4j-challenge.herokuapp.com/
def transaction = { final Closure closure ->g.setMaxBufferSize(0);g.startTransaction();try {results = closure();g.stopTransaction(TransactionalGraph.Conclusion.SUCCESS);return results;} catch (e) {g.stopTransaction(TransactionalGraph.Conclusion.FAILURE);return e;}}
I like the idea of transaction closures. It is a really clean model. Is it an issue in Gremlin GitHub?
Marko.
I like the idea of transaction closures. It is a really clean model. Is it an issue in Gremlin GitHub?