eventsourced | building reliable , scalable and distributed event | Microservice library

 by   eligosource Scala Version: Current License: Apache-2.0

kandi X-RAY | eventsourced Summary

kandi X-RAY | eventsourced Summary

eventsourced is a Scala library typically used in Architecture, Microservice applications. eventsourced has no bugs, it has no vulnerabilities, it has a Permissive License and it has medium support. You can download it from GitHub.

The Eventsourced library adds scalable actor state persistence and at-least-once message delivery guarantees to [Akka] With Eventsourced, stateful actors. In other words, Eventsourced implements a write-ahead log (WAL) that is used to keep track of messages an actor receives and to recover its state by replaying logged messages. Appending messages to a log instead of persisting actor state directly allows for actor state persistence at very high transaction rates and supports efficient replication. In contrast to other WAL-based systems, Eventsourced usually keeps the whole message history in the log and makes usage of state snapshots optional. Logged messages represent intended changes to an actor’s state. Logging changes instead of updating current state is one of the core concept of [event sourcing] Eventsourced can be used to implement event sourcing concepts but it is not limited to that. More details about Eventsourced and its relation to event sourcing can be found at [How does Eventsourced persist actor state and how is this related to event sourcing] Eventsourced can also be used to make message exchanges between actors reliable so that they can be resumed after crashes, for example. For that purpose, channels with at-least-once message delivery guarantees are provided. Channels also prevent that output messages, sent by persistent actors, are redundantly delivered during replays which is relevant for message exchanges between these actors and other services.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              eventsourced has a medium active ecosystem.
              It has 836 star(s) with 98 fork(s). There are 109 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 22 open issues and 78 have been closed. On average issues are closed in 36 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of eventsourced is current.

            kandi-Quality Quality

              eventsourced has no bugs reported.

            kandi-Security Security

              eventsourced has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              eventsourced is licensed under the Apache-2.0 License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              eventsourced releases are not available. You will need to build from source code and install.
              Installation instructions, examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of eventsourced
            Get all kandi verified functions for this library.

            eventsourced Key Features

            No Key Features are available at this moment for eventsourced.

            eventsourced Examples and Code Snippets

            No Code Snippets are available at this moment for eventsourced.

            Community Discussions

            QUESTION

            Microservice Architecture - is there a Need to have API per service
            Asked 2020-Aug-19 at 07:13

            I have been exploring Microservice Architecture, and even though the technologies I use are in Microsoft Domain, the question is generic.

            I get the Idea of API Gateway esp for things like Authentication. The pattern I am roughly following is based on CQRS + Event Sourcing

            Request-> Command ##CommandBus##->CommandHandler -> Change Aggregate State->Store Events-> PublishDomainEvents ->Publish Integration events ##Event Bus## -----> Update Read Models

            Many times initial Command will be handled by ProcessManager (consumer) to Orchestrate workflow.

            All Microservices Application Layer consume Command from Bus and work on changing Aggregate state. Once done, the Read model store is updated. Currently, there is only a single Read Database which is updated

            When I started with Command Bus, The REST API per microservices were for mainly Get requests ( Read ), which would dip into the same Read Database as all other Services and rest for accepting Command from Gateway.

            Based on my current Scenario, Is there a logic in having REST API's per Microservice? I know we can do Async with Rest API to push commands, but what is the point when I am already using a Bus.

            But now I am thinking of not having API per Service but rather API's based on usage. It's then not limited to single Gateway but few Gateway API projects.

            Are there any Cons/ pitfalls with this approach?

            Edit 2-- **Trying to rephrase if it gives context ** My microservice structure is very similar (to what @mrdnk commented) . As you In I will introduce technology to make it more clear. I use Mass transit over RabbitMQ for inter service communication.

            As of now I have API gateway used by client applications, which would then call appropriate microsservice API to push a command object. the API method itself acts as a Command Handler (acting as Application layer) calls Aggregate and make it undergo changes. Domain Events based on the change are published within the process with Mediatr. Any events that outside (microservice) world needs to know is published on the bus. I started to look at the communication and said to myself why not use the Bus also for commands (as command bus). That way I can have more reselient and async process.

            Application layer will listen to command and handle appropriately. This way I feel the service is more encapsulated. On API side (individual microservce) I dont need to expose any rest api for use by gateway. API in Gateway wil listen to request and create command object. this will be queued to bus. Consumer (command handler) on Microservice will consume Command and so on.

            Currently all Writes are eventsourced (mongodb). Reads go to SQL Server. I can create API just for Queries from Read side. No more need to have Http API from Microservice at all.

            I know technically it would work but Dont know if there are any pitfalls.

            Regards, Mar

            ...

            ANSWER

            Answered 2020-Aug-19 at 07:13

            I think it is a good idea to have Microservices communicate with each other asynchronously and in practice I also use this appraoch with a mix of orchestration and choreography depending on the use cases.

            Concerning the public API which you expose to your clients (e.g. web clients) over the internet it really depends on the determining factors and the options you are given. If your clients require REST based communication I would recommend to provide a fast response to the client synchronously by just providing the information that it went through Ok and some kind of unique id.

            So if you think of an order request of an online shop the API gateway would forward the request to the order Microservice (either via REST or in your case via Messaging and some translation from asynchronous to synchronous response at the API gateway layer). Anyway, there should be some kind of immediate response to the client the order service can provide which could simply contain the id of the new order. Everything else for processing the order will than happen asynchronously either completely via an event-based choreography (started by an OrderRequestReceived event or whatever name fits the domain language) or via some kind of workflow orchestrated by the order service (but still with asynchronous messaging).

            The client can then always use the order id to query the current state of the order which you will than provide based on the read model you are building.

            If you are free to implement the client the way want you can also look into WebSockets, using HTTP/2 to allow for pushing of status changes rather than requiring the clients to poll for the current state. Or you could even look into gRPC...

            Source https://stackoverflow.com/questions/62972530

            QUESTION

            Prooph Eventstore (PDO) and Doctrine DBAL results in multiple connections
            Asked 2019-Oct-04 at 07:06

            Situation

            I'm using Prooph for my commandbus, eventbus and eventstore within Symfony 4.3. Since not every aggregate needs to be eventsourced, we also use Doctrine DBAL to just simply CRUD those simple aggregates.

            Within a given domain I have commands / handlers configured in my commandbus which use either eventsourced repositories OR DBAL repositories.

            When injecting this commandbus into a CLI command this results in multiple db connections when running anything on the CLI.

            Problem

            When trying to delete/create the database (for pristine install or resetting the test environment) Postgres refuses because there is another active connection.

            ...

            ANSWER

            Answered 2019-Oct-01 at 21:40

            The second argument on the constructor of the MySQLEventStore is the PDO connection, see https://github.com/prooph/pdo-event-store/blob/master/src/MySqlEventStore.php#L82. You can use the same PDO instance for Doctrine and EventStore, but it's kind of dangerous as you could interfere with its transaction handling. I would recommend closing the Doctrine connection in the tests before dropping the database instead.

            Source https://stackoverflow.com/questions/58180534

            QUESTION

            Akka issue while starting PersistentActor : java.lang.IllegalArgumentException: Default journal plugin is not configured, see 'reference.conf'
            Asked 2019-Sep-19 at 11:16

            I am trying to work with PersistentActor in Akka.

            I tried the basic example provided in the Akka documentation at https://doc.akka.io/docs/akka/current/persistence.html.

            I am getting the following error at the starting of the actor:

            Caused by: java.lang.IllegalArgumentException: Default journal plugin is not configured, see 'reference.conf' at akka.persistence.Persistence$.verifyPluginConfigIsDefined(Persistence.scala:193) at akka.persistence.Persistence.defaultJournalPluginId$lzycompute(Persistence.scala:228) at akka.persistence.Persistence.defaultJournalPluginId(Persistence.scala:226) at akka.persistence.Persistence.journalConfigFor(Persistence.scala:336) at akka.persistence.Eventsourced.$init$(Eventsourced.scala:97) at akka.persistence.AbstractPersistentActor.(PersistentActor.scala:455) at org.spituk.learning.akka.samples.ExamplePersistentActor.(ExamplePersistentActor.java:72)

            The code I tried is like:

            ...

            ANSWER

            Answered 2019-Sep-19 at 11:16

            I had to add the following to the application.conf file:

            Source https://stackoverflow.com/questions/57997249

            QUESTION

            EventSource doesn't write logs in windows event viewer
            Asked 2019-Jan-16 at 09:47

            I'm trying to write log in Windows event viewer. I created class and create method for catching exceptions. Here is my code :

            ...

            ANSWER

            Answered 2018-Dec-15 at 09:20

            I have done this in the past write to the event log Application:

            Source https://stackoverflow.com/questions/53791076

            QUESTION

            Error resconf using OVSDB plugin
            Asked 2017-Dec-04 at 12:40

            I'm using ODL-Carbon and trying to get a simple REST:

            http://ip-controller:8181/restconf/config/network-topology:network-topology/topology/ovsdb:1/

            but I get this error message:

            ...

            ANSWER

            Answered 2017-Dec-04 at 12:40

            I've never seen this "it's not initialized yet. Please try again later" NotInitializedException, but it seems to indicate that the Data Store is not ready.. either you just need to wait a bit, or it perhaps there was serious error during start up. Have you checked if your karaf.log has any errors that could explain why?

            Source https://stackoverflow.com/questions/47599344

            QUESTION

            Akka Version mismatch in Class path Error
            Asked 2017-Nov-08 at 11:52

            i am using SBT to setup Akka Persistence but it's failing with Error :

            ...

            ANSWER

            Answered 2017-Nov-08 at 11:52

            Use the current version (0.5) of akka-management-cluster-http:

            Source https://stackoverflow.com/questions/47173616

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install eventsourced

            Snapshots represent processor state at a certain point in time and can dramatically reduce [recovery](#recovery) times. Snapshot capturing and saving is triggered by applications and does not delete entries from the event message history unless explicitly requested by an application. Applications can create snapshots by sending an Eventsourced processor a [SnapshotRequest](http://eligosource.github.com/eventsourced/api/snapshot/#org.eligosource.eventsourced.core.SnapshotRequest$) message (Scala API) or SnapshotRequest.get() message (Java API). This will asynchronously capture and save a snapshot of `processor’s state. The sender will be notified when the snapshot has been successfully saved. Alternatively, applications may also use the EventsourcingExtension.snapshot method to trigger snapshot creation. For example,. creates snapshots of processors with ids 1 and 2. The returned future (of type Future[scala.immutable.Set[SnapshotSaved]] (Scala API) or Future<java.util.Set<SnapshotSaved>> (Java API)) successfully completes when the snapshots of both processors have been successfully saved.

            Support

            Commercial support by [Eligotech B.V.](http://www.eligotech.com/).
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/eligosource/eventsourced.git

          • CLI

            gh repo clone eligosource/eventsourced

          • sshUrl

            git@github.com:eligosource/eventsourced.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link