Unit of work across multiple actors Akka.Net - akka.net

I got a requirement that two actors are need to be in the same unit of work, my understanding is actor is location transpancy which mean that it can be in any where, anyone got any suggestion?

You could have a separate Actor coordinate the unit of work for the two Actors involved. This could be basic actor supervision whereby the supervisor is responsible for the workflow / unit of work, but delegates the actual business processes to the two Actors you mention.

Related

Component Teams or Feature Teams

I am an experienced product person however I keep on finding myself in the same old argument component teams or cross-functional feature teams.
What are the pros and cons of Feature and Component teams?
Does its matter at what stage of growth the business is?
A common argument against feature teams is that there is no single ownership of services is this a problem? in my mind specializing is not a good idea.
Thank you
Cross-functional feature teams:
Few external dependencies
Able to directly equate the work they do to customer value
Rarely a bottleneck or lacking in work
Challenges balancing the load on specialists in the team
Specialists in the team may feel 'isolated' from others with similar skill sets
Component teams:
Often have external dependencies or other teams depend on them
Hard to evaluate their work as it is a piece in the puzzle rather than end user value
Lots of team members with similar skill sets, so knowledge sharing, etc. is good

VRP with team building

I am using optaplanner with drools score calculation and chained variables.
An additional requirement for my optimization problem is, that some tasks may need more than one worker (e.g., someone has to hold the ladder).
Since this case is not covered by the simple VRP example from the docs, I have to come up with my own implementation (this is were things start to go out of hand :)).
What follows is the description of my idea and a picture of it. My question is, if this kind of chain freezing is possible for OptaPlanner (with multithreading).
If yes, where can I find resources for this?
If not, what are other possibilities to cover team building processes?
Idea:
Two separate workers complete their first tasks. After that, a task requires a team of two. Both suppliers build a team (a team object will inherit from the worker and is also an anchor). As soon as they build a team, they get assigned to blocking tasks (on their initial chains).
Blocking tasks have the same start and duration as the team task. When the team task is completed, the initial chains unfreeze, and the workers continue working on their own again.
!! Not shown in the picture: A team chain needs to be frozen after the team breaks up.
I hope that could explain what I am trying to do.
Best,
David

Design Pattern for class bookings

I am designing a small application to manage class sign-ups and appointment bookings within a school.
I will have students who will want to book classes, Teachers who teach classes in the room and also have an office room and guests will book in meetings with teachers in one of their rooms.
I will also need to print out a report of all meetings and classes and which rooms and who attended.
Which design patterns would be best?
I have been looking at possibly the Factory/ iterator and composite so far but not sure which would be most suitable or what the potential issues that might arise?
Essentially you have rooms, time slots, and you have to assign them to resources. This is a typical Constraint Satisfaction Problem (CSP). There are many ways to solve such kind of problems. One is backtracking algorithm. There is another approach called Genetic Algorithm that helps you pick up the best solutions. Please search those.
Thanks.

BPMN diagram about two swimlanes or one or two pools

I have a question. suppose we wanna a BPMN diagram for transferring soccer player from team A in country A to team B in country B and to do that the federation of A should cancel the player registeration for team A and federation B should accept registeration for team B.
my question is that if we should have two swimlane with role federation A and B or one swimlane is enough? or also we have to had two pools ?
Please help me for this question. thanks a lot
The correct approach depends a lot on what you are modelling and why. I will give you an example of motivation for each of the mentioned methods so that you could get the idea and make the right choice yourself.
You don't really care about who does what in your scenario and the main point is the order of actions and exceptions. No swimlanes are needed, just put your diagram out there:
Your scenario is whole and should never be decomposed into parts (e. g. Cancellation and Registration) because there is very little or none at all sense in looking at the parts on their own. Make one pool with two or three (possibly for the player himself) swimlanes:
Your scenario can be decomposed and it makes good sense. The process occasionally stops at a point of Cancellation (without new Registration).
Use different pools with separate process flows:
Also, use a separate Blackbox Pool if you don't know what a participant (a player or a federation) actually does and you can only communicate with it by some kind of messaging (e. g. -Accept? -OK).

Two objects knowing of each other

I have the following problem: I'm designing a game and summing up let's say that I have three classes:
Player
PowerPlant
Unit
Some "use cases"
Player has to know how many units and powerplants he has. If the limit has been reached, more units/powerplants should not be constructed (i.e. Player has to have a reference of each element that belongs to him)
Units request energy from the Player, and the Player gets the energy from the PowerPlants and sends it to the Units
Player has to know when a Unit or a PowerPlant has been destroyed (i.e. units and PowerPlants have to be able to notify to the player that they've been destroyed)
And the only way I can get this to work, is that Player knows about PowerPlants and Units, but also each PowerPlant and Unit knows about his Player/Owner, so that they can communicate in both ways.
I somehow think that this is a code smell... when I have been in similar situations, I always have had trouble at the long term.
Thanks in advance.
I have had that problem in multiple occasions, and what you said is not necessarily an anti-pattern but it does add undesired complexity.
YMMV, but in my case, I didn't really wanted to have a direct relationship between those different classes but a way to notify each other when something happens, so the cleaner way I had found was having an event manager (or any other sort of callback mechanism) to glue all logic parts together. With that tool in the belt it turned out that I could get rid of all those double references which simplified the hierarchy a lot.