mage-os / mageos-async-events Goto Github PK
View Code? Open in Web Editor NEWThis is a Mage-OS repo for the porting of the Magento Asynchronous Events Project found at https://github.com/aligent/magento-async-events.
License: MIT License
This is a Mage-OS repo for the porting of the Magento Asynchronous Events Project found at https://github.com/aligent/magento-async-events.
License: MIT License
If we want to include this module via composer, a release would be very helpful. I'd suggest creating a 3.0 and a 2.0 release.
@gowrizrh @aligent-lturner Thanks for your great work on this module!
When mage-os/terraform#44 is finished, it should be possible to configure the default branch via Terraform. However, I wonder why we shouldn't just use the main
branch for the latest 2.4-compatible version of this extension. I suggest simply renaming / moving the branch 3.x
to main
. Is there any reason against this, @gowrizrh? Thanks!
The readme in the main branch contains next to no information.
It would be helpful to tell folks they have to visit one of the 2.x or 3.x branches to see the documentation in the readme.
Async Event Subscriptions are globally scoped. It might make sense to scope them down to the store level.
https://github.com/cloudevents/spec/blob/main/cloudevents/primer.md
An event includes context and data about an occurrence. Each occurrence is uniquely identified by the data of the event.
Events represent facts and therefore do not include a destination, whereas messages convey intent, transporting data from a source to a given destination.
Events are commonly used in server-side code to connect disparate systems where the change of state in one system causes code to execute in another. For example, a source may generate an event when it receives an external signal (e.g. HTTP or RPC) or observes a changing value (e.g. an IoT sensor or period of inactivity).
To illustrate how a system uses CloudEvents, the simplified diagram below shows how an event from a source triggers an action.
The source generates a message where the event is encapsulated in a protocol. The event arrives to a destination, triggering an action which is provided with the event data.
A source is a specific instance of a source-type which allows for staging and test instances. Open source software of a specific source-type may be deployed by multiple companies or providers.
Events can be delivered through various industry standard protocols (e.g. HTTP, AMQP, MQTT, SMTP), open-source protocols (e.g. Kafka, NATS), or platform/vendor specific protocols.
Currently \MageOS\AsyncEvents\Model\Indexer\LuceneSearch
returns a list of all records if a match wasn't found in Elasticsearch. This is counter intuitive and instead should behave such that
Failing events are retried with exponential back-off. This eases out and handles back pressure accordingly.
However, should the recipient choose to explicitly tell to retry after X seconds, we should be able to respect that no matter the underlying protocol or client.
the Retry-After
is a standard header in https://tools.ietf.org/html/rfc7231#section-7.1.3.
The value of this field can be either an HTTP-date or a number of seconds to delay after the response is received.
The number of seconds to delay is a great way to introduce client specified back-off since we're already calculating back-off in seconds.
AWS defines several exceptions for rate limiting RequestLimitExceeded
, ThrottlingException
, BandwidthLimitExceeded
and a few others https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/faq.html
It already handles it internally within the SDK but should the exception bubble up (because of exceeding max attempts) or any other reason we should be able to leverage that.
Currently, all failures are retried if they are not successful. There are situations where it is unnecessary to retry when we know it will fail.
For example, In a HTTP context, if the external system returns a 4xx
status code denoting client error we should skip retrying.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.