Starting with Titanium....

45 views
Skip to first unread message

jerome moliere

unread,
Aug 16, 2014, 11:39:39 AM8/16/14
to clojure-...@googlegroups.com
Hi all ,
I am starting with Clojure (slowly) & I 'd like to make an application using graph db.So I found Titanium .
I just started to use this library but can't figure why it does not work.Before going deeper with details of my problems , I 'd like to have 
your point of view regarding Titanium & the Clojure Gremlin wrapping.I am found of Gremlin & if the project is usable I would be happy to use it.
Regarding my problem I am following official docs but every tg/open calls fails with a NPE . StackTrace is not very useful (for me):

                     graph.clj:   16  weather-app.graph/setup-graph-db!
                          REPL:    1  weather-app.logging/eval5217
                 Compiler.java: 6703  clojure.lang.Compiler/eval
                 Compiler.java: 6666  clojure.lang.Compiler/eval
                      core.clj: 2927  clojure.core/eval
                      main.clj:  239  clojure.main/repl/read-eval-print/fn
                      main.clj:  239  clojure.main/repl/read-eval-print
                      main.clj:  257  clojure.main/repl/fn
                      main.clj:  257  clojure.main/repl
                   RestFn.java: 1096  clojure.lang.RestFn/invoke
        interruptible_eval.clj:   56  clojure.tools.nrepl.middleware.interruptible-eval/evaluate/fn
                      AFn.java:  152  clojure.lang.AFn/applyToHelper
                      AFn.java:  144  clojure.lang.AFn/applyTo
                      core.clj:  624  clojure.core/apply
                      core.clj: 1862  clojure.core/with-bindings*
                   RestFn.java:  425  clojure.lang.RestFn/invoke
        interruptible_eval.clj:   41  clojure.tools.nrepl.middleware.interruptible-eval/evaluate
        interruptible_eval.clj:  171  clojure.tools.nrepl.middleware.interruptible-eval/interruptible-eval/fn/fn
                      core.clj: 2402  clojure.core/comp/fn
        interruptible_eval.clj:  138  clojure.tools.nrepl.middleware.interruptible-eval/run-next/fn
                      AFn.java:   22  clojure.lang.AFn/run
       ThreadPoolExecutor.java: 1145  java.util.concurrent.ThreadPoolExecutor/runWorker
       ThreadPoolExecutor.java:  615  java.util.concurrent.ThreadPoolExecutor$Worker/run
                   Thread.java:  745  java.lang.Thread/run

The first line is in my code & is the tg/open call. I have tried with a simple in memory back end & with a Oracle Berkeley Db but same result.
This is the perfect place to add another question: do you use debian machines ? If yes , are you using the Berkeley db packages or do you install the recent Oraacle distributions?
I've configured & compiled the latest Oracle version but I may have made one error ?

Thanks for your help
Kind regards
Jerome

PS:
I am using Clojure 1.6.0 with JDK 1.7.0.65 on Debian Wheezy up to date (64 bits version) . For development I am using Emaacs Prelude with latest Cider package.

Michael Klishin

unread,
Aug 19, 2014, 6:12:35 AM8/19/14
to jerome moliere, clojure-...@googlegroups.com
 On 16 August 2014 at 20:34:57, jerome moliere (jerome....@gmail.com) wrote:
> > I am following official docs but every tg/open calls fails with
> a NPE . StackTrace is not very useful (for me):
>
> graph.clj: 16 weather-app.graph/setup-graph-db!
> REPL: 1 weather-app.logging/eval5217
> Compiler.java: 6703 clojure.lang.Compiler/eval
> Compiler.java: 6666 clojure.lang.Compiler/eval
> core.clj: 2927 clojure.core/eval
> main.clj: 239 clojure.main/repl/read-eval-print/fn

There are no Titanium or Titan mentions in this stack trace. Please post the exact
code you have.

Also, I hope you have seem the disclaimer that Titanium/Ogre/Archimedes are
not being actively developed and need a major update to use a recent Titan/Tinkerpop
version.

So I'd just use Neocons instead: http://clojureneo4j.info.
--
@michaelklishin, github.com/michaelklishin

jerome moliere

