Comments (2)
Hi,
Thank you for your kind words. Your project sounds very interesting, and I would like to support you on using Fibry for it.
If these threads are intended to run for long time, you might want to take advantage of the "AutoHealing" (I haven't released a version for JDK 11 yet, but I can do it soon), as that would try to "unfreeze" threads, and I found it quite useful at work (you cna check the AutoHealingExample file).
Not all the actors type support auto-healing, but the basic do it (and I can add support to other types if you need it).
I would stick to the basic actors (e.g. created with ActorSystem, using newActor() or newActorWithReturn().
If you have a lot of logic, you might want to use a CustomActor (but I have to add the auto healing there).
As a general rule, is not the best to have an infinite loop inside an actor, as it will prevent other messages (including the one to terminate it) and it is incompatible with auto healing; you could however make a loop sending every time a message to yourself.
If performance are not super critical, and you want to abstract a bit more you could create a special type of actors designed to publish on a Kafka topic; in this case, the users could just send a message to the actor instead of dealing with Kafka directly.
If you want to keep in touch with this project, I will try to assist you, and I will try to be faster to answer.
Regards,
Luca
from fibry.
Ah,
to pause the consumer, if you send a message to the record processor using sendMessageReturn, you will automatically wait for the message to be processed.
While Fibry is designed to have actors that process different types of messages, it can become quite verbose and possibly complex, so it is better if you can just just synchronize with the return value of the message instead of processing pause() and resume(), which would most likely require an "Erlang style" actor (ReceivingActor).
from fibry.
Related Issues (8)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fibry.