I have not tried this with Datomic Ions, but having researched the possibility of doing this with Google App Engine, I am pretty certain it can't be done (out of the box).
Ions, like App Engine, are 'elastic' systems - they will start/stop nodes as the load varies, and websockets is stateful, i.e. the same server needs to run continuously because it maintains the connection with the websocket client(s).
In theory, Datomic will always have at least 2 nodes constantly running (in production config), so you might argue that they could support a websocket server on one of those nodes, but I think even there you have no guarantee, as a node might fail and get cycled at any time.
I think the way to handle this, is to start your own EC2 instance running the websocket server, and let the clients connect to that. The websocket server can do calls to Ions, but I suspect you want to push some realtime data (else why use websockets), so the way to do this is to have a transaction function that will write info onto a message queue (e.g. Amazon Simple Queue Service), and the websocket server can listen for messages on that queue, and push it to the clients.
Remember to keep the amount of work inside a transaction function to the minimum, otherwise your transaction throughput on Datomic could be severely affected. So:
- only write the stuff you really need to the message queue, not every single datom being transacted
- use something like Amazon Simple Queue Service that will scale together with the number of messages you publish. Don't just do calls to your websocket server directly
You can also ask this question on Datomic Forum, they have some good people answering questions there.