Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Shafqat Ullah
    @shafqatevo
    There are already experimental actor libs using fibers.
    Shafqat Ullah
    @shafqatevo
    Vaughn Vernon
    @VaughnVernon
    I have already committed to implementing FiberMailbox. This would be experimental until fibers are production worthy. I was told by a loom committer that perf would not be good for some time so I haven't bothered going to the trouble. Plus I don't want unnecessay dependencies.
    Shafqat Ullah
    @shafqatevo
    Great!!
    Vaughn Vernon
    @VaughnVernon

    @/all Today we released v1.1.0 GA of the vlingo/PLATFORM. This release includes vlingo/streams, our implementation of Reactive Streams. The docs are available now as are the binary artifacts. This is a growing component and will be enhanced with new features, specifically around types of Source and Sink implementations, as well as typical functional sugar.

    https://docs.vlingo.io/vlingo-streams

    Jakub Zalas
    @jakzal
    Congrats!
    Shafqat Ullah
    @shafqatevo
    That's great!
    Shafqat Ullah
    @shafqatevo

    @VaughnVernon couple more questions:

    1. How will RSocket support be incorporated with streams (and wire) - use case I am looking towards is creating RSocket channels end to end between actors residing in remote client-side and server-side nodes? The client-side may use another RSocket library in any supported platform. Client-side actor > RSocket Reactive Streams > Server-side actor - thereby allowing actor to actor actor-messaging between different client-server actor lib through standard reactive streams.

    2. Is thread-starvation a possibility in vlingo/actors like it is a problem in Akka if any actor blocks a thread due to some computational task or use of any blocking library?

    Shafqat Ullah
    @shafqatevo
    3 . Is there any built-in mechanism to deal with out-of-order messages between actors?
    4 . Any mechanism like the stash concept of Akka?
    Vaughn Vernon
    @VaughnVernon
    @shafqatevo 1. We are adding streaming feature ongoing. Stay tuned. 2. Yes, any long-running task or blocking of threads obviously takes threads away from fair usage. This is an application design flaw, not an actor model problem. 3. The order of messages between two actors is guaranteed; introducing a third actor where two send messages to a third has undefined ordering. I have some recorded talks on modeling uncertainty. 4. It's called stowage, and used by lattice entities; use with caution.
    Shafqat Ullah
    @shafqatevo
    Thanks @VaughnVernon . Asked #2 because Pronghorn had claimed they address this problem (https://oci-pronghorn.gitbook.io/pronghorn/chapter-0-what-is-pronghorn/home#why-pronghorn) vs Akka, probably by Stage SLAs / rates / marking stages as HEAVY_COMPUTE / ISOLATE etc. (https://oci-pronghorn.gitbook.io/pronghorn/chapter-3-stages/notas). Also, fair scheduling is a key advantage of Erlang processes - so I assumed it is possible for the actor framework to have such Schedulers.
    Which class in vlingo does the actual actor execution scheduling onto threads? Is it the Scheduler class?
    Shafqat Ullah
    @shafqatevo
    (couldn't determine from docs or code)
    Vaughn Vernon
    @VaughnVernon
    @shafqatevo The current approach leaves the dispatching to the Mailbox implementation. The concept used by the queueMailbox is a Dispatcher based on a thread pool executor. You set the maximum number of threads or provide a factor (e.g. 0.5 or 1.5) to multiple with the total number of processor--hyper thread--to determine the pool size. There are a few different dispatcher algorithms that could be used and we will add these based on user need (not nice-to-have suggestions that are never used). The arrayQueueMailbox is a MPSC ring buffer with a single dedicated Java thread meant for every high throughput, generally 18-20 million messages per second. You choose the ring size. Note this uses pre-allocated message elements, and thus can be memory intensive, but also greatly reduces GC overhead on high throughput.
    You will find configuration examples here: vlingo-actors/src/test/resources/vlingo-actors.properties
    Vaughn Vernon
    @VaughnVernon
    BTW, I don't know where the Pronghorn author gets off saying that Akka is not non-blocking, because it is, the same that vlingo-actors are non-blocking. Yet, there is no magic available with physical threads. If you are using a physical CPU thread, which you are whenever your code is executing, and you make a blocking I/O call to use disk or network, that physical thread is blocked. Java threads are backed by physical CPU threads. Just because you can create thousands of Java threads doesn't increase the number of physical CPU threads. Every Java thread is temporary assigned a physical thread as available. If you block in any way the physical thread is blocked and so is the Java thread currently associated with it. No other Java thread grabs the physical thread while the Java thread sits idle waiting for the I/O request to return. The chart you see in the link is misleading at best.
    Also I personally asked for the status of Pronghorn. I was informed that the development is on hold and the single original developer who worked on it left OCI. They have no current plans to resume development.
    Shafqat Ullah
    @shafqatevo
    Thanks @VaughnVernon I had assumed from those configuration parameters that they're trying to emulate fairer scheduling in the face of compute-intensive tasks. That's at least better than no such scheme. I assume BEAM-type fair scheduling is not possible with JVM? I understood an actor Scheduler should be per OS thread - CPU core instead of mailboxes being actor schedulers.
    Vaughn Vernon
    @VaughnVernon
    The term Scheduler in both vlingo-actors and Akka is used for timers that schedule one or continuous future signals to an actor. The term used for delivering messages to actors on threads is called dispatching. Erlang/BEAM doesn't assign O/S threads to processes in the way that Java does. It sort of implements a virtual O/S of its own, which enables all kinds of different ways to control fairness. Think of how Un*x and Windows operating systems how by literally interrupting execution of a process on a thread and giving that thread to another process. So a JVM is interrupted by the O/S in mid execution of some/many code paths. That's what the BEAM does to it's own processes (and yes, the O/S still interrupts the BEAM).
    Vaughn Vernon
    @VaughnVernon
    So the BEAM uses preemptive multitasking via its scheduler by giving processes time slices, while Java uses cooperative multitasking which relies on code to give up a thread (complete a message reaction) quickly.
    Vaughn Vernon
    @VaughnVernon
    @/all We just gave a demo of vlingo/schemata in the January Reactive Foundation meeting. We had a great response and feedback. This component is so important to the future of #DDDesign #EventDriven #MessageDriven #Microservices #FaaS.

    @/all We have updated our support plans. Sorry if you missed our introductory pricing.

    • We offer per developer support plans
    • We offer production support plans
    • We can customize your teams and production support

    https://vlingo.io/support-pricing/

    Shafqat Ullah
    @shafqatevo
    Thanks, Vaughn. Hope to pitch vlingo to our customers soon. Planning to do a small PoC project first.
    Shafqat Ullah
    @shafqatevo
    Had asked this before, when to expect any webinar/presentation/video tutorial covering all aspects of Vlingo? That would help a lot - particularly for our customers. We already have a hard time educating them on the underlying approaches (DDD, ES, CQRS, etc.).
    Vaughn Vernon
    @VaughnVernon
    @shafqatevo The videos are in the works. We could hold a webinar toward the latter half of February. What is your timing for consumption?
    Shafqat Ullah
    @shafqatevo
    That would work for us. Thanks!
    Vaughn Vernon
    @VaughnVernon
    @shafqatevo BTW, here are some updates in docs regarding mailboxes, their configuration, and dispatching: https://docs.vlingo.io/vlingo-actors#mailbox
    Here is a cleaned up FAQ answering your questions about Java thread dispatching vs BEAM process scheduling: https://docs.vlingo.io/faq#q-how-do-java-based-vlingo-actors-and-erlang-beam-processes-differ-in-how-fairness-of-message-processing-is-managed
    Shafqat Ullah
    @shafqatevo
    Really appreciate this @VaughnVernon !
    Vaughn Vernon
    @VaughnVernon
    @/all We have released the platform version 1.2.7. The vlingo/xoom is unavailable due to issues with the packaging and the conflicts it causes for Bintray and Sonatype replication. We are trying to resolve this by 1.3.0 soon to be released.
    Vaughn Vernon
    @VaughnVernon

    @/all Watch our @vlingo_io webinar from Thursday on YouTube.

    "Safely Exchanging Information Across Microservices"

    Subscribe to my YouTube channel to get updates when new content arrives.

    https://www.youtube.com/watch?v=-VbzBaXR2K8&t=650s

    Vaughn Vernon
    @VaughnVernon
    @/all Watch our remake video "Scale Your Domain Models":
    https://www.youtube.com/watch?v=yfhgBmMh1Fs&t=13s
    Pankaj Sharma
    @sharmapankaj2512
    Vilingo Team, I just want to congratulate and thank you for the wonderful documentation and the framework.
    After going through the documentation and the hello world example, I was able to build a small fund transfer app in a couple of days.
    For those interested, example can be found here https://github.com/sharmapankaj2512/funds-transfer-vlingo.
    Also next, I am looking to build a graalvm native image. I tried to follow https://github.com/kmruiz/vlingo-native-image-example but ran into some issues.
    Any pointer's on where I should be looking?
    10 replies
    Vaughn Vernon
    @VaughnVernon
    @kmruiz ^^^
    @sharmapankaj2512 Do you mind if I tweet your example?
    Pankaj Sharma
    @sharmapankaj2512

    @sharmapankaj2512 Do you mind if I tweet your example?

    @VaughnVernon Not at all :-)

    Vaughn Vernon
    @VaughnVernon
    @sharmapankaj2512 What is your twitter account?
    Pankaj Sharma
    @sharmapankaj2512

    @sharmapankaj2512 What is your twitter account?

    Its @pps2512

    Vaughn Vernon
    @VaughnVernon
    @sharmapankaj2512 Tweeted, thanks!
    Kevin Mas Ruiz
    @kmruiz
    Hey, thanks for pinging me :D it took 1 day for gitter to send me an email
    the GraalVM native-image has some troubles detecting reflection (which makes sense as we do some dynamic reflection and class generation on runtime, and the GraalVM is not expected to support it right now)
    for vlingo to work with a native-image, you need to generate the proxies at compile time, with the vlingo-build plugin: https://github.com/kmruiz/vlingo-native-image-example/blob/master/pom.xml#L30
    this will generate a few proxy classes and the reflection.json that needs to be added to the graalvm image (in the Dockerfile there is an example on how to do that)
    Kevin Mas Ruiz
    @kmruiz
    the Dockerfile in that repo should be generic enough, just changing a few parameters should be enough to make it work (assuming there has been no breaking change in vlingo related to the proxy generation in the last few months :D): https://github.com/kmruiz/vlingo-native-image-example/blob/master/Dockerfile#L11
    Pankaj Sharma
    @sharmapankaj2512
    @kmruiz Thanks for the explanation. I was able to create a docker file referring to the file that you have shared.
    But as you mentioned the 'nativeActorProxyGen' is not able generate proxy for one of the overloads of actorFor.
    I have created a PR with the test data that makes a test in ProtocolScanner fail.
    vlingo/vlingo-build-plugins#8
    Vaughn Vernon
    @VaughnVernon
    @sharmapankaj2512 You can use an ActorInstantiator instead. There are many examples. See:
      @SuppressWarnings({"rawtypes", "unchecked"})
      private static class StateStoreEntryReaderInstantiator implements ActorInstantiator<InMemoryStateStoreEntryReaderActor> {
        private static final long serialVersionUID = 8463366612347915854L;
    
        final String name;
        final List<Entry<?>> entries;
    
        StateStoreEntryReaderInstantiator(final List<Entry<?>> entries, final String name) {
          this.entries = entries;
          this.name = name;
        }
    
        @Override
        public InMemoryStateStoreEntryReaderActor instantiate() {
          return new InMemoryStateStoreEntryReaderActor(entries, name);
        }
    
        @Override
        public Class<InMemoryStateStoreEntryReaderActor> type() {
          return InMemoryStateStoreEntryReaderActor.class;
        }
      }
    I know this does not fully address your issue, but it is best to greatly reduce the reasons to use reflection. The ActorInstantiator was designed specifically to accomplish that when using GraalVM.
    Pankaj Sharma
    @sharmapankaj2512
    @VaughnVernon Thanks, I think that will suffice. Shall I close the PR?