Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Engage 2020: Hello are you listening, There is stream for everything

393 views

Published on

The world is changing in a event driven world
Event driven architecture is not a new technology. IBM MQ is already 25 years old.
The popularity is increasing, because it is a robust, decoupled way to exchange data.
Today there are new popular 'new kids on the block'. Kafka is one of them and gets lots of attention also in the enterprise.
The principle however are still the same, called Pub Sub principle.
HCL will add to the App Dev pack the possibility to consume and produce to a broker/stream.
There are frameworks who helps you to focus on the business logic.

In this session I will explain this principle and show you that is not that difficult to make use of it. Connect your existing code to a service bus or queue, producing and consuming.

Published in: Software
  • Be the first to comment

  • Be the first to like this

Engage 2020: Hello are you listening, There is stream for everything

  1. 1. #engageug Hello are you listening There is stream for everything 1 Frank van der Linden - elstar IT
  2. 2. #engageug Introduction • Freelance Full stack developer • Owner of elstar IT • Curious of new technology • Spring Framework enthusiast • IBM Champion 2020 • Volleybal referee 2
  3. 3. #engageug This session about ‘thinking-out-side-of-the-yellow-bubble’ 3 Disclaimer
  4. 4. #engageug ‘Everything in life can be broken down to producers, consumers and producers’ 4 Mark Heckler
  5. 5. #engageug How to proceed • Pub Sub principle • About streams • Spring Cloud Streams • Demo 5
  6. 6. #engageug Publish/Subscribe principle 6
  7. 7. #engageug Publish/Subscribe principle 7
  8. 8. #engageug Publish/Subscribe principle • Loose coupling • Scalability • Non-blocking • Message driven • 4 interfaces (Producer, Subscriber, Subscription and Processor) 8
  9. 9. #engageug 9
  10. 10. #engageug About streams 10
  11. 11. #engageug Parts of the stream • Producer or Source or Publisher, publish the message on the topic or queue • Consumer or Sink or Receiver, receiving the message from the topic or queue • Processor, can consume message, manipulate it and produce it again. • Broker, the middleware who is handling the queues or topics. 11
  12. 12. #engageug Message Broker • Route messages to one or more destinations • Transform messages to an alternative representation • Provide content and topic-based message routing using the publish–subscribe pattern • Perform message aggregation, decomposing messages into multiple messages and sending them to their destination, then recomposing the responses into one message to return to the use • Respond to events or errors 12
  13. 13. #engageug Message Broker • Kafka • RabbitMQ • OpenMQ • ActiveMQ (Amazone MQ) • Google Cloud PubSub • Azure Service Bus • Amazone Kinesis • IBM MQ • …….. 13
  14. 14. #engageug 14
  15. 15. #engageug Queue versus Topic 15
  16. 16. #engageug 16 Domino Event Publisher
  17. 17. #engageug Domino Event Publisher • Add-on on Domino • Security Plugin for MQ’s needed to be installed • Will share UniqueID of Document and event type • Consumer needs to connect back to Domino to get all the information • May be later also other information to produce. • Private Beta will be available soon to HCL Masters. 17
  18. 18. #engageug Domino Event Publisher - my opinion • A good first step to embrace the decoupled world • Too much moving parts • Too complicated • Not following the pub/sub principle, because of the needed call back • Hope it will be possible in the future to share just information with the broker. 18
  19. 19. #engageug Spring Cloud Stream 19
  20. 20. #engageug Spring Cloud Stream • Part of the Spring Cloud Family • Abstraction of the connection with a broker • Works in existing Spring Boot apps • Binders are the foundation • Multiple brokers are supported 20
  21. 21. #engageug 21
  22. 22. #engageug 22
  23. 23. #engageug 23
  24. 24. #engageug Demo application 24
  25. 25. #engageug Demo • Spring Boot - foundation for Java API • Spring data - for connection to datastore • Spring Cloud Stream - abstraction to connect to broker • RabbitMQ • NodeJS + Typescript • MongoDb • Redis 25
  26. 26. #engageug 26 controller + producercontroller + producer http://localhost:3031/demo/api/todohttp://localhost:4000/api/todo processorprocessor consumer consumer post to database
  27. 27. #engageug Demo Flow 27 producer processor consumer message.header.type=open message.header.type=completed
  28. 28. #engageug Spring Cloud Stream - things to remember 28 application.yaml pom.xml
  29. 29. #engageug Spring Cloud Stream - things to remember 29 bindings processor producer consumer
  30. 30. #engageug NodeJS - things to remember 30 server.ts controller router
  31. 31. #engageug NodeJS - things to remember 31 processor producer
  32. 32. #engageug NodeJS - things to remember 32 consumer mongo service redis service
  33. 33. #engageug Questions 33
  34. 34. #engageug Resources • Spring Cloud Stream • https://spring.io/projects/spring-cloud-stream • Demo application • https://github.com/flinden68/streams-demo • RabbitMQ • https://www.rabbitmq.com/documentation.html • MongoDb • https://www.mongodb.com/ • Redis • https://redis.io/topics/quickstart • NodeJS • https://nodejs.org/en/ 34 • MongoDb Compass Community • https://www.mongodb.com/products/compass • Redily (GUI for Redis) • https://www.redily.app/
  35. 35. #engageug Thank you • @flinden68 • http://www.elstarit.nl • flinden68@elstarit.nl • https://nl.linkedin.com/in/flinden68 35

×