Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Clojure as supported language #89

Closed
lucj opened this issue Sep 10, 2017 · 2 comments
Closed

Add Clojure as supported language #89

lucj opened this issue Sep 10, 2017 · 2 comments

Comments

@lucj
Copy link

lucj commented Sep 10, 2017

Hi, as Clojure is a great functional language (of the lisp family, you know with lot of parenthesis), I was thinking of adding a template for it in OpenFaaS.

Some of the benefits of Clojure:

  • based on Lisp
  • relies on the standard JVM platform
  • use JVM but do not have to write Java code :)
  • real functional language with immutable data structures
  • designed for concurrency
  • more at https://clojure.org/about/rationale

When building an application, the project.clj file defines the dependencies. It contains metadata and deps. For instance:

(defproject clojure-echo "0.1.0-SNAPSHOT"
  :description "echo function"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :dependencies [[org.clojure/clojure "1.7.0"]]
  :main ^:skip-aot clojure-echo.core
  :target-path "target/%s"
  :profiles {:uberjar {:aot :all}})

Those dependencies are installed with 'lein deps'.

To benefit from the cache when building the image, the deps can be downloaded and installed beforehand. The application can then be built and run as a jar.

@alexellis
Copy link
Member

Thank you for taking time to write out a proposal @lucj. Please could you start by creating a sample function over in the main OpenFaaS repo?

https://github.com/alexellis/faas/blob/master/sample-functions/

Please also see - #86 and #85

Alex

@lucj
Copy link
Author

lucj commented Sep 14, 2017

faas-reverse-geocoding function added to https://github.com/faas-and-furious

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants