Is the database running on a server modified as well?

If no, you can point the online-backup tool to the server database.

If yes, they will be out of sync, and you can add a transaction-event
handler on the local database. Then you get transaction-events passed
in which have the value before the operation and after the operation.
You can store them in a suitable format (e.g.) and then apply them to
the server database.

the update operations would be something like this (with precondition
checking, you can leave it off if you don't care).

MATCH (n:Node)
WHERE id(n) = id AND n.value=oldValue
SET n.value = newvalue


On 4/30/14, Koen Kleingeld <[email protected]> wrote:
> a cluster ?
>
>
> 2014-04-29 12:54 GMT+02:00 Spencer Kohan <[email protected]>:
>
>> So I'm working on an project where there's a local graph database which
>> will be modified offline, and then periodically synced with another
>> instance running on the server.  The goal would be that following a sync
>> operation, the server database should be identical to the local one.
>>
>> In a relational database, I would just query the rows in the local
>> database which have been updated since the timestamp on the newest row in
>> the server, and insert or replace them on the server side.
>>
>> client side:
>>
>> SELECT * FROM table WHERE lastUpdate > {newest row on server}
>>
>> server side:
>>
>> INSERT OR REPLACE INTO table VALUES (...)
>>
>> But this relies on being able to create rows with specific id's when new
>> records are inserted into the database so those records can later be
>> identified for updates, and id's appear to be read-only in Neo4j.
>>
>> I have considered that I could just add an id property to each node and
>> relationship, but it feels like a bit of a hack, and I'm wondering if
>> there's maybe a better or more natural way to handle it in Neo4j.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Neo4j" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Groeten / Best Regards,
>
> Koen
>
> --
> You received this message because you are subscribed to the Google Groups
> "Neo4j" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to