I’m extremely new to the Akka framework. I followed a lightbend certification on academy, and the full IoT tutorial on akka website.
But now it’s time to try to put hands on it.
I am trying to create a simple trading bot, let’s say.
But I already umh, got lost in the correct way to architect my actors hierarchy.
My idea is having an Actor Trader that follows a single currency.
Each Trader than will spawn 2 actors, one for buy and one for sell, and they will save the status of last operation in a instance variable.
So let’s Say we have a Trader for BTC
It starts with status of lastOperation = None
it Spawns 2 new actors (Buy-BTC, Sell-BTC)
when a message CoinPrice arrives on the status of lastOperation it will forward a new message to the correct Actor. I do this because I want ofc implement different logic on buying/selling.
Does it make sense to follow a thing like this?
or would you suggest a different approach?
I know it’s very generic question, but since it’s my first project and I don’t have anyone I can ask to, here I am.