TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Types of events in event-driven systems

137 点作者 frankdejonge大约 3 年前

9 条评论

adamkl大约 3 年前
I like the idea of using “fat” events as a means of data integration between systems.<p>Calling them RESTful events is a good term as I’ve pitched in much the same fashion. Every time a system responds to a create&#x2F;update&#x2F;execute request, drop an equivalent message into an event stream. Initially these can form the basis of a streaming ETL to whatever systems you use for analytics, but as new internal systems are brought online (e.g a new CRM system to help sales manage all the leads signing up for your successful product) the integration is already there, waiting. Just add a new consumer to the existing stream.<p>Overtime, you end up with a “data mesh”. If you look past the marketing of the term, it’s basically just means each application in your company should publish both sync (for real-time usage) and async (for data sharing between systems of record) interfaces.
评论 #30398660 未加载
评论 #30404791 未加载
ChrisMarshallNY大约 3 年前
I tend to use whatever types of events the system provides, in realtime. In some cases, it&#x27;s a real pain, as I can&#x27;t really choose what I get.<p>If I am using an event as a &quot;record&quot; of an event, I tend to store a &quot;before&quot; state, and an &quot;after&quot; state. In many cases, I can actually store entire serialized objects. This allows, for example, the ability to recreate an object state&#x2F;context, simply by re-instantiating the stored object, and using the reanimated instance to replace the current one.<p>Sort of a RESTFul event.<p>In my work, whenever possible, I like to use a &quot;RefCon&quot; pattern. This is a classic pattern, that I learned from working with Apple code, but I know that it&#x27;s a lot older.<p>We simply attach a &quot;RefCon&quot; (Reference Context) to an event. This is usually an untyped value, that is supplied to the event source, when it is set up, then, to the event target, when the event fires. These days, it&#x27;s easier, as closures&#x2F;lambdas often allow you to access the initiating context. In the old days, it might have simply been a single-byte value, that could be applied into a lookup table, to allow the called context to re-establish.<p>I recently ran into the need for one of these, in an SDK that I wrote, where I didn&#x27;t. I&#x27;m still kicking myself. I think that I didn&#x27;t supply it, because I thought it might have been too complicated for some consumers of the SDK.<p>In the six years or so, since I wrote that SDK, I have been the only consumer.
doctor_eval大约 3 年前
I found that GraphQL subscriptions give a great balance between trigger&#x2F;signal and fat&#x2F;REST events in complex environments.<p>The events that a subscriber is interested in are decorated with the exact data the subscriber specifies at subscription time, avoiding an API call while providing exactly the level of richness the client requires.
评论 #30407455 未加载
hashimotonomora大约 3 年前
Could anyone recommend more resources on this for studying?
评论 #30399613 未加载
hcarvalhoalves大约 3 年前
I think what the author named &quot;Domain events&quot; are equivalent to derivatives, &quot;Fat events&quot; are equivalent to step-wise integration, and &quot;Trigger events&quot; represent steps on a function of data on the time domain.
评论 #30407441 未加载
morelisp大约 3 年前
I like this ontology; we&#x27;ve divided our events into roughly similar categories but these are better names than we use.<p>I&#x27;d further advance that<p>- Trigger events and RESTful events are roughly the same thing, just a question of what you choose in latency vs. size vs. schema flexibility space. We even have events in our system whose schema inlines data below a certain size but links above that.<p>- There is a fourth type: windowed reductions over domain events, e.g. the &quot;changelog&quot; in Kafka Streams. This bears a similar relation to domain events as the RESTful event does to trigger events.
评论 #30404310 未加载
pphysch大约 3 年前
If you are using &quot;trigger events&quot; for security reasons, wouldn&#x27;t it be more appropriate to send an ephemeral &quot;eventID&quot; rather than an actual &quot;orderID&quot;? Otherwise you may be leaking order IDs, which could potentially carry useful information for an attacker.
评论 #30404877 未加载
评论 #30401644 未加载
评论 #30401578 未加载
virtualbluesky大约 3 年前
As &quot;restful events&quot; can&#x27;t exist without &quot;trigger events&quot; to communicate deletion, the categories aren&#x27;t really separable?
评论 #30404289 未加载
评论 #30404033 未加载
mokaman大约 3 年前
How is this different from three types of messages in enterprise integration patterns.