Open doruchiulan opened 4 years ago
Hey, we have some experience in using cadence with scala and can contribute our experiences and maybe even some code.
Reg 2) Serialization is a tough topic, in general, typeclass-based serialization is more idiomatic and safer in modern scala. But this would be something to have in scala native sdk and so is out of the scope of this issue probably.
1 & 3 are already solved in scala 2.12 and later -> https://www.scala-lang.org/news/2.12.0/#lambda-syntax-for-sam-types
2 & 5 as proposed are not possible without adding scala stdlib as a dependency of java sdk, which doesn't sound plausible. Whereas 2) Is quite hard, the 5) is easily solved by https://github.com/scala/scala-java8-compat#converters-between-scalaconcurrentdurationfiniteduration-and-javatimeduration
Hello!
Just wondering about the progress with scala-sdk for Temporal? Any updates?
Not really using cadence in my current projects, but I'm still keeping an eye on this as this is a project which I really like and which I will happily include in any project that suits it. So if somebody takes over, has a plan/architecture and leads this, I will happily contribute with pieces of code.
Hi. Really interested in helping this move forward by creating an integration. Is there a guide I can use to start making the integration possible?
Would love the additional support for Scala 👍 it could potentially unlock some interesting use-cases if I can pitch Temporal to my team
Hi everyone I’ve implemented Scala SDK, which supports most temporal features. https://github.com/vitaliihonta/zio-temporal
It also allows using protobuf format via ScalaPB.
Currently, it’s tied to ZIO
I got bit by a problem with the reflection logic that attempts to determine whether Async.function
is being passed a method reference in MethodReferenceDisassembler#isAsyncJava
. Turns out that a method reference in Scala has a different result from getImplMethodKind
. It returns MethodHandleInfo.REF_invokeStatic
instead of MethodHandleInfo.REF_invokeInterface
. We had to invoke this through a small java shim to get it to function correctly and not execute directly on the local workflow executor.
I think ztemporal may have the same problem. It also appears to me to call Async.function
passing a Scala lambda expression.
I'll go with a top-to-bottom approach with the things I encountered, and how I tried to solve them in my project.
io.temporal.workflow.Functions.Func
argumentsio.temporal.workflow.Functions.Proc
argumentsio.temporal.workflow.Functions.Func
argumentsio.temporal.workflow.Functions.Proc
argumentsScala specific object types serialization/deserialization
WorkflowClient.execute(workflow::getGreeting, "World")
-> notice the double colon