This discussion is archived
6 Replies Latest reply: Jan 18, 2012 4:42 AM by 910873 RSS

Bindings for other languages?

JesúsCea Newbie
Currently Being Moderated
I wonder if there is any plan to support other languages beside Java. Since the storage store the values as an opaque bytestream, I think this is perfectly possible.
  • 1. Re: Bindings for other languages?
    Charles Lamb Pro
    Currently Being Moderated
    Jesús Cea wrote:
    I wonder if there is any plan to support other languages beside Java. Since the storage store the values as an opaque bytestream, I think this is perfectly possible.
    Hello Jesús:

    We have definitely considered this possibility and yes, it is feasible (after all, it's only software). There are several different approaches that can be used to implement this.

    For now, I will say that it is perfectly reasonable to use JNI to talk to the KVStore API from other languages.

    Charles Lamb
  • 2. Re: Bindings for other languages?
    62600 Newbie
    Currently Being Moderated
    Just in case you are interested, I am learning/playing with some programming and Oracle NoSQL and wrote some very simple scripts in different languages (Jython, JRuby, Clojure, Groovy, Rhino, Java, Scala is under way) to access the database; they are under https://github.com/yeysus/14a. At the end, it all boils to Java though.
  • 3. Re: Bindings for other languages?
    greybird Expert
    Currently Being Moderated
    Wow, nice!! It's very generous of you to share this, thank you!
    --mark                                                                                                                                                                                       
  • 4. Re: Bindings for other languages?
    910873 Newbie
    Currently Being Moderated
    Dear, jesusdelvalle!

    Thank you for you examples!
    May you give some comment how use java example.
    I compile this program on my machine and try start:

    java -cp .:/opt/kv-1.2.123/lib/kvclient-1.2.123.jar Java_oraclenosql -h localhost -s kvstore -p 5000 -t ?What i must write here?
  • 5. Re: Bindings for other languages?
    62600 Newbie
    Currently Being Moderated
    Hi. First you better navigate to the directory where the java file is, then you need to change the cp variable so it reflects where you have the kvclient-1.2.123.jar file in your machine. So it would look like

    cd /path/to/Java_oraclenosql
    javac -cp .:/path/to/your/kvclient-1.2.123.jar Java_oraclenosql.java

    Then you can execute it with

    java -cp .:/opt/kv-1.2.123/lib/kvclient-1.2.123.jar Java_oraclenosql -s store_name -h host_name -p port -t

    -t does not need any argument; it means it will run a test and output the results; it will sequentially count all records, put 1 new record, get the value of the same record, putIfAbsent a new record, putIfPresent the old record, iterate for a major key component, delete the 2 new records it created in between, and count all records again so you are sure your database was not contaminated by the test. I am adding a new argument, "operation", so the same functions can be called from the command line with values chosen by the user; this will be ready probably tomorrow.

    I am also experimenting with some synchronization and some bioinformatics and a log file data import / export / analysis, but this will take some more days.
  • 6. Re: Bindings for other languages?
    910873 Newbie
    Currently Being Moderated
    jesusdelvalle,

    Thank you!
    I will wait with impatience!

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points