Git Product home page Git Product logo

archimedes's Introduction

Archimedes, a Clojure Library For Tinkerpop Blueprints

Archimedes is a Clojure library for working with graphs that conform to the Tinkerpop Blueprints interface.

Project Goals

  • Provide an API that makes Tinkerpop Blueprints really easy to use from Clojure
  • Be reasonably feature complete
  • Don't introduce any significant amount of performance overhead

Community

Discussion about Archimedes takes place on the Titanium mailing list Feel free to join in and ask any questions you may have.

Artifacts

Archimedes artifacts are released to Clojars. If you are using Maven, add the following repository definition to your pom.xml:

<repository>
  <id>clojars.org</id>
  <url>http://clojars.org/repo</url>
</repository>

The Most Recent Release

With Leiningen:

[clojurewerkz/archimedes "2.5.0.0"]

With Maven:

<dependency>
  <groupId>clojurewerkz</groupId>
  <artifactId>archimedes</artifactId>
  <version>2.5.0.0</version>
</dependency>

Documentation & Examples

Archimedes documentation guides are not ready yet.

Code Examples

Our test suite has many code examples.

Supported Clojure Versions

Archimedes is built from the ground up for Clojure 1.4 and up. The most recent stable release is always recommended.

Continuous Integration

Build Status

Development

Archimedes uses Leiningen 2. Make sure you have it installed and then run tests against supported Clojure versions using

lein all test

Then create a branch and make your changes on it. Once you are done with your changes and all tests pass, submit a pull request on Github.

License

Copyright (C) 2013-2016 Zack Maril and the ClojureWerkz Team

Licensed under the Eclipse Public License (the same as Clojure).

archimedes's People

Contributors

m0smith avatar michaelklishin avatar ray-metail avatar ray1729 avatar zmaril avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

archimedes's Issues

Provide a way to print "Eureka" to stdout

I'd expect from a library with such a name to provide a way to shout "Eureka!" one way or another. According to the legend, Archimedes rushed home from a bath after discovering the way to measure volume of irregular objects. I therefore propose the function do something just
as awkward: just print "Eureka" to stdout, in all capital letters.

Support storing properties where the value is a vector to TinkerPop

Make it possible to store clojure vectors as values of vertices.

As the Gremlin javadocs says about properties:

The key of a property is always a String and the value of a property is an arbitrary Java object. Each underlying graph engine will typically have constraints on what Java objects are allowed to be used as values.

And https://tinkerpop.apache.org/javadocs/current/core/org/apache/tinkerpop/gremlin/structure/VertexProperty.Cardinality.html indicates that a property may contain a single value, a list of values, or a set of values. Currently we call flatten which destroys any collection here

(apply assoc! (cons elem (flatten (into [] d)))))

connect! fails with No matching method found: addEdge

in alpha5, edge/connect! fails using TinkerGraph
topoged.data.blueprints> (e/connect! (first v) :dummy (second v))
IllegalArgumentException No matching method found: addEdge for class com.tinkerpop.blueprints.impls.tg.TinkerGraph
clojure.lang.Reflector.invokeMatchingMethod (Reflector.java:53)

but edge/connect-with-id! works

topoged.data.blueprints> (e/connect-with-id! "id" (first v) :dummy (second v))

<TinkerEdge e[id][18-dummy->19]>

Support has-not

query ns should add has-not function, wrapping com.tinkerpop.blueprints.Query/hasNot

Refactor to not use var

Due to complications with dynamic vars, it is very hard to get Titanium to use the latest version of Archimedes. Additionally, best practices dictate that it is more useful to have methods that take the database connection as an argument instead of dynamically reassigning the graph. Thus something like (add-vertex) would become (add-vertex graph). This isn't too hard to implement, mostly just boxing text around.

The main issue is making sure that transactions are implemented properly. My initial reaction is to provide a transaction function that takes in a graph and a function to execute.

Some pseudo code:

(defn transact! [graph f]
  (let [t (.newTransaction graph)]
    (try (let [results (f t)]
           (.commit t)
           results)
         (catch Exception e (.rollback t)))))
(transact! graph (fn [graph] (add-vertex graph)))
;= Vertex[1]     

I'd like to make it not hard to use laziness inside the transactions. Right now, with something like the above, a map in the provided function could potentially execute after the transactions has been committed. That's the main blocking point for me right now, making the transactions work with lazy sequences properly.

Decouple Ogre from Archimedes

Refactor edge/edges-between to just use vertex queries. Shouldn't be all that hard and will make development easier.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.