Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
05-27-2019 02:13 AM
If you're looking for a Perl 5 driver for Neo4j, here are two options:
The first one has been around for several years, and includes an OGM style interface, batch processing, and the ability to apply application-level constraints (similar to a schema). However, it hasn't been updated for a while, and seems to have a memory leak, which can be a problem with long-running applications.
The second option is much newer and has fewer features, but it does not rely on the legacy Cypher endpoint, which is apparently due to disappear in Neo4j 4.x. It is also currently described as "pre-release" quality. However I have had good success using it for a while, and would recommend it over the first one. (You may want to increase the HTTP timeout from the default 6 seconds.)
05-29-2019 01:01 AM
Haven't used Perl the last 15 years, but quick internet research pointed me to https://github.com/majensen/perlbolt - maybe that's what you're looking for.
05-29-2019 01:35 AM
Thanks Stefan! I missed that one. Will give it a try. (It looks like Neo4j::Driver is able to integrate with Neo4j::Bolt in order to provide a Bolt transport option in addition to the default HTTP, although Neo4j::Bolt is not yet available on CPAN.)
10-18-2019 06:26 AM
Hi @stephen.hall, I'm the author of Neo4j::Driver. Glad you had success with it.
Back in May, you suggested a default HTTP timeout of 6 seconds might be too short. At the time, I was actually considering to make it even shorter. Could you elaborate on the specific use case for a longer timeout? Which value would be appropriate in your case?
Cheers,
Arne
10-18-2019 06:57 AM
Hi Arne,
Yes, Neo4j::Driver has been working very well for me. (It's good to see it's being actively maintained on CPAN too!) My suggestion regarding the HTTP timeout was because I'm using it in long-running data-loading scripts (some take several days), where the network connection between the machine running the script and the server can be a bit flaky. So I bump the timeout up to 60 seconds, just in case. Of course, a much better approach to handling network dropouts would be to wrap the driver calls with something like Try::Tiny::Retry, but I haven't got around to that yet, being lazy by nature
Regards,
Stephen
10-18-2019 07:32 AM
Hi Stephen,
thanks for your feedback! I'm leaning towards keeping the default timeout at 6s. But I will make sure not to remove the option to change it to whatever is needed.
Anyway, speaking about Perl driver options, there's also DBD::Neo4p and REST::Cypher. But I never really tried either of those.
I guess it would be nice for neo4j.com/developer/perl to list all the options, but I'm not sure how to make that happen. Do you?
Cheers,
Arne
10-21-2019 01:19 AM
Hi Arne,
Yes, good idea. I will get in touch with Michael Hunger and suggest an update to that page.
Regards,
Stephen
10-25-2019 03:24 AM
Hi Stephen,
that's great, thanks! Please let me know if there is anything I can do.
Cheers,
Arne
03-04-2020 12:25 AM
Hi Arne,
Just to let you know that the documentation at https://neo4j.com/developer/perl/ has been updated to include Neo4j::Driver and Neo4j::Bolt.
Regards,
Stephen
All the sessions of the conference are now available online