How much work is it to write an SDK?

Hi everyone!

I’m evaluating Temporal right now and was wondering how much effort it would be to create an SDK? In this case, it would be for Elixir/Erlang. For starters, we would “only” need the core functionality like triggering a workflow and an activity.

I saw that Coinbase created one for Ruby. Does anyone know if there’s any guidance around creating an SDK yourself?

Cheers
Stephan

SDKs communicate with Temporal service over gRPC. Here is the API definition. So for simple operations like starting, signaling, and querying workflows writing SDK is as simple as making calls to a generated gRPC client.

Implementing activities is a little harder as SDK has to long poll for activity tasks using PollActivityTaskQueue API and completing them using RespondActivityTaskCompleted or RespondActivityTaskFailed.

Implementing a workflow authoring SDK from scratch is a very large task. I would say a fully-featured SDK would take at least half a year assuming very tight collaboration with our team.

The good news is that to simplify creation of SDKs in other languages we started the development of Rust based core SDK. It would encapsulate at least 80% of the complexity of creating a new SDK. Then you would be able to create Elixir/Erlang SDK either using sdk-core as a library or as a sidecar. This effort is just starting. So it would take at least a quarter to get to the point when it is ready for you to rely on.

3 Likes

Thank you for the detailed answer, Maxim! We actually won’t need Temporal before the middle of the year, so maybe the timing works out in the end.

The workaround we had in mind was similar to the sidecar idea you describe: have a “generic” Go/Java worker that we can communicate with from Elixir, and it could communicate back to the Elixir service. This way queries to the server could go Elixir->Worker->Server, and activities (the code we want to keep in our native language) would go from Server->Worker->Elixir.

I’ll be sure to check back about the Rust SDK when the time comes :slight_smile:

1 Like

Hi @maxim, i was also wondering about Elixir compatibility in particular because my company was also considering introducing workflow engine into our process. Considering that Typescript SDK has now released (and thus maybe Rust Core SDK is also finished?). is it viable to integrate elixir with temporal now?

I believe it is viable. But it is still a significant project (at least a half developer year). SDKs are very complex, so the developer has to collaborate very tightly with the Temporal team. This way it should be possible to develop an SDK that would be on par with other officially supported SDKs. So far this model worked only for the PHP SDK which was developed by the SpralScout team.

Any chance that Rust Core SDK effort would lead to an officially supported C#/.NET API? It’s not as cool-kid an ask as Elixir (I’ve always wanted to get to do something in Elixir :slight_smile: )but it’s a pretty decent sized developer ecosystem.

There is a very good chance :slight_smile: .Net specifically is an active area of research. Feel free to come chat in the #dotnet-sdk channel on the community Slack.

And there’s also a very good chance that the shared Core SDK work that .Net would leverage can be leveraged by Elixir or any other lang via FFI (also an active area of research/implementation).