"The flying Dutchman" (see also photo page) |
Key Takeaways
|
Introduction
There is a lot of hype around Microservices and the
use of events for implementing the choreography pattern. However this is nice for companies like Netflix and Twitter, but there are a lot of organisations still struggling with files and ESB like products. Also my current client uses an ESB namely the Oracle SOA Suite 12c for integrations. We cannot just throw away this ESB, but we can make use of the event mechanism built in. This blog describes the way we use the EDN (Event
Delivery Network) component, that is used within SOA composites to throw
events and to subscribe on events.
Notes:
EDN
Oracle has a component that you can use to publish events and to subscribe on events within a SOA composite. Just use the invoke activity with the eventname and the content of the event. Within a composite you can subscribe on events and set filters. You can also configure “oneAndOnlyone” consistency property and indicate if you want a durable or non-durable subscriber. The EDN hides the underlying JMS provider, which can be changed (weblogic jms or OracleAQ). Separate Topics can be defined for each event or just use 1 topic for all events.Notes:
- Applications must always be abstracted by a corresponding SOA Composite. Applications should not use JMS directly
- EDN cannot be used directly from within Oracle OSB
Event
We use the following definition for an
event. The event is based on business entities and the operations executed on
those entities. We use the following definition:
BusinessObject The name of the business entity, i.e.
Invoice, Customer
Operation Created, Updated, Deleted
TrackingId Tracking ID so that flows can be
followed
SourceSystem The system that published the event
TargetSystem The target system to which the event must
be sent explicitly. This is
an optional field
an optional field
Identifiers This is used to add meta data, i.e.
invoice number, location, order number
Message The message. This contains the
content of the business entity
Master
data entities
This works fine for master data entities,
because you want to use events to indicate that entities are created, updated
or deleted. We use this to decouple the MDM solution from the interested
applications. New applications are easily added by making a SOA composite subscriber for that application.
Transactional
data
In this case the solution falls short,
because the context is missing. For example when an Invoice is received from a
customer, you want to send the event InvoiceReceivedFromCustomer.
In our case we use the Created operation on Invoice but this does not say much.
Within the meta data we had to add more context information.
Lessons learned
|
Data will change
The content of entities will change, i.e.
fields are added. After this change you want to synchronize the interested
applications with this new information. This is especially needed for master
data. So you are decoupled on the publishing- and subscribing applications, but
still strongly coupled to the data. You need to synchronize the new dataset to
the applications (batch). There are several options:
·
Use ETL to synchronize the data
This can be a good option in case it is lots of data. Extra tooling and data transformation is needed, which you tried to avoid. The source and target systems are again coupled.
This can be a good option in case it is lots of data. Extra tooling and data transformation is needed, which you tried to avoid. The source and target systems are again coupled.
·
Publish all data and make use of the Pub-Sub implementation
This works fine in case there are less entities. You don’t need extra ETL tooling but re-use the publish-subscribe mechanism. We use this and also use the targetSystem field within the event, when we know it is only relevant to a particular application(s).
This works fine in case there are less entities. You don’t need extra ETL tooling but re-use the publish-subscribe mechanism. We use this and also use the targetSystem field within the event, when we know it is only relevant to a particular application(s).
Lessons learned
|
Filters
What I see often in integration projects,
is that each interested application a new integration is built particularly for
that application. For example a new supplier wants to retrieve Invoice messages
from the company. However it wants to retrieve the invoice in its own format (for
example csv) and based on its own protocol (for example sftp). The application, that generates the invoices, just exports yet another file. What I propose is to let
the publishing application generate Invoice events. It should have no knowledge about the interesting applications. It just has to do the jobs. Then for each supplier make
a Subscribe composite that filters the Invoices targeted for that supplier and
map the Invoice to the suppliers format and protocol. This is where the
Subscriber composite filters come in.
With the filter you can define which events you want to receive. Note that you can also indicate if you want to have a Durable subscriber. In that case you receive events in case the composite was stopped.
Lessons learned
|
Error handling
Functional- and technical errors are unavoidable. This also is the case with events, but with the extra complexity that the publisher is decoupled from the subscriber(s). This means that in case the event is published from the source, the work is done. But still errors can occur within the subscriber both functionally as technically. you have to think of the following scenario's:
- Do i want to be able to re-publish the same event?
The consequence is that target systems must implement idempotency - Does the sending application need to know that all targets have successfully handled the event?
I my opinion you should try to solve the problem at the target, because otherwise you introduce strong coupling again. This also depends on the business requirements of course.
Conclusion
There are more topics that can be discussed, i.e. event versioning, data security. Maybe another time.
As always, feedback and questions are very welcome !
As always, feedback and questions are very welcome !
Conclusion
Event
driven architectures can be a good solution to decouple applications! We are
now able to connect new applications faster than before, because of the Pub-Sub
pattern and the standardization of the event data.
Think
about the events you publish, because otherwise you still need much of filter
logic within the subscribers. Also think about the way you want so solve data
synchronization/reconciliation in case the data is changed.
|
Deze reactie is verwijderd door een blogbeheerder.
BeantwoordenVerwijderenThanks for sharing this. Nice informative and helpfull.We are the largest shot blasting machine manufacturers & Suppliers in Faridabad,India. Get the all types of Shot
BeantwoordenVerwijderenblasting machines and their equipments @ best prices & unmatched services. Call us @ 9811083740.
shot blasting machine manufacturers
shot blasting
sandblasting
sand blasting machine
steel shots distributors
Sandblasting Abrasive media
BeantwoordenVerwijderenAwesome post. I am a normal visitor of your blog and appreciate you taking the time to maintain the excellent site. I’ll be a frequent visitor for a long time.
video production company
production houses in delhi
Corporate film makers
Documentary Film Makers in Delhi
Filmmakers in Delhi
promotional video services in delhi ncr
Jeewangarg is one of the Best Digital Marketing Agencies where you can find each and every solution under one roof. We are efficient enough to provide our clients the best seo services in Delhi & PPC Services in Delhi at the same place. Moreover, we are the best website designing company in delhi ncr.
BeantwoordenVerwijderenNice post. Plan Your next Holidays with Indian Travel Store and get some Exciting Deals on Tours & Travels Packages for Shimla, Manali, Nepal, Bhutan, Rajasthan, Dalhousie, Dharamshala, Kerala, Uttarakhand and many more. Book your next Shimla Manali Tour Package with us for availing some great deals.
BeantwoordenVerwijderenManali tour package
Shimla manali tour package
Deze reactie is verwijderd door de auteur.
BeantwoordenVerwijderenGreat post. Keep sharing amazing content like this
BeantwoordenVerwijderenAlso checkout some interesting content from below links
Hostinger Black Friday Deal
Black Friday Email Marketing Tools
Acadle Lifetime Deal
Thank you for sharing this article. This is very insinghful blog please visit here for get skin treatment Best Skin Specialist In Jaipur
BeantwoordenVerwijderenBest Dermatologist In Jaipur
Best Acne treatment In Jaipur
Best PRP Treatment in Jaipur
Best Hair Fall Doctor In Jaipur
Fungal Infection In Jaipur
Thank you for sharing this article please visit here Full Mouth Dental Implant in Jaipur
BeantwoordenVerwijderenLaser Dentistry In Jaipur
Smile Makeover in Jaipur
Invisiable Brace in Jaipur
Teeth Whitening in Jaipur
BeantwoordenVerwijderenThe GDS3702 features a built-in microphone and speaker to support intercom functionality supports integration with electric locks for locking and unlocking doors and offers alarm-in and alarm-out support for integration with existing security systems.