Fork me on GitHub

@jetzajac: There's no efficient way to determine if an arbitrary query is affected by a transaction, in the general case. As an alternative, you can annotate transactions with metadata describing the “type” of change, and use that to determine what “types” of queries might be affected.


ok, that’s likely to be a solution, thanx!


How should host and and alt-host be set for Transactor. I didn't find any explicit documentation on these fields, but here's my guess: 'host' is what address the transactor should listen/bind on. 'alt-host' is the address that is advertised (by putting it in datomic storage) for clients to connect to. In my case, I'm running in a docker-image in AWS EC2. So I believe I should set 'alt-host' to the public-ip of the AWS instance. And I found an example from Stu setting 'host' to be the EC2 private-ip. But this isn't working, getting "Failed to create netty connection ... connect timed out". I'm wondering if 'host' should really be the IP of the docker container, rather than the host internal IP. I also tried 'host' as, but that didn't work either.


@mlimotte: I personally set host to and alt-host to the internal ip address of the host (docker-machine). If you need to connect to it from the outside, you need a different setup with the public IP. In this case your security settings for the EC2 security group is probably blocking your incoming requests on port 4334-4336. Also remember to expose the same ports in the docker config.


Perhaps this will help (really rudimentary, but it was enough inspiration for me to get up and running):


@luposlip: thanks for the response. I'm using dynamodb storage, so I believe I only need 4334 exposed. This port is exposed by the docker container and is setup for ingress from our network in the EC2 security group.


I discovered that I'm able to connect to the transactor from an external IP, but Datomic Console (inside the same VPC) is unable to connect ot transactor.


I think using public IP for 'alt-host' is the problem. I need public-ip so I can access the transactor from outside EC2 (batch scripts). But inside VPC I probably need an internal ip.


Ok, to close the loop... I got this working by specifying the AWS public-hostname (i.e. curl >) for 'alt-host' instead of public IP. The public host resolves to the public IP when used outside of EC2, and resolves to the internal IP when used inside EC2.


Glad to hear you made it work!


Nice trick with public hostname, if you need public access.


is there a way to lookup all the tx-data given a tx-id? e.g. I want to see all the additions / retractions given a tx-id


when I give a naive query with tx-id it says insufficient bindings / would cause a full scan simple_smile


I guess there isn’t a T___ index


In particular, "The tx-data function returns the datoms associated with a particular t or tx."


thanks, just found that 😜 not working atm, but looking at the docs it doesn’t work on mem dbs simple_smile


oh, yes, that’s correct, mem dbs aren’t durable so don’t have the log.