unread,
Aug 19, 2014, 6:19:43 AM8/19/14
to Michael Klishin, clojure-...@googlegroups.com
Hi Michael
thanks for your answer .
It seems that was a stupid () inside my program , I simplified the code and I removed the error.
Moreover there was a problem inside my logging configuration and it turns out that Titanium did its job.
Do you seek volunteers for improving Titanium?
Thanks for the purposal but I don't like Neo4J much they have a billing policy too agressive and they don't have a clean open source policy so I prefer to stick to alternate databases (OrientDb  for instance or Titan)

Kind regards
Jerome

J.MOLIERE - Mentor/J

Ray Miller

unread,
Aug 19, 2014, 6:58:38 AM8/19/14
to jerome moliere, Michael Klishin, clojure-...@googlegroups.com
Hello Jerome,

Development is not completely stalled - I have an archimedes branch
(humbled-transactions) that updates to blueprints 2.4.0 and titan
0.4.4, and a corresponding titanium branch archimedes-api-change. The
problem is, I'm not sure what to do next to move these projects
forward. There doesn't seem to be an active user base for Titanium,
very little activity on the mailing list and few issues raised in
Github.

I'd really like to see these new branches rolled into a release, and
to encourage use, feedback and bug reporting so we can improve the
libraries, but I'm not sure how to make this happen. I still have some
time to dedicate to this project and, like you, am keen to see a fully
open-source graph database more widely adopted.

Ray.
> --
> You received this message because you are subscribed to the Google Groups
> "Clojure Titanium" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure-titani...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Michael Klishin

unread,
Aug 19, 2014, 7:02:03 AM8/19/14
to jerome moliere, Ray Miller, clojure-...@googlegroups.com
 On 19 August 2014 at 14:58:37, Ray Miller (r...@1729.org.uk) wrote:
> > Development is not completely stalled - I have an archimedes
> branch
> (humbled-transactions) that updates to blueprints 2.4.0 and
> titan
> 0.4.4, and a corresponding titanium branch archimedes-api-change.
> The
> problem is, I'm not sure what to do next to move these projects
> forward. There doesn't seem to be an active user base for Titanium,
> very little activity on the mailing list and few issues raised
> in
> Github.
>
> I'd really like to see these new branches rolled into a release,
> and
> to encourage use, feedback and bug reporting so we can improve
> the
> libraries, but I'm not sure how to make this happen. I still have
> some
> time to dedicate to this project and, like you, am keen to see a
> fully
> open-source graph database more widely adopted.

Ray,

Sorry, perhaps I missed something but I thought the work isn't finished.
If it is, I'll certainly be more than happy to go through documentation
updates and cut a release.

Also, we have someone from the Tinkerpop team interested in helping
(by writing Clojure code and reviewing the API) with Titanium/Archimedes/Ogre.
--
@michaelklishin, github.com/michaelklishin

Ray Miller

unread,
Aug 19, 2014, 7:12:46 AM8/19/14
to Michael Klishin, clojure-...@googlegroups.com
Hi Michael,

On 19 August 2014 12:01, Michael Klishin <michael....@gmail.com> wrote:
>
> Sorry, perhaps I missed something but I thought the work isn't finished.
> If it is, I'll certainly be more than happy to go through documentation
> updates and cut a release.

I'm also guilty for not following this through. Let me run through the
code again and make sure all the tests are passing. I'll clean up any
loose ends and let you know when I think it's ready for release. I'm
on holiday this week so should have plenty of time :-)

> Also, we have someone from the Tinkerpop team interested in helping
> (by writing Clojure code and reviewing the API) with Titanium/Archimedes/Ogre.

I've been working on Titanium and Archimedes, as far as I could see
Ogre works with the new versions without any changes. Did you have any
particular changes in mind for Ogre itself?

Ray.

Michael Klishin

unread,
Aug 19, 2014, 7:16:53 AM8/19/14
to Ray Miller, clojure-...@googlegroups.com
 On 19 August 2014 at 15:12:45, Ray Miller (r...@1729.org.uk) wrote:
> > I'm also guilty for not following this through. Let me run through
> the
> code again and make sure all the tests are passing. I'll clean
> up any
> loose ends and let you know when I think it's ready for release.
> I'm
> on holiday this week so should have plenty of time :-)

Thank you. Just submit PRs for all 3 and I'll merge them.

