Giter VIP home page Giter VIP logo

gcloud's Introduction

Getting gcloud Datastore working in Clojure

This is a quick little demo of getting gcloud working in Clojure.

The issue is that Clojure makes heavy use of reflection. The gcloud library makes heavy use of the builder pattern. Although the builder pattern serves some purpose in Java, in a highly reflective language like Clojure it can cause problems due to a bug in Java that has existed for 15+ years. I wouldn't hold my breath that it is going to be fixed anytime soon. :)

The work around is to build the objects you need in java, compile them using javac, and then import them into Clojure. Super super lame, but there it is.

Additional Refs: http://stackoverflow.com/questions/38059977/cant-call-public-method-of-non-public-class-public-google-gcloud-library

Setup

You will need SERVICE_ACCOUNT_PATH and PROJECT_ID environment varibles.

# gcloud-datastore-clojure
export SERVICE_ACCOUNT__PATH=./<project-id>_service_account.json
export PROJECT_ID=<project-id>

Then just get the project, cd into it, and run it.

$ git clone [email protected]:samedhi/gcloud.git
$ cd gcloud
$ boot javac

gcloud's People

Contributors

samedhi avatar

Watchers

 avatar James Cloos 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.