Presentation is loading. Please wait.

Presentation is loading. Please wait.

STOMP 1.2 GETTING THE MESSAGE ACROSS: REBOOTED. BRIEF INTRODUCTION Julian Lyndon-Smith, IT Director dot.r limited Progress developer since v3, 1987 Living.

Similar presentations


Presentation on theme: "STOMP 1.2 GETTING THE MESSAGE ACROSS: REBOOTED. BRIEF INTRODUCTION Julian Lyndon-Smith, IT Director dot.r limited Progress developer since v3, 1987 Living."— Presentation transcript:

1 STOMP 1.2 GETTING THE MESSAGE ACROSS: REBOOTED

2 BRIEF INTRODUCTION Julian Lyndon-Smith, IT Director dot.r limited Progress developer since v3, 1987 Living proof of “old dog, new tricks” Often hanging around on PEG and PSDN Always up for a good argument ;)

3 WHY MESSAGING ? In-application Inter process Lan Wan Internet

4 WHAT’S WRONG WITH … Pub / sub Sonic IP/Works Zero MQ MO/SMS

5 WHAT’S NEEDED Message server Clients connect to server, like 4GL clients to db server Free / open source Portable Easy to set up and admin Usable from the 4GL

6 WHAT’S AVAILABLE Apache Apollo HornetMQ RabbitMQ MorbidMQ Apache ActiveMQ

7 WE CHOSE … Apache ActiveMQ http://activemq.apache.org Fusesource used to be a division of Psc Fits all the criteria Queues Topics wildcards

8 WHAT PROTOCOL ? Openwire REST Stomp XMPP AMQP

9 ENTER STOMP “STOMP provides an interoperable wire format so that STOMP clients can communicate with any STOMP message broker to provide easy and widespread messaging interoperability among many languages, platforms and brokers.”

10 ENTER STOMP Simple Text-Orientated Messaging Protocol Stomp.github.com Text-based Therefore easy to use in the 4GL Multiple clients Java,.net, javascript, php, ruby …

11 STOMP PROTOCOL Each message is sent within a “Frame” COMMAND Header1:value Header2:value Body^@

12 STOMP PROTOCOL Frame starts with command string Followed by zero or more headers Each header consists of : Blank line indicates end of headers The body is terminated with a null ( chr(0) )

13 STOMP PROTOCOL All commands and headers are in UTF-8 As mentioned, the body is terminated with chr(0) Unless you have a content-length:n header Which then means the body is read for n octets Regardless of embedded nulls

14 CONNECTING Client initiates connection by sending a CONNECT frame CONNECT accept-version:1.2 host:stomp.github.org ^@

15 CONNECTED Server responds with a CONNECTED frame CONNECTED version:1.2 ^@

16 SENDING MESSAGES Client sends messages by sending a SEND frame to a destination Queue Topic

17 SENDING MESSAGES SEND destination:/queue/a content-type:text/plain hello queue a ^@

18 SENDING MESSAGES SEND destination:/topic/b content-type:text/plain hello topic b ^@

19 RECEIVING MESSAGES Client receives messages by sending a SUBSCRIBE frame Queue Topic Wildcards

20 RECEIVING MESSAGES Client receives messages by sending a SUBSCRIBE frame Waits for a message to arrive on the socket Data is parsed by the 4GL

21 RECEIVING MESSAGES SUBSCRIBE id:0 destination:/queue/foo ^@

22 RECEIVING MESSAGES Server sends messages to subscribed clients by sending a MESSAGE frame MESSAGE subscription:0 message-id:007 destination:/queue/a content-type:text/plain hello queue a^@

23 WELL, THAT SEEMS SIMPLE ENOUGH

24 WALK BEFORE YOU RUN … ABL Socket issues Read-response procedure ABL Issues Memory leaks Performance issues

25 SUCCESS ! All 4GL issues solved By better coding Fixed sockets by :enabled Fixed memory leaks by better use of events

26 PLATFORMS 4GL Clients Win32, webspeed, character NOT Appserver Linux supported (as tested by Tom Bascom) Many other clients

27 WHAT CAN WE DO WITH THIS ? 4GL – 4GL communication Internal, local, network, internet Node.js  4GL Web browsers  4GL Rest / curl / php / ruby / js  4GL …

28 HOW MUCH IS THIS GOING TO COST ? Nothing. Nada. Server is free (ActiveMQ) http://activemq.apache.org/ 4GL Stomp adapter is free https://bitbucket.org/jmls/stomp/overview MIT licence. Free to use in commercial products

29 DEMOS, QUESTIONS, DEBATE


Download ppt "STOMP 1.2 GETTING THE MESSAGE ACROSS: REBOOTED. BRIEF INTRODUCTION Julian Lyndon-Smith, IT Director dot.r limited Progress developer since v3, 1987 Living."

Similar presentations


Ads by Google