Git Product home page Git Product logo

closerl's Introduction

Closerl

This library is a bridge between Clojure and Erlang using the library JInterface.

The library is a simple wrapper around JInterface. I'm writing it as a way to learn Clojure.

So far the capabilities are really simply. My goal is to add more features while I learn more Clojure. Feel free to comment on the coding style, on how I can improve it to be more idiomatic Clojure.

Usage

First launch erlang with the following command:

erl -sname a

Start the Clojure REPL

Then at the Clojure REPL:

(use 'closerl.core)

(def self (otp-self "b"))

(def peer (otp-peer "a@mrhyde"))

Once we have the nodes we can try to connect them:

(def conn (otp-connect self peer))

Then we do a rpc_call to obtain the date on the remote node:

(otp-rpc-call conn "erlang" "date")

And we call receive to fetch the reply:

(otp-rpc-receive conn)

For more details see introductory blogpost here

Installation

Use mvn to install JInterface. Adapt the following command to suit your specific configuration

mvn install:install-file -DgroupId=com.ericsson.otp -DartifactId=erlang -Dversion=1.5.3 -Dpackaging=jar -Dfile=/usr/local/lib/erlang/lib/jinterface-1.5.3/priv/OtpErlang.jar

Obtain the closerl source code

git clone http://github.com/videlalvaro/closerl.git
cd closerl
lein deps

License

MIT - See LICENSE

The code for marshaling Java to Clojure is based on trixx

TODO

  • Write marshaling functions
  • Write several RPC and Receive functions
  • Write send to PID and send to name functions

closerl's People

Contributors

videlalvaro avatar

Watchers

James Cloos avatar Gary Paige avatar

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.