relevance / diametric

Diametric is a library for building schemas, queries, and transactions for Datomic from Ruby objects.
MIT License
169 stars 28 forks source link

Extend support for storage configurations over Peer connection? #41

Closed desaperados closed 10 years ago

desaperados commented 10 years ago

Connecting via Peer doesn't seem to support pro storage:

uri = "datomic:ddb://us-east-1/<dynamo-db-name>/<db>?aws_access_key_id=<key>&aws_secret_key=<secret>"
Diametric::Persistence::Peer.create_database(uri)
RuntimeError: Datomic Error: :protocol/unsupported Unsupported protocol :ddb
from diametric/DiametricPeer.java:83:in `create_database'

and

Diametric::Persistence::Peer.connect(uri)
RuntimeError: Failed to create connection
from diametric/DiametricPeer.java:71:in `connect'

Whilst I can connect via the datomic shell using the same uri without issue:

datomic % conn = Peer.connect(uri);
<{:db-id "sampledb-cdda2a0d-3952-49c9-bfb6-adf581d520d7", :unsent-updates-queue 0, :pending-txes 0, :next-t 1000, :basis-t 62, :index-rev 0, :index-root {:rev 0, :key "5293bcf5-617c-438d-a204-6c09d5f6c5a6"}, :log-root {:rev 1, :key "5293bcf9-c604-484c-aed4-2ed33c698074"}}>

Am I missing something here or are there limitations on the diametric Peer library?

yokolet commented 10 years ago

That error happens when Diametric uses free version of datomic libraries and given a url of a pro version.

It's been a while, and I haven't checked that recently. But, the document below may help you.

https://github.com/relevance/diametric/wiki/Datomic-Pro-Version-Support

desaperados commented 10 years ago

Ah right. I've got the same pro version uri specified at config/diametric.yml and assumed that would be enough. I'll follow through on that link. Thanks.