Discussion Forum

Grakn GRPC Protocol implementation problems

I am writing a Grakn driver for Haskell right now.
So far I have been able to get the Administration functions to work;
However, I experience some troubles getting the Transaction stuff working:

main :: IO ()
main = do     
    res <-(tryTx `withSessionFor` (Keyspace "Test")) 
              `runIn` defaultGraknSettings
    print res

where tryTx simply sends a transaction open request.

After sending it, the Grakn server responds with this:

[TXN03] Invalid Transaction Operation: The transaction has not been opened yet, so the only allowed operation is to open it.

If I understand the protocol correctly this should work:

  • Establish a connection to the grakn server
  • open a session with an existing keyspace
  • open a transaction in this session
  • do other stuff
  • commit transaction
  • close session

this is essentially what I am trying, but I couldn’t figure where I went astray.
i would be glad for some guidance in this matter.

Hi there!

I suspect this error would be caused by one of the following:

  • It’s possible that you have an old version of the Grakn protocol, whose transaction open request is encoded differently. Ensure you have version 2.0.0 (production) of the protocol when connecting to Grakn Core 2.0.0;
  • Or, you might actually be sending a different kind of request mistakenly.

P.S: We’re very excited about the idea of a Haskell client :slight_smile: Is your project on GitHub? We’re mostly using our Discord server for communications - if you’re on Discord, we can go back-on-forth on any implementation hitches faster.

Thanks for the hints;
I am going to check it;

It will be once some minimum functionality is implemented

I joined the discord server I’ll ask future stuff there ^^

1 Like