by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    shafqatevo
    @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?
    shafqatevo
    @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.
    shafqatevo
    @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/

    shafqatevo
    @shafqatevo
    Thanks, Vaughn. Hope to pitch vlingo to our customers soon. Planning to do a small PoC project first.
    shafqatevo
    @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?
    shafqatevo
    @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
    shafqatevo
    @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?
    Vaughn Vernon
    @VaughnVernon

    @sharmapankaj2512 The ProtocolScanner still needs work as @kmruiz noted in PR #8:

    https://github.com/vlingo/vlingo-build-plugins/pull/8#issuecomment-638012780

    Pankaj Sharma
    @sharmapankaj2512
    @VaughnVernon @kmruiz Thanks for the additional information, I will send a PR with fix shortly.
    Vaughn Vernon
    @VaughnVernon
    @sharmapankaj2512 Thanks!
    Gaurav
    @gaurav-

    Hello! I've been searching for a framework/toolkit to help implement DDD (with possibly event sourcing) for a new product we're building. I stumbled upon Vlingo and was so pleasantly surprised to find that it promises everything that I was looking for, and more!

    We're a very small team in an early-stage startup. So my plan is to first build a modular monolith with well-defined boundaries that could later evolve into microservices.
    Is there any example project to demonstrate such an approach using Vlingo?

    15 replies
    Daniel Rodríguez Alcalá
    @danielhra
    Hey guys i've been trying to get the vlingo xoom starter running on my mac to no avail. i've followed the steps described in the readme, extracting the content and creating the environment variable yet it doesn't seem to be working, any ideas what could be missing?
    Vaughn Vernon
    @VaughnVernon
    @danielhra Sorry for the trouble. I have asked @danilo-ambrosio to reply but I think he is offline for the weekend. Some of the readme instructions may be a few days out of date, but I thought it was working. Do you have JDK 1.8 installed?
    Vaughn Vernon
    @VaughnVernon
    Daniel Rodríguez Alcalá
    @danielhra
    @VaughnVernon thanks for answering, i do have jdk 1.8 and the latests dist, if it is working properly it must be on my side then, i'll try debugging some more
    Danilo Ambrósio
    @danilo-ambrosio
    Hey @danielhra !
    Please let me know if you have any error message or failure evidence. I'm willing to help you with XOOM starter.
    At your disposal.
    Vaughn Vernon
    @VaughnVernon
    @danielhra Can you please give us an update on your situation? It seems like you must have gotten past the problem. /cc @danilo-ambrosio