To see presentation notes, press the s key on your keyboard.
two message middleware patterns are commonly used:
messages have a topic
subscribers will only get messages on the topic(s) they have subscribed to
subpub's topic is called the MESSAGE-TYPE
Content filtered - this message oriented middleware filtering is aware of the format and schema of the messages themselves. Topic filtered - this filtering mechanic uses only message metadata to make decisions on where to send messages. the messages themselves are binary-opaquesynchronicity: an API concept
synchronous: requests have responses
asynchronous: send messages; then, call me maybe
synchronicity is an API concept, which is characterized by expectations around responses to requests. in the eyes of a client of synchronous api, one response always comes after one request. clients of a synchronous API are asked to assume that a response will arrive soon. in an asynchronous api, there are no requests and responses, only transmissions and receptions, which may occur unprompted This is different from concepts around the semantics of trasport like full-duplex and half-duplex; and this is also different from the concepts of concurrency or parallelismMessages into SubPub use standard HTML form encoding the same as is specified by the w3c, used to submit forms all over the web.
message oriented middleware has been around for a long, long time, but the best solutions are traditionally closed source, or use a proprietary protocol on the other extreme, basically every piece of software that connects to a network has a http client library, that can send a HTML 4 form post SubPub marries the AMQP messaging protocol with the HTML 4 form post specification this spec doesn't have a concept of encoding (UTF-8, ISO, etc.) lower ASCII, printable characters work as is, but how to send other text isn't specified.Assuming that either JavaScript or the user is able to fill in a value for AUTHORIZATION, is the following HTML snippet is enough to send a message to SubPub from any web browser:
<form action="http://prospero.ecollege.com/v1/message" method="post"> <p> Message Type: <input type="text" name="MESSAGE-TYPE"><br> System: <input type="text" name="SYSTEM"><br> SubSystem: <input type="text" name="SUB-SYSTEM"><br> Client: <input type="text" name="CLIENT"><br> ClientString: <input type="text" name="CLIENT-STRING"><br> Realm: <input type="text" name="REALM"><br> Payload: <input type="text" name="PAYLOAD"><br> Payload Content Type: <input type="text" name="PAYLOAD-CONTENT-TYPE"><br> <input type="hidden" name="AUTHORIZATION" value="EXAMPLE|2015-01-16T03:49:38+0000|44a620f04b02619fef1f2552993688cc"> <br> <input type="submit" value="Send"> <input type="reset"> </p> </form>
POST /v1/message HTTP/1.1 Content-Length: 257 Content-Type: application/x-www-form-urlencoded; charset=UTF-8 Host: prospero.ecollege.com Connection: Keep-Alive User-Agent: Apache-HttpClient/4.3.3 (java 1.5) Accept-Encoding: gzip,deflate CLIENT=dc.test &CLIENT-STRING=dc.test &MESSAGE-TYPE=dc.test &SYSTEM=dc.test &SUB-SYSTEM=dc.test &REALM=* &PAYLOAD=Hello%2C+World%21 &PAYLOAD-CONTENT-TYPE=application%2Fjson&TAGS &AUTHORIZATION=ONE%7C2015-01-16T03%3A49%3A38%2B0000%7C44a620f04b02619fef1f2552993688ccSubPub will see a message like this Line breaks included for clarity
Creation of subscriptions works the same...
POST /v1/subscription HTTP/1.1 Content-Length: 303 Content-Type: application/x-www-form-urlencoded; charset=US-ASCII Host: prospero.ecollege.com Connection: Keep-Alive User-Agent: Apache-HttpClient/4.3.3 (java 1.5) Accept-Encoding: gzip,deflate CALLBACK-URL=http%3A%2F%2Fmyservice.example.net%3A5050%2Fcallbacks%3Fadorable_cat_pictures%3Dtrue%26sub%3D1 &WSDL-URI= &TAGS= &CLIENT=dc.test &CLIENT-STRING=dc.test &MESSAGE-TYPE=dc.test &SYSTEM=dc.test &SUB-SYSTEM=dc.test &AUTHORIZATION=ONE%7C2015-01-16T04%3A05%3A31%2B0000%7C6a221781ba5ecc66db83a11c0dd42d2e
as well as message deliveries from SubPub.
POST /callback HTTP/1.1 Content-Type: application/x-www-form-urlencoded Host: myservice.example.net:5151 Content-Length: 327 DELIVERY-ATTEMPT-ID=00000cf5-67fc-5fd5-2875-37d1b13142e1 &MESSAGE-TYPE=dc.test &MESSAGE-ID=00000cf5-67fc-5fd5-2875-37d1b13142e1 &AUTHORIZATION=ONE%7C2015-01-16T04%3A11%3A50Z%7C0169ac2ec9ffc60ceff2f003b72e8a33 &AUTHORIZATION-DELIMITER=%7C &PAYLOAD=%7B%27message%27%3A%27Hello%2C+World%21%27%7D &PAYLOAD-CONTENT-TYPE=application%2FjsonLine breaks added for clarity
publishers:
subscribers:
publishers AND subscribers: