Distributing task execution

137 views
Skip to first unread message

Thiru k

unread,
Aug 9, 2019, 8:39:44 AM8/9/19
to golang-nuts
Hi,
We have used goLang for developing the web based application using micro service pattern. Each and every service will be scale as per demand. here, few of the functionality have to be worked periodically as cron , it is easy on the server is just one but if it is scaled then the problem arrives to distribute the task across the replication. Please tell me is there any framework is available to handle this. How to sync and how to split the task among  replications?

Thanks for helping :)

Brian Hatfield

unread,
Aug 9, 2019, 8:59:42 AM8/9/19
to Thiru k, golang-nuts
Hey there,

What you're describing is a distributed task scheduler.

I am not aware of any frameworks for you to integrate this into your application in Go, although something in the stream processing family of libraries might be able to help if that's what you really want. That said, I generally don't see folks integrating distributed task scheduling into their applications directly, but rather using a distributed task scheduler to manage how their applications and tasks are run.

The approach I have seen most often is to use your existing scheduler / infrastructure management tools to accomplish this. For example, if you were already using Kubernetes, you might use the Job primitive. I wouldn't necessarily recommend starting up a Kubernetes cluster _just_ to schedule a single task, but if you're already using it, that's how you might tackle it.

There's lots of distributed task schedulers and platforms that could accomplish this goal, so I would start with the one that you're already using to scale your services on demand and determine if it has a "scheduled job" type task.

Good luck!
Brian



--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/35d530c4-0842-415a-9a22-c4bf813f7260%40googlegroups.com.

mfa...@gmail.com

unread,
Aug 15, 2019, 8:24:28 PM8/15/19
to golang-nuts
Look at the Cadence Workflow. It is a very powerful orchestration solution including periodic jobs. And it has Go SDK: https://cadenceworkflow.io/
Reply all
Reply to author
Forward
0 new messages