temporal-clojure-sdk icon indicating copy to clipboard operation
temporal-clojure-sdk copied to clipboard

Readable encoding (i.e. not nippy)

Open nivekuil opened this issue 3 years ago • 4 comments

Hey, thanks for writing this! Got a simple cron job working nicely and I'm impressed with the API's elegance.

One thing I like about temporal is the ecosystem includes a UI, but it's not very useful here because everything is nippy encoded, which is convenient but not interoperable. Do you have any thoughts on this? e.g. pluggable encoding or remote codec endpoint facilities

nivekuil avatar Nov 19 '22 04:11 nivekuil

Hi Kevin,

In theory, you should be able to develop a “Remote Codec” server:

https://docs.temporal.io/security#codec-server

We haven’t tried as we also encrypt our data in a manner that, by design, won’t work.  I do understand that this would be helpful, though.  Patches welcome!

ghaskins avatar Nov 19 '22 13:11 ghaskins

We've set up a codec server and it definitely works as advertised.

Part 2, which we haven't tried: I believe you can also forward the user's Temporal cluster credentials with the request, which in theory means you can selectively decrypt as well.

bbqbaron avatar Sep 14 '23 13:09 bbqbaron

I implemented a codec server, leaving it here in case it's useful to anybody.

kpassapk avatar Sep 17 '24 22:09 kpassapk

It would be great as a start, if the Temporal UI submitted workflow params (JSON encoding AFAICT) could be parsed by the Clojure SDK (potentially dispatching on the first byte being {?)

Currently it's passed to Nippy, with a Codec Server decoded payload like:

{
  "metadata": {
    "encoding": "binary/plain"
  },
  "data": {
    "object": {
      "foo": "bar"
    }
  }
}

This would gain us the ability to start simple workflows without having to enqueue them using the Clojure SDK.

thenonameguy avatar Feb 04 '25 21:02 thenonameguy