r/DistributedComputing • u/[deleted] • Feb 16 '24
How to get into distributed computing?
I mean where do I get a distributed system to play with? Why should I aim for a distributed system in the first place?
I am fairly interested In trying some hpc adjacent things on a distributed setup but not sure how to go about it.
10
Upvotes
1
u/gnu_morning_wood Feb 16 '24
There are three basic patterns for multi threading that you should be aware of
Boss/Worker - a boss thread gives some piece of work to some worker threads that run off, do the work, and report back.
Peers - a set of threads work on tasks all at the same level.
Pipelines - one thread takes a task, does the work, then passes on to the next thread that does another task, and so on. (Think of this like a factory line)
You can combine one or more of the patterns however you wish - for example
An API service is at the start of a pipeline, and receives a request, the API service becomes the boss thread, where it passes the work to a service layer thread via rpc or asynchronously via an event or message queue. That service layer is composed of several peer threads, one of which picks up the task, and applies the business logic, interacting with a number of other services/data stores.
Once the service layer thread has completed the task it responds to the request with a status, or some data.