> I've been working on Titanium and Archimedes, as far as I could
> see
> Ogre works with the new versions without any changes. Did you
> have any
> particular changes in mind for Ogre itself?

Nothing I can think of.
--
@michaelklishin, github.com/michaelklishin

Ray Miller

unread,
Aug 19, 2014, 7:17:52 AM8/19/14
to Michael Klishin, clojure-...@googlegroups.com
I remember now where I got to...

All Titanium unit tests are passing individually (with 'lein test
namespace') but there's a problem with clean-up or preserved state
between tests that prevents a clean run with 'lein test'. I'll sort
this out (probably by switching to BerkeleyDB for the unit tests and
using Cassandra only for the integration test). Will drop a line here
when it's all working.

Ray.

Michael Klishin

unread,
Aug 19, 2014, 7:26:35 AM8/19/14
to Ray Miller, clojure-...@googlegroups.com


On 19 August 2014 at 15:17:52, Ray Miller (r...@1729.org.uk) wrote:
> > All Titanium unit tests are passing individually (with 'lein
> test
> namespace') but there's a problem with clean-up or preserved
> state
> between tests that prevents a clean run with 'lein test'. I'll
> sort
> this out (probably by switching to BerkeleyDB for the unit tests
> and
> using Cassandra only for the integration test). Will drop a line
> here
> when it's all working.

Sure. Using BerkeleyDB is fine. We can have a separate integration test
for Cassandra 2.x, guarded by Leiningen's test selectors. 
--
@michaelklishin, github.com/michaelklishin

jerome moliere

unread,
Aug 19, 2014, 7:30:43 AM8/19/14
to Michael Klishin, Ray Miller, clojure-...@googlegroups.com
Hi all ,
thanks Ray for the details.
I would be happy to test , improve documentation or even contribute with your guidance.

Kind regards
Jerome

J.MOLIERE - Mentor/J

Ray Miller

unread,
Aug 19, 2014, 11:57:00 AM8/19/14
to jerome moliere, Michael Klishin, clojure-...@googlegroups.com
Hmm, I thought I'd take the opportunity to update to Blueprints 2.5.0
and Titan 0.5.0 (partly because I couldn't find the Titan 0.4.4
documentation, but also because we may as well make our next release
with the latest versions). Archimedes worked with one simple change,
but there are some API changes that break Titanium. I should have
these fixed in a day or two, then we can think about a release.

Jerome - thank you for you offer to help: testing and bug reporting
(and fixing!) much appreciated, but you may want to hold off until I
have everything working against Titan 0.5.0 and merged back into
master.

Ray.

jerome moliere

unread,
Aug 19, 2014, 1:49:16 PM8/19/14
to Ray Miller, Michael Klishin, clojure-...@googlegroups.com
So Ray , please do not hesitate to call me back when something is ready.
Kind regards
jerome

J.MOLIERE - Mentor/J

Ray Miller

unread,
Aug 20, 2014, 12:46:05 PM8/20/14
to clojure-...@googlegroups.com
It's taking longer than I anticipated to update Titanium to Titan
0.5.0, mainly because there are breaking API changes in Titan around
schema definitions (edge and vertex labels, properties and indices).

Previously, you could create a property and specify whether or not it
should be indexed in a single API call, but with Titan 0.5.0 the
property and index configuration has been decomplected. As we are
making breaking API changes in the next Titanium release, I thought
this was a good opportunity to deprecate clojurewerkz.titanium.types
in favour of clojurewerkz.titanium.schema; this latter namespace more
closely reflects the Titan API. This commit shows the impact of the
API change on vertex_test.clj:
https://github.com/clojurewerkz/titanium/commit/860cd9042cc380e6e995349c78470134f9072c00#diff-d41d8cd98f00b204e9800998ecf8427e

Anyhow, I've got the new schema namespace tested fairly thoroughly,
and all that remains now is to fix the failing tests in
graph_test.clj.

There is scope for adding some sugar on top of
clojurewerkz.titanium.schema, maybe re-introducing some helper
functions similar to the deftype and deflabel, but I think that's
something to consider post-release, if there is demand for such a
thing.

As always, comments welcome.

Ray.
Reply all
Reply to author
Forward
0 new messages