Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Active Object concurrency pattern #65

Closed
iluwatar opened this issue Jun 23, 2015 · 13 comments · Fixed by #1660
Closed

Active Object concurrency pattern #65

iluwatar opened this issue Jun 23, 2015 · 13 comments · Fixed by #1660

Comments

@iluwatar
Copy link
Owner

https://en.wikipedia.org/wiki/Active_object

@iluwatar
Copy link
Owner Author

Thinking in Java book

@hannomalie
Copy link
Contributor

I'll give it a try :)

@hannomalie
Copy link
Contributor

I pushed a module in a new branch. Since I wasn't satisfied with the simple "I have my own thread"-implementation one can find everywhere, I implemented return values with futures and a task queue as well.

Would be glad if I get some comments. If the code is good, I will add readme and uml stuff.

Thanks :)

@iluwatar
Copy link
Owner Author

@Rzeposlaw
Copy link
Contributor

Hello, can I work on this now?

@iluwatar
Copy link
Owner Author

iluwatar commented Apr 1, 2017

Ok @Rzeposlaw it is yours.

@tzutalin
Copy link

tzutalin commented Sep 8, 2017

@Rzeposlaw,
It will be nice to explain the difference between active object pattern and event-driven-architecture/event-asynchronous.

@isabiq
Copy link
Contributor

isabiq commented Sep 19, 2017

I think the two patterns have some similarities but they are different in many aspects. The main goal of the event asynchronous is to hide the complexity of a multi-threaded design. Normally, a user want to execute his tasks asynchronously so he delegates the tasks to another objects that control and supervise the execution of these tasks. For me, The pattern has a really narrow use case, and I see it mainly used in GUI applications when performing short background operations and publishing results to the UI thread.

For the active object it is a pattern used to decouple method invocation from its execution. It is a complex pattern that hold in its implementation other patterns. So here, it is about a client calling a proxy to benefit from a certain service not delegating a task of his. Also, while both pattern use multi-threaded environments, the active object introduces other concepts, like a scheduler which provide another layer of managing and prioritizing requests, a servant for defining the behavior and state, and also method requests and activation queue.

@iluwatar
Copy link
Owner Author

@Rzeposlaw are you still implementing this?

@iluwatar
Copy link
Owner Author

iluwatar commented Oct 5, 2019

This issue is free again

@noamgrinch
Copy link
Contributor

Hey, @iluwatar I have implemented this pattern and ready to push to my branch.
May I please get permissions to commit and push?

@noamgrinch
Copy link
Contributor

@iluwatar ?

@iluwatar
Copy link
Owner Author

@noamgrinch please follow the normal Github forking workflow. You don't need write access to this repository, you can fork it on your own account and propose changes from there. See Github's documentation.

noamgrinch added a commit to noamgrinch/java-design-patterns that referenced this issue Feb 21, 2021
ohbus added a commit to noamgrinch/java-design-patterns that referenced this issue Mar 1, 2021
noamgrinch added a commit to noamgrinch/java-design-patterns that referenced this issue Mar 2, 2021
noamgrinch added a commit to noamgrinch/java-design-patterns that referenced this issue Mar 2, 2021
noamgrinch added a commit to noamgrinch/java-design-patterns that referenced this issue Mar 2, 2021
noamgrinch added a commit to noamgrinch/java-design-patterns that referenced this issue Mar 8, 2021
noamgrinch added a commit to noamgrinch/java-design-patterns that referenced this issue Mar 8, 2021
iluwatar added a commit to noamgrinch/java-design-patterns that referenced this issue Mar 13, 2021
ohbus added a commit that referenced this issue Mar 14, 2021
* Closes #65.

* Removed

* Removed unnecessary files. Added logging. Closes Fixes #1660.

* Added Terminition condition.

* Logger implemented. Removed maven wrapper.

* Added module to parent POM. removed .gitignore

* Replaced tabs with whitespaces, added Javadocs.

* Fixed more whitespaces problems.

* Fixed more checkstyle errors

* More checkstyle errors.

* Checkstyle errors.

* Final checkstyle cleanup

* Added UML file. Changed System.exit() to Runtime.

* Changed buisiness logic and readme.md file

* Changed typos and readme.md file

* Fixed checkstyle errors

* Fixed grammer errors and CircleCI bugs.

* Wrong readme.md

* Added Thread.interrupt() for after catching exception.

* Fixed SonarCloud code smells.

* Removed unused brackets.

* Changed main program exit logic. Added tests.

* Reverted abstract-factory

* Cleaned code

* Added static to loggers. cleaned code smells.

* Checkstyle errors.

* Code Smells.

Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
@iluwatar iluwatar added this to the 1.24.0 milestone Mar 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants