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

Cross-language workflows

Open purcell opened this issue 7 months ago • 2 comments

Hi, and thanks so much for sharing this SDK!

I'm evaluating Temporal to help with orchestration within a polyglot Clojure + Python system, so I'm particularly considering interop between different languages, and I recognise this might not be on your list of priorities at all.

From what I can tell, cross-language workflow interop is currently tricky with this SDK for a couple of reasons:

  1. Only activities defined in clojure with defactivity can be invoked, so an activity that may be implemented by a worker in another language is inaccessible from this SDK. (As a workaround one can declare a stub activity in Clojure that never gets executed, but this feels a bit hokey.)
  2. All activity params/results are encoded with nippy rather than JSON, so by default workflow data will be unreadable by SDKs in other languages. I guess this choice was made so that Clojure-to-Clojure activity interop works smoothly, with seamless serialisation of :keywords etc. For interop beyond Clojure, would you expect that a Data Converter could be written to convert nippy data to/from JSON or similar?

I'd rather not drop down to the Java SDK if I can avoid it, so I thought I'd check in here to see if you have any tips — thanks!

purcell avatar Jan 02 '24 15:01 purcell