Slide 1

Slide 1 text

Lead Consultant www.ajira.tech Tamizhvendan S Passionate, Pragmatic and Polyglot Programmer https://www.demystifyfp.com tamizhvendan Building an E-Commerce Marketplace Middleware in Clojure

Slide 2

Slide 2 text

OMS Back office Cromā

Slide 3

Slide 3 text

Back office Cromā

Slide 4

Slide 4 text

Cromā

Slide 5

Slide 5 text

Marketplace Middleware Cromā

Slide 6

Slide 6 text

The System Requirement OMS Back office

Slide 7

Slide 7 text

The System Requirement OMS … IBMMQ Back office

Slide 8

Slide 8 text

The System Requirement OMS … IBMMQ Marketplace Middleware Back office

Slide 9

Slide 9 text

The System Requirement OMS … IBMMQ Marketplace Middleware HTTP Back office

Slide 10

Slide 10 text

The System Requirement OMS … IBMMQ Marketplace Middleware HTTP Back office

Slide 11

Slide 11 text

The System Requirement OMS … IBMMQ Marketplace Middleware HTTP Back office PostgreSQL Back office

Slide 12

Slide 12 text

OMS … IBMMQ Marketplace Middleware HTTP Back office

Slide 13

Slide 13 text

OMS … IBMMQ Marketplace Middleware HTTP Back office Twelve Different Types Of Messages Ranging, Deranging, Pricing, Confirming Order, etc.,

Slide 14

Slide 14 text

OMS … IBMMQ Marketplace Middleware HTTP Back office Twelve Different Types Of Messages Ranging, Deranging, Pricing, Confirming Order, etc., Three Different Target Systems Tata-CliQ, Flipkart, Amazon

Slide 15

Slide 15 text

OMS … IBMMQ Marketplace Middleware HTTP Back office Twelve Different Types Of Messages Ranging, Deranging, Pricing, Confirming Order, etc., Three Different Target Systems Tata-CliQ, Flipkart, Amazon Four Different Data Representations OMS, Tata-CliQ, Flipkart, Amazon

Slide 16

Slide 16 text

OMS … IBMMQ Marketplace Middleware HTTP Back office Twelve Different Types Of Messages Ranging, Deranging, Pricing, Confirming Order, etc., Three Different Target Systems Tata-CliQ, Flipkart, Amazon Four Different Data Representations OMS, Tata-CliQ, Flipkart, Amazon Error Handling Invalid Message, Invalid Channel Configuration, Processing Failure, etc.,

Slide 17

Slide 17 text

How to implement Marketplace Middleware ?

Slide 18

Slide 18 text

Lifecycle of an OMS Message

Slide 19

Slide 19 text

Reading messages from IBMMQ and dispatching them to handler Parsing the message Processing the message Logging the events OMS … IBMMQ Marketplace Middleware HTTPS Back office Handling the message

Slide 20

Slide 20 text

Reading messages from IBMMQ and dispatching them to handler Parsing the message Polymorphic) Processing the message Polymorphic) Logging the events PostgreSQL, Slack) OMS … IBMMQ Marketplace Middleware HTTPS Back office Handling the message

Slide 21

Slide 21 text

Reading messages from IBMMQ and dispatching them to handler Parsing the message Polymorphic) Processing the message Polymorphic) Handling the message Logging the events PostgreSQL, Slack) Separate Application Boundaries

Slide 22

Slide 22 text

Parsing The Message

Slide 23

Slide 23 text

A Sample Ranging Message AEEXTNChannelList>

Slide 24

Slide 24 text

Parsed Ranging Message

Slide 25

Slide 25 text

A Sample Pricing Message AEEXTNChannelItemList> AEEXTNChannelList>

Slide 26

Slide 26 text

Parsed Pricing Message

Slide 27

Slide 27 text

Parsing The Message

Slide 28

Slide 28 text

No content

Slide 29

Slide 29 text

No content

Slide 30

Slide 30 text

No content

Slide 31

Slide 31 text

No content

Slide 32

Slide 32 text

No content

Slide 33

Slide 33 text

No content

Slide 34

Slide 34 text

No content

Slide 35

Slide 35 text

No content

Slide 36

Slide 36 text

No content

Slide 37

Slide 37 text

Reading messages from IBMMQ and dispatching them to handler Parsing the message Polymorphic) Processing the message Polymorphic) Handling the message Logging the events PostgreSQL, Slack) Progress …

Slide 38

Slide 38 text

Processing The Message

Slide 39

Slide 39 text

Ranging on Tata-CliQ Channel

Slide 40

Slide 40 text

Pricing on Tata-CliQ Channel

Slide 41

Slide 41 text

Ranging on Flipkart Channel

Slide 42

Slide 42 text

Pricing on Flipkart Channel

Slide 43

Slide 43 text

Processing The Message

Slide 44

Slide 44 text

No content

Slide 45

Slide 45 text

No content

Slide 46

Slide 46 text

No content

Slide 47

Slide 47 text

No content

Slide 48

Slide 48 text

Reading messages from IBMMQ and dispatching them to handler Parsing the message Polymorphic) Processing the message (ranging) Handling the message Logging the events PostgreSQL, Slack) Progress … Getting the channel config Polymorphic) Updating the channel

Slide 49

Slide 49 text

Getting Channel Configuration

Slide 50

Slide 50 text

Getting Channel Configuration

Slide 51

Slide 51 text

Getting Channel Configuration

Slide 52

Slide 52 text

Reading messages from IBMMQ and dispatching them to handler Parsing the message Polymorphic) Processing the message (ranging) Handling the message Logging the events PostgreSQL, Slack) Progress … Getting the channel config Polymorphic) Updating the channel

Slide 53

Slide 53 text

Processing Ranging on Channels

Slide 54

Slide 54 text

No content

Slide 55

Slide 55 text

No content

Slide 56

Slide 56 text

No content

Slide 57

Slide 57 text

No content

Slide 58

Slide 58 text

No content

Slide 59

Slide 59 text

No content

Slide 60

Slide 60 text

No content

Slide 61

Slide 61 text

No content

Slide 62

Slide 62 text

No content

Slide 63

Slide 63 text

Ranging on Tata-CliQ Channel

Slide 64

Slide 64 text

Transforming Ranging Items

Slide 65

Slide 65 text

Transforming Ranging Items

Slide 66

Slide 66 text

Transforming Ranging Items

Slide 67

Slide 67 text

Tata-CliQ API Client

Slide 68

Slide 68 text

Tata-CliQ API Client

Slide 69

Slide 69 text

Tata-CliQ API Client

Slide 70

Slide 70 text

No content

Slide 71

Slide 71 text

No content

Slide 72

Slide 72 text

Ranging on Flipkart Channel

Slide 73

Slide 73 text

Reading messages from IBMMQ and dispatching them to handler Parsing the message Polymorphic) Processing the message (ranging) Handling the message Logging the events PostgreSQL, Slack) Progress … Getting the channel config Polymorphic) Updating the channel

Slide 74

Slide 74 text

Processing the Ranging Message

Slide 75

Slide 75 text

Reading messages from IBMMQ and dispatching them to handler Parsing the message Polymorphic) Processing the message (pricing) Handling the message Logging the events PostgreSQL, Slack) Pricing - Repeat Yourself Getting the channel config Polymorphic) Updating the channel

Slide 76

Slide 76 text

Reading messages from IBMMQ and dispatching them to handler Parsing the message Polymorphic) Processing the message Polymorphic) Handling the message Logging the events PostgreSQL, Slack) Progress …

Slide 77

Slide 77 text

Handling the OMS Message

Slide 78

Slide 78 text

Reading messages from IBMMQ and dispatching them to handler Parsing the message Polymorphic) Processing the message Polymorphic) Handling the message Logging the events PostgreSQL, Slack) Progress …

Slide 79

Slide 79 text

Message Handling 10,000 ft View

Slide 80

Slide 80 text

Integration Operation Segregation Principle (IOSP) A module should either contain business logic or integrate other modules but not both.

Slide 81

Slide 81 text

No content

Slide 82

Slide 82 text

Polymorphic) Polymorphic) Processing the message Getting the channel config Transforming the message Performing the action Reading messages from IBMMQ and dispatching them to handler Parsing the message Handling the message Polymorphic) Logging the event PostgreSQL, Slack) Progress … Getting the channel config

Slide 83

Slide 83 text

Reading Messages from IBM-MQ

Slide 84

Slide 84 text

Reading Messages from IBM-MQ

Slide 85

Slide 85 text

Reading messages from IBMMQ and dispatching them to handler Parsing the message Polymorphic) Processing the message Polymorphic) Handling the message Logging the events PostgreSQL, Slack) Progress …

Slide 86

Slide 86 text

… IBMMQ Logging The Events OMS Marketplace Middleware HTTP Back office

Slide 87

Slide 87 text

… IBMMQ Logging The Events OMS Marketplace Middleware HTTP Back office PostgreSQL Back office

Slide 88

Slide 88 text

https://www.youtube.com/watch?v=yTkzNHF6rMs … functional core is surrounded by a shell of imperative code: it manipulates stdin, stdout, the database, and the network, all based on values produced by the functional core.

Slide 89

Slide 89 text

https://www.youtube.com/watch?v=yTkzNHF6rMs … functional core is surrounded by a shell of imperative code: it manipulates stdin, stdout, the database, and the network, all based on values produced by the functional core.

Slide 90

Slide 90 text

Marketplace Middleware PostgreSQL Back office

Slide 91

Slide 91 text

Don’t Do! Express!!

Slide 92

Slide 92 text

No content

Slide 93

Slide 93 text

Log Appenders

Slide 94

Slide 94 text

Imperative Shell

Slide 95

Slide 95 text

Functional Core

Slide 96

Slide 96 text

Imperative Shell

Slide 97

Slide 97 text

Imperative Shell

Slide 98

Slide 98 text

Imperative Shell

Slide 99

Slide 99 text

Imperative Shell

Slide 100

Slide 100 text

Imperative Shell

Slide 101

Slide 101 text

No content

Slide 102

Slide 102 text

Error Handling

Slide 103

Slide 103 text

Don’t Do! Express!!

Slide 104

Slide 104 text

Don’t Do! Express!!

Slide 105

Slide 105 text

Don’t Do! Express!!

Slide 106

Slide 106 text

handling with care :)

Slide 107

Slide 107 text

Error Handling

Slide 108

Slide 108 text

processing with care :)

Slide 109

Slide 109 text

Error Handling

Slide 110

Slide 110 text

Inspired By