Using ions offline


#1

As far as I understand an internet connection is required to use datomic ions. I like the idea of being able to develop and run tests etc offline.

Localstack https://github.com/localstack/localstack can be used to run aws services locally. Would it be feasible to hack a script that simulates a deployment (setting up the lambda functions)? How else could one go about using ions locally?


#2

Ions can be developed and tested locally. Specifically, as indicated here: https://docs.datomic.com/cloud/ions/ions-reference.html#signatures Ions are just plain functions.

When you specify the :server-type :ion in your Datomic configuration map (https://docs.datomic.com/cloud/ions/ions-reference.html#server-type-ion) the client library will allow you to use the local SOCKS proxy to connect to the database (if necessary), but will use a local implementation once deployed.

If your Ion doesn’t require access to the database and/or any other network-requiring features (i.e. other AWS services), you should be able to test it locally as you would any other function.


#3

the client library will allow you to use the local SOCKS proxy to connect to the database (if necessary),

Can this database be one i’m running on my machine?


#4

Ions require Datomic Cloud, which only runs on AWS.


#5

Hi. We had a requirement to test against offline Datomic DBs but wanted to deploy using Datomic Cloud. We wrote this small library that lets you do that. It wraps the Datomic free peer library in the Datomic Client protocols. We’ve been using it successfully for a while now.


#6

Nice Kenny :slight_smile: