You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by Rajith Attapattu <ra...@gmail.com> on 2010/04/12 23:30:26 UTC
Examples
Hi All,
Judging by some of the questions on the user list, I feel we could do
a much better with our examples.
(Also our examples should be more visible in the source tree and
easily accessible from our release artefacts.
However I believe that is a different discussion for another day.)
I am envisioning the following structure for the examples, and most of
the old examples can be easily adapted to the new format.
1. store-and-forward.
2. pub/sub with topics
3. request-reply
4. map messages
5. using flow control
6. * using addressing options (multiple examples showing binding to
multiple exchanges, create/delete/assert options ..etc)
7. using SSL/Kerb encryption
8. Authentication (ex. Kerberos, external)
9. using failover
10. transactions
* Maybe drain and spout could be used for this (as is or with some
modifications) ?
The examples should be simple.
We should avoid excessive code level comments, instead ship
supplementary documentation that explains the finer points.
Comments and suggestions are much appreciated.
Regards,
Rajith Attapattu
Red Hat
http://rajith.2rlabs.com/
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org
Re: Examples
Posted by Carl Trieloff <cc...@redhat.com>.
Based on the python questions we also need to add some Multi-threading
examples.
Carl.
On 04/12/2010 05:30 PM, Rajith Attapattu wrote:
> Hi All,
>
> Judging by some of the questions on the user list, I feel we could do
> a much better with our examples.
> (Also our examples should be more visible in the source tree and
> easily accessible from our release artefacts.
> However I believe that is a different discussion for another day.)
>
> I am envisioning the following structure for the examples, and most of
> the old examples can be easily adapted to the new format.
>
> 1. store-and-forward.
> 2. pub/sub with topics
> 3. request-reply
> 4. map messages
> 5. using flow control
> 6. * using addressing options (multiple examples showing binding to
> multiple exchanges, create/delete/assert options ..etc)
> 7. using SSL/Kerb encryption
> 8. Authentication (ex. Kerberos, external)
> 9. using failover
> 10. transactions
>
> * Maybe drain and spout could be used for this (as is or with some
> modifications) ?
>
> The examples should be simple.
> We should avoid excessive code level comments, instead ship
> supplementary documentation that explains the finer points.
>
> Comments and suggestions are much appreciated.
>
> Regards,
>
> Rajith Attapattu
> Red Hat
> http://rajith.2rlabs.com/
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project: http://qpid.apache.org
> Use/Interact: mailto:dev-subscribe@qpid.apache.org
>
>
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org
Re: Examples
Posted by Gordon Sim <gs...@redhat.com>.
On 04/14/2010 01:44 PM, Martin Ritchie wrote:
> On 13 April 2010 13:19, Gordon Sim<gs...@redhat.com> wrote:
>> My suggestion is:
>>
>> (a) we get rid of the old amqp 0-10 specific examples
>> (b) we have a simple helloworld example in each language
>> (c) we have spout and drain to show different messaging patterns
>> (d) we have a client-server example (to show use of reply-to and creation or
>> temp reply queues)
>
> Would be really good to have this example work between langauges. So
> having the same examples in .net, C, Java, Python, Ruby that have a
> sender / receiver that work with any other given language.
Indeed. Actually the existing examples do all interoperate as you
describe, but we only have them for c++, python and JMS. We shouldn't
lose that in any changes. And we should add in equivalents in ruby and
.net as we are able also.
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org
Re: Examples
Posted by Martin Ritchie <ri...@apache.org>.
On 13 April 2010 13:19, Gordon Sim <gs...@redhat.com> wrote:
> On 04/12/2010 10:30 PM, Rajith Attapattu wrote:
>>
>> Hi All,
>>
>> Judging by some of the questions on the user list, I feel we could do
>> a much better with our examples.
>> (Also our examples should be more visible in the source tree and
>> easily accessible from our release artefacts.
>> However I believe that is a different discussion for another day.)
>>
>> I am envisioning the following structure for the examples, and most of
>> the old examples can be easily adapted to the new format.
>>
>> 1. store-and-forward.
>> 2. pub/sub with topics
>> 3. request-reply
>> 4. map messages
>> 5. using flow control
>> 6. * using addressing options (multiple examples showing binding to
>> multiple exchanges, create/delete/assert options ..etc)
>> 7. using SSL/Kerb encryption
>> 8. Authentication (ex. Kerberos, external)
>> 9. using failover
>> 10. transactions
>>
>> * Maybe drain and spout could be used for this (as is or with some
>> modifications) ?
>
> I think drain and spout should be used for 1. and 2. as well, also for 9.
> and even to a lesser extent for 4.
>
> I don't think 7. and 8. require a separate example. It is just a
> configuration issue. Ideally all the examples should work using different
> authentication configuration and we need some clear and accessible
> documentation on how to do that rather than new examples. The same is
> probably true for SSL.
>
>> The examples should be simple.
>
> I think one of the problems is that all the examples are very simple. Having
> simple examples is certainly important. However to my mind some of the
> questions raised might be better answered by a slightly more involved
> example, e.g. the reservations example in python.
>
> My suggestion is:
>
> (a) we get rid of the old amqp 0-10 specific examples
> (b) we have a simple helloworld example in each language
> (c) we have spout and drain to show different messaging patterns
> (d) we have a client-server example (to show use of reply-to and creation or
> temp reply queues)
Would be really good to have this example work between langauges. So
having the same examples in .net, C, Java, Python, Ruby that have a
sender / receiver that work with any other given language.
> (e) maybe have a dedicated map message example (not totally sure this is
> needed)
> (f) we start trying to build out the reservations example as a more complete
> program
> (g) we describe how to run at least spout and drain using authentication,
> SSL etc
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project: http://qpid.apache.org
> Use/Interact: mailto:dev-subscribe@qpid.apache.org
>
>
--
Martin Ritchie
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org
Re: Examples
Posted by Jonathan Robie <jo...@redhat.com>.
On 04/13/2010 12:02 PM, Gordon Sim wrote:
> On 04/13/2010 04:36 PM, Rajith Attapattu wrote: While drain and spout
> are excellent for demonstrating these aspects
>> they are not necessarily good code examples.
>> While the python is nice and compact the c++ and and the JMS based
>> versions are not !
>
> I would argue that the issue to be dealt with there is some
> restructuring of the example code (e.g. moving the options handling
> code) to make it more readable.
I agree.
The ability to provide an address on the command line is really nice for
writing tutorials, as long as the code is simple.>
>> How many times have seen people asking about how to do flow control
>> and acking etc.. ?
>> People are looking for specific code segments that are easily
>> identified in the example.
>
> I think better reference documents are the real solution here.
I do think an example would be helpful here.
>> While the latter is difficult, at least the SSL one could be easily
>> done.
>> The configuration matters and can be easily shown in the shell script
>> etc..
>> The script can use code from another example.
>
> If - in addition to clear documentation on the approach - you provide
> a script for creating test certs and setting up env vars accordingly,
> fair enough. I don't see any need to tie that to a specific example
> though.
+1
drain / spout (sender/receiver?) are good for this.
> I see this as a merging of a simple sender and a simple receiver
> program into a single program that sends itself a message. I don't
> think any information is lost, and the resulting example is smaller
> and easier to take in through a single glance.
I think the tutorial needs this. And if it's in the tutorial, I want it
tested along with the other examples.
Jonathan
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org
Re: Examples
Posted by Rajith Attapattu <ra...@gmail.com>.
On Mon, Apr 19, 2010 at 6:37 PM, Jonathan Robie
<jo...@redhat.com> wrote:
> On 04/19/2010 01:32 PM, Rajith Attapattu wrote:
>>>
>>> I think we should start with a "recipe book" along the lines of the
>>> bullet
>>> point lists that we currently have in our epydoc or doxygen. In general,
>>> those recipes should be illustrated in the examples. In general, any code
>>> or
>>> script that occurs in the documentation should be part of a program that
>>> is
>>> actually tested.
>>>
>>
>> I understand the concern here. But we can't write examples that use
>> every functionality out there.
>> Perhaps the reservation example could help here to a certain extent.
>> But writing examples for the sake of it does not add any value.
>>
>
> We may be talking past each other.
>
> I think that the code samples in the documentation should be part of a
> program that is tested so we know that they continue to work as the software
> changes.
>
> That doesn't mean we need a separate examples directory for each code
> sample. Another approach might be to add to the test directory, perhaps
> using program names that indicate where an example is used in the
> documentation. But I don't like dry code in examples, and errors can creep
> in if we edit too much to make a code snippet easy to read when we drop it
> into the documentation.
Understand your concern here. As you suggested we could take these
code snippets from working code some where in the source tree.
However I hope the reservation example will contain the code we need
for the docs.
>
>
>>>> Demonstrating Concepts
>>>> ------------------------------
>>>> - These are runnable pieces of code.
>>>>
>>>> - These should be,
>>>> - nice little utilities like drain or spout
>>>> - something dirt simple like the Hello World example
>>>> - scripts that help run one of the above using authentication, ssl
>>>> etc..
>>>>
>>>> - If they are natural candidates for showing interoperability then so
>>>> be it. However interoperability should not be the primary goal.
>>>>
>>>>
>>>
>>> I would add examples for things like these:
>>>
>>> * Map messages
>>>
>>
>> What exactly is different here that is not covered in the drain and
>> spout examples?
>> Specific code snippets from there and outside can be used here to show
>> the finer points.
>>
>
>
> And where do those code snippets exist in a place that is tested as the code
> base changes?
>
>
>>>> Demonstrating Interoperability
>>>> -------------------------------------
>>>> - Perhaps the "reservation example" can be developed into a nice
>>>> little application that can demonstrate interoperability sufficiently.
>>>>
>>>> - Demonstrating interoperability is not just a Hello World program or
>>>> sending a map full of primitives !
>>>>
>>>>
>>>
>>> But we clearly need one test program that sends every possible data type,
>>> and another that receives every possible data type, implemented in each
>>> language. We need to know what works and what does not work.
>>>
>>
>> We certainly do !
>> And my point is that this shouldn't be an example and nobody is
>> interested in seeing such an example.
>> This is better handled via an interop testing framework and interop
>> testing framework has more far reaching mandate than a simple example.
>>
>
>
> We might well want tables that show how these data types map into the native
> data types of the various languages we support. But I agree, this is not an
> example that would show up as source code in the documentation.
>
>
> Jonathan
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project: http://qpid.apache.org
> Use/Interact: mailto:dev-subscribe@qpid.apache.org
>
>
--
Regards,
Rajith Attapattu
Red Hat
http://rajith.2rlabs.com/
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org
Re: Examples
Posted by Jonathan Robie <jo...@redhat.com>.
On 04/19/2010 01:32 PM, Rajith Attapattu wrote:
>> I think we should start with a "recipe book" along the lines of the bullet
>> point lists that we currently have in our epydoc or doxygen. In general,
>> those recipes should be illustrated in the examples. In general, any code or
>> script that occurs in the documentation should be part of a program that is
>> actually tested.
>>
> I understand the concern here. But we can't write examples that use
> every functionality out there.
> Perhaps the reservation example could help here to a certain extent.
> But writing examples for the sake of it does not add any value.
>
We may be talking past each other.
I think that the code samples in the documentation should be part of a
program that is tested so we know that they continue to work as the
software changes.
That doesn't mean we need a separate examples directory for each code
sample. Another approach might be to add to the test directory, perhaps
using program names that indicate where an example is used in the
documentation. But I don't like dry code in examples, and errors can
creep in if we edit too much to make a code snippet easy to read when we
drop it into the documentation.
>>> Demonstrating Concepts
>>> ------------------------------
>>> - These are runnable pieces of code.
>>>
>>> - These should be,
>>> - nice little utilities like drain or spout
>>> - something dirt simple like the Hello World example
>>> - scripts that help run one of the above using authentication, ssl
>>> etc..
>>>
>>> - If they are natural candidates for showing interoperability then so
>>> be it. However interoperability should not be the primary goal.
>>>
>>>
>> I would add examples for things like these:
>>
>> * Map messages
>>
> What exactly is different here that is not covered in the drain and
> spout examples?
> Specific code snippets from there and outside can be used here to show
> the finer points.
>
And where do those code snippets exist in a place that is tested as the
code base changes?
>>> Demonstrating Interoperability
>>> -------------------------------------
>>> - Perhaps the "reservation example" can be developed into a nice
>>> little application that can demonstrate interoperability sufficiently.
>>>
>>> - Demonstrating interoperability is not just a Hello World program or
>>> sending a map full of primitives !
>>>
>>>
>> But we clearly need one test program that sends every possible data type,
>> and another that receives every possible data type, implemented in each
>> language. We need to know what works and what does not work.
>>
> We certainly do !
> And my point is that this shouldn't be an example and nobody is
> interested in seeing such an example.
> This is better handled via an interop testing framework and interop
> testing framework has more far reaching mandate than a simple example.
>
We might well want tables that show how these data types map into the
native data types of the various languages we support. But I agree, this
is not an example that would show up as source code in the documentation.
Jonathan
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org
Re: Examples
Posted by Rajith Attapattu <ra...@gmail.com>.
On Mon, Apr 19, 2010 at 1:15 PM, Jonathan Robie
<jo...@redhat.com> wrote:
> On 04/19/2010 12:58 PM, Rajith Attapattu wrote:
>>
>> Just to add to the above,
>>
>> I may be repeating certain things from my previous email, but I think
>> it's important context to understand this email on it's own.
>> Examples is an overloaded term.
>> I think we try to do **too many** things with our examples.
>>
>> 1. Use as an intro to the project and a quick getting started guide.
>>
>> 2. Use as a basis for demonstrating certain qpid concepts.
>>
>> 3. Use as a basis for the tutorial (that goes beyond a getting started
>> guide)
>>
>
>
> I think 1-3 fit together cleanly. I think the examples should illustrate the
> basic "recipes" for the API.
>
>
>> 4. Use as a basis for demonstrating interoperability
>>
>> 5. Use as a basis for interoperability testing.
>>
>
>
> I think this needs to be much more extensive than what we can do with the
> examples, and will probably involve code that is much less readable.
>
>
>> Getting Started and Tutorial
>> ---------------------------------
>> - The getting started guide and tutorial could be combined to reduce the
>> effort.
>> And the Hello World example is a really nice way to introduce the
>> project and then move to the rest of the topics in the tutorial.
>>
>
> I agree here - and I think a lot of what we're discussing is what "then move
> on to the rest" looks like.
>
>> - We need to use code snippets from outside of our examples. We can't
>> write examples that touch everything.
>>
>
> I think we should start with a "recipe book" along the lines of the bullet
> point lists that we currently have in our epydoc or doxygen. In general,
> those recipes should be illustrated in the examples. In general, any code or
> script that occurs in the documentation should be part of a program that is
> actually tested.
I understand the concern here. But we can't write examples that use
every functionality out there.
Perhaps the reservation example could help here to a certain extent.
But writing examples for the sake of it does not add any value.
>> Demonstrating Concepts
>> ------------------------------
>> - These are runnable pieces of code.
>>
>> - These should be,
>> - nice little utilities like drain or spout
>> - something dirt simple like the Hello World example
>> - scripts that help run one of the above using authentication, ssl
>> etc..
>>
>> - If they are natural candidates for showing interoperability then so
>> be it. However interoperability should not be the primary goal.
>>
>
> I would add examples for things like these:
>
> * Map messages
What exactly is different here that is not covered in the drain and
spout examples?
Specific code snippets from there and outside can be used here to show
the finer points.
> * Request / response
The only difference here is the use of reply-to !
> * Flow control
This is just a one or two liner is python and c++ and config in JMS.
I don't think you need it needs it's own example.
> * ...... etc .....
> I would like to have code that is easily integrated into documentation with
> a simple cut-and-paste. In most cases, that doesn't mean including the whole
> program, just the few liens that we need.
I would hope the reservation example will do this for us.
> See http://www.ibiblio.org/jwrobie/blog/?tag=python-messaging-api for an
> example of this.
>
> We've integrated that into epydoc, and a similar list is integrated into our
> doxygen. I think a "recipe book" like this in each language is a good "next
> step" after the stuff that's in the new messaging API tutorial.
>
>> Demonstrating Interoperability
>> -------------------------------------
>> - Perhaps the "reservation example" can be developed into a nice
>> little application that can demonstrate interoperability sufficiently.
>>
>> - Demonstrating interoperability is not just a Hello World program or
>> sending a map full of primitives !
>>
>
> But we clearly need one test program that sends every possible data type,
> and another that receives every possible data type, implemented in each
> language. We need to know what works and what does not work.
We certainly do !
And my point is that this shouldn't be an example and nobody is
interested in seeing such an example.
This is better handled via an interop testing framework and interop
testing framework has more far reaching mandate than a simple example.
>> Interoperability testing.
>> ----------------------------
>> - Using simple examples as a means of testing interoperability is
>> woefully inadequate.
>> (All though I agree something is better than nothing, we need to
>> move forward from this mind set)
>>
>> - This should be a separate suite of tests to sufficiently tests a
>> wide range of aspects.
>> I think Rupert starting something along this lines, but not sure
>> what the current status of it.
>>
>
>
> Agreed - see above. But we might want to start with a list of things that
> need to interoperate, it's not just data types.
>
> Jonathan
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project: http://qpid.apache.org
> Use/Interact: mailto:dev-subscribe@qpid.apache.org
>
>
--
Regards,
Rajith Attapattu
Red Hat
http://rajith.2rlabs.com/
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org
Re: Examples
Posted by Jonathan Robie <jo...@redhat.com>.
On 04/19/2010 12:58 PM, Rajith Attapattu wrote:
> Just to add to the above,
>
> I may be repeating certain things from my previous email, but I think
> it's important context to understand this email on it's own.
> Examples is an overloaded term.
> I think we try to do **too many** things with our examples.
>
> 1. Use as an intro to the project and a quick getting started guide.
>
> 2. Use as a basis for demonstrating certain qpid concepts.
>
> 3. Use as a basis for the tutorial (that goes beyond a getting started guide)
>
I think 1-3 fit together cleanly. I think the examples should illustrate
the basic "recipes" for the API.
> 4. Use as a basis for demonstrating interoperability
>
> 5. Use as a basis for interoperability testing.
>
I think this needs to be much more extensive than what we can do with
the examples, and will probably involve code that is much less readable.
> Getting Started and Tutorial
> ---------------------------------
> - The getting started guide and tutorial could be combined to reduce the effort.
> And the Hello World example is a really nice way to introduce the
> project and then move to the rest of the topics in the tutorial.
>
I agree here - and I think a lot of what we're discussing is what "then
move on to the rest" looks like.
> - We need to use code snippets from outside of our examples. We can't
> write examples that touch everything.
>
I think we should start with a "recipe book" along the lines of the
bullet point lists that we currently have in our epydoc or doxygen. In
general, those recipes should be illustrated in the examples. In
general, any code or script that occurs in the documentation should be
part of a program that is actually tested.
> Demonstrating Concepts
> ------------------------------
> - These are runnable pieces of code.
>
> - These should be,
> - nice little utilities like drain or spout
> - something dirt simple like the Hello World example
> - scripts that help run one of the above using authentication, ssl etc..
>
> - If they are natural candidates for showing interoperability then so
> be it. However interoperability should not be the primary goal.
>
I would add examples for things like these:
* Map messages
* Request / response
* Flow control
* ...... etc .....
I would like to have code that is easily integrated into documentation
with a simple cut-and-paste. In most cases, that doesn't mean including
the whole program, just the few liens that we need.
See http://www.ibiblio.org/jwrobie/blog/?tag=python-messaging-api for an
example of this.
We've integrated that into epydoc, and a similar list is integrated into
our doxygen. I think a "recipe book" like this in each language is a
good "next step" after the stuff that's in the new messaging API tutorial.
> Demonstrating Interoperability
> -------------------------------------
> - Perhaps the "reservation example" can be developed into a nice
> little application that can demonstrate interoperability sufficiently.
>
> - Demonstrating interoperability is not just a Hello World program or
> sending a map full of primitives !
>
But we clearly need one test program that sends every possible data
type, and another that receives every possible data type, implemented in
each language. We need to know what works and what does not work.
> Interoperability testing.
> ----------------------------
> - Using simple examples as a means of testing interoperability is
> woefully inadequate.
> (All though I agree something is better than nothing, we need to
> move forward from this mind set)
>
> - This should be a separate suite of tests to sufficiently tests a
> wide range of aspects.
> I think Rupert starting something along this lines, but not sure
> what the current status of it.
>
Agreed - see above. But we might want to start with a list of things
that need to interoperate, it's not just data types.
Jonathan
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org
Re: Examples
Posted by Rajith Attapattu <ra...@gmail.com>.
Just to add to the above,
I may be repeating certain things from my previous email, but I think
it's important context to understand this email on it's own.
Examples is an overloaded term.
I think we try to do **too many** things with our examples.
1. Use as an intro to the project and a quick getting started guide.
2. Use as a basis for demonstrating certain qpid concepts.
3. Use as a basis for the tutorial (that goes beyond a getting started guide)
4. Use as a basis for demonstrating interoperability
5. Use as a basis for interoperability testing.
While you can conceivably construct examples that may achieve all of
the above, I believe it's not the most optimal.
Infact it only serves to reduce the effectiveness of each goal as we
have to balance all aspects.
As mentioned many times before, I think we need different strategies
to address the specific needs of the above goals.
Getting Started and Tutorial
---------------------------------
- The getting started guide and tutorial could be combined to reduce the effort.
And the Hello World example is a really nice way to introduce the
project and then move to the rest of the topics in the tutorial.
- We need to use code snippets from outside of our examples. We can't
write examples that touch everything.
Demonstrating Concepts
------------------------------
- These are runnable pieces of code.
- These should be,
- nice little utilities like drain or spout
- something dirt simple like the Hello World example
- scripts that help run one of the above using authentication, ssl etc..
- If they are natural candidates for showing interoperability then so
be it. However interoperability should not be the primary goal.
Demonstrating Interoperability
-------------------------------------
- Perhaps the "reservation example" can be developed into a nice
little application that can demonstrate interoperability sufficiently.
- Demonstrating interoperability is not just a Hello World program or
sending a map full of primitives !
Interoperability testing.
----------------------------
- Using simple examples as a means of testing interoperability is
woefully inadequate.
(All though I agree something is better than nothing, we need to
move forward from this mind set)
- This should be a separate suite of tests to sufficiently tests a
wide range of aspects.
I think Rupert starting something along this lines, but not sure
what the current status of it.
Enough ranting I will get back to my work :)
Regards,
Rajith
On Mon, Apr 19, 2010 at 11:06 AM, Rajith Attapattu <ra...@gmail.com> wrote:
> On Tue, Apr 13, 2010 at 12:02 PM, Gordon Sim <gs...@redhat.com> wrote:
>> On 04/13/2010 04:36 PM, Rajith Attapattu wrote:
>>>
>>> On Tue, Apr 13, 2010 at 8:19 AM, Gordon Sim<gs...@redhat.com> wrote:
>>>>
>>>> On 04/12/2010 10:30 PM, Rajith Attapattu wrote:
>>>>>
>>>>> Hi All,
>>>>>
>>>>> Judging by some of the questions on the user list, I feel we could do
>>>>> a much better with our examples.
>>>>> (Also our examples should be more visible in the source tree and
>>>>> easily accessible from our release artefacts.
>>>>> However I believe that is a different discussion for another day.)
>>>>>
>>>>> I am envisioning the following structure for the examples, and most of
>>>>> the old examples can be easily adapted to the new format.
>>>>>
>>>>> 1. store-and-forward.
>>>>> 2. pub/sub with topics
>>>>> 3. request-reply
>>>>> 4. map messages
>>>>> 5. using flow control
>>>>> 6. * using addressing options (multiple examples showing binding to
>>>>> multiple exchanges, create/delete/assert options ..etc)
>>>>> 7. using SSL/Kerb encryption
>>>>> 8. Authentication (ex. Kerberos, external)
>>>>> 9. using failover
>>>>> 10. transactions
>>>>>
>>>>> * Maybe drain and spout could be used for this (as is or with some
>>>>> modifications) ?
>>>>
>>>> I think drain and spout should be used for 1. and 2. as well, also for 9.
>>>> and even to a lesser extent for 4.
>>>
>>> I strongly disagree here.
>>
>> So in your view what would the examples for 1. and 2. look like for the new
>> api?
>>
>> As far as I can see the only thing that will change between them is the
>> address used (have a look for example at queue_sender/queue_receiver v.
>> topic_sender/topic_receiver in c++).
>>
>> And for 9. again there is little that changes in the code, so what would the
>> example code for that look like in your view?
>
> I agree that the only thing that would be different is the address.
> While it is trivial to us, it's still an important distinction to the end users.
>
> However I agree with you that it's kind of useless to have two
> distinct complete examples for this, when the code is almost
> identical.
>
> I think the main issue here is that we think of examples as
> 1. Complete code that is runnable
> 2. As the basis for our tutorial.
>
> This has severely limited the examples and the tutorial as we have
> unsuccessfully tried to couple them both. While some examples can be
> used in the tutorial, we need to think of them independently as well.
>
> If am a new user, I will be looking for 3 things.
> 1. Examples for familiar concepts (ex pub/sub..store-&-forward)
> 2. Code snippets for important aspects like failover, flow control etc..
> 3. Runnable examples.
>
>>> While drain and spout are excellent for demonstrating these aspects
>>> they are not necessarily good code examples.
>>> While the python is nice and compact the c++ and and the JMS based
>>> versions are not !
>>
>> I would argue that the issue to be dealt with there is some restructuring of
>> the example code (e.g. moving the options handling code) to make it more
>> readable.
>
> Well if we do not try to couple the tutorial with examples, then we
> don't need to mess around with drain and spout. We can use drain and
> spout for what it's worth and try not to take code snippets from them.
> For that we can use simple code snippets.
>
>>> Even in the python version 90% of the code is for handling opt parsing.
>>> So IMO they are not good code examples, but excellent tools for
>>> demoing concepts.
>>> Hence I think they are excellent at showing different addressing examples.
>>
>> Other than different addresses how do 1. and 2. differ in your view?
>>
>>> We really need to make a distinction btw code examples and tools/demos.
>>>
>>> I think the end users are looking for both.
>>> That is why I think a dedicated map message example that does nested
>>> lists/maps is very very important !
>>
>>>
>>>
>>> How many times have seen people asking about how to do flow control
>>> and acking etc.. ?
>>> People are looking for specific code segments that are easily
>>> identified in the example.
>>
>> I think better reference documents are the real solution here.
>
> If by reference docs you mean the API docs, then judging by the
> activity on user/dev lists it seems the end users are not being able
> to find them easily.
>
> I think atleast the core concepts should be in the tutorial. Otherwise
> what is the point of a tutorial ?
>
>>>> I don't think 7. and 8. require a separate example. It is just a
>>>> configuration issue. Ideally all the examples should work using different
>>>> authentication configuration and we need some clear and accessible
>>>> documentation on how to do that rather than new examples. The same is
>>>> probably true for SSL.
>>>
>>> Well examples are not just code only.
>>> There were many users who asked on the list/offline about a working
>>> SSL or Kerberos example.
>>
>> Right, and having documentation that shows how to get an example working
>> with those features is needed. I'm saying it doesn't require a distinct
>> example program though, which is what I assumed your list above was
>> implying.
>
> My bad for not explaining properly. The list above is not necessarily
> complete pieces of code that are runnable. They are more like
> categories of examples (or perhaps entries in a TOC) that I would like
> to see in a tutorial.
>
>>> While the latter is difficult, at least the SSL one could be easily done.
>>> The configuration matters and can be easily shown in the shell script
>>> etc..
>>> The script can use code from another example.
>>
>> If - in addition to clear documentation on the approach - you provide a
>> script for creating test certs and setting up env vars accordingly, fair
>> enough. I don't see any need to tie that to a specific example though.
>
> Fair point I agree.
>
>>>
>>> I agree with you that we need good supplementary documentation.
>>>
>>>>> The examples should be simple.
>>>>
>>>> I think one of the problems is that all the examples are very simple.
>>>> Having
>>>> simple examples is certainly important. However to my mind some of the
>>>> questions raised might be better answered by a slightly more involved
>>>> example, e.g. the reservations example in python.
>>>>
>>>> My suggestion is:
>>>>
>>>> (a) we get rid of the old amqp 0-10 specific examples
>>>
>>> +1
>>>
>>>> (b) we have a simple helloworld example in each language
>>>
>>> I am not sure what is really achieved here. Perhaps I misunderstood the
>>> intent?
>>
>> It shows how to use the api to send and receive a message in a single simple
>> piece of code. This conveys the key objects (connection, session, sender,
>> receiver and message) that make up the api, and shows the basic usage
>> pattern.
>>
>> I see this as a merging of a simple sender and a simple receiver program
>> into a single program that sends itself a message. I don't think any
>> information is lost, and the resulting example is smaller and easier to take
>> in through a single glance.
>
> Having seen the examples I totally agree with you.
> I also thought the hello world examples provided a nice entry to the tutorial.
>
>>>> (c) we have spout and drain to show different messaging patterns
>>>
>>> See my comments above.
>>>
>>>> (d) we have a client-server example (to show use of reply-to and creation
>>>> or
>>>> temp reply queues)
>>>
>>> +1
>>>
>>>> (e) maybe have a dedicated map message example (not totally sure this is
>>>> needed)
>>>
>>> IMO this is needed.
>>>
>>>> (f) we start trying to build out the reservations example as a more
>>>> complete
>>>> program
>>>
>>> I could definitely see the value of such an example.
>>>
>>>> (g) we describe how to run at least spout and drain using authentication,
>>>> SSL etc
>>>
>>> See my comment about.
>>>
>>> In summary I don't think a one size fits all example is going to be
>>> useful at all.
>>> While a generic example can be used as much as we can, specific
>>> targeted examples are needed as well.
>>
>>
>> ---------------------------------------------------------------------
>> Apache Qpid - AMQP Messaging Implementation
>> Project: http://qpid.apache.org
>> Use/Interact: mailto:dev-subscribe@qpid.apache.org
>>
>>
>
>
>
> --
> Regards,
>
> Rajith Attapattu
> Red Hat
> http://rajith.2rlabs.com/
>
--
Regards,
Rajith Attapattu
Red Hat
http://rajith.2rlabs.com/
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org
Re: Examples
Posted by Rajith Attapattu <ra...@gmail.com>.
On Tue, Apr 13, 2010 at 12:02 PM, Gordon Sim <gs...@redhat.com> wrote:
> On 04/13/2010 04:36 PM, Rajith Attapattu wrote:
>>
>> On Tue, Apr 13, 2010 at 8:19 AM, Gordon Sim<gs...@redhat.com> wrote:
>>>
>>> On 04/12/2010 10:30 PM, Rajith Attapattu wrote:
>>>>
>>>> Hi All,
>>>>
>>>> Judging by some of the questions on the user list, I feel we could do
>>>> a much better with our examples.
>>>> (Also our examples should be more visible in the source tree and
>>>> easily accessible from our release artefacts.
>>>> However I believe that is a different discussion for another day.)
>>>>
>>>> I am envisioning the following structure for the examples, and most of
>>>> the old examples can be easily adapted to the new format.
>>>>
>>>> 1. store-and-forward.
>>>> 2. pub/sub with topics
>>>> 3. request-reply
>>>> 4. map messages
>>>> 5. using flow control
>>>> 6. * using addressing options (multiple examples showing binding to
>>>> multiple exchanges, create/delete/assert options ..etc)
>>>> 7. using SSL/Kerb encryption
>>>> 8. Authentication (ex. Kerberos, external)
>>>> 9. using failover
>>>> 10. transactions
>>>>
>>>> * Maybe drain and spout could be used for this (as is or with some
>>>> modifications) ?
>>>
>>> I think drain and spout should be used for 1. and 2. as well, also for 9.
>>> and even to a lesser extent for 4.
>>
>> I strongly disagree here.
>
> So in your view what would the examples for 1. and 2. look like for the new
> api?
>
> As far as I can see the only thing that will change between them is the
> address used (have a look for example at queue_sender/queue_receiver v.
> topic_sender/topic_receiver in c++).
>
> And for 9. again there is little that changes in the code, so what would the
> example code for that look like in your view?
I agree that the only thing that would be different is the address.
While it is trivial to us, it's still an important distinction to the end users.
However I agree with you that it's kind of useless to have two
distinct complete examples for this, when the code is almost
identical.
I think the main issue here is that we think of examples as
1. Complete code that is runnable
2. As the basis for our tutorial.
This has severely limited the examples and the tutorial as we have
unsuccessfully tried to couple them both. While some examples can be
used in the tutorial, we need to think of them independently as well.
If am a new user, I will be looking for 3 things.
1. Examples for familiar concepts (ex pub/sub..store-&-forward)
2. Code snippets for important aspects like failover, flow control etc..
3. Runnable examples.
>> While drain and spout are excellent for demonstrating these aspects
>> they are not necessarily good code examples.
>> While the python is nice and compact the c++ and and the JMS based
>> versions are not !
>
> I would argue that the issue to be dealt with there is some restructuring of
> the example code (e.g. moving the options handling code) to make it more
> readable.
Well if we do not try to couple the tutorial with examples, then we
don't need to mess around with drain and spout. We can use drain and
spout for what it's worth and try not to take code snippets from them.
For that we can use simple code snippets.
>> Even in the python version 90% of the code is for handling opt parsing.
>> So IMO they are not good code examples, but excellent tools for
>> demoing concepts.
>> Hence I think they are excellent at showing different addressing examples.
>
> Other than different addresses how do 1. and 2. differ in your view?
>
>> We really need to make a distinction btw code examples and tools/demos.
>>
>> I think the end users are looking for both.
>> That is why I think a dedicated map message example that does nested
>> lists/maps is very very important !
>
>>
>>
>> How many times have seen people asking about how to do flow control
>> and acking etc.. ?
>> People are looking for specific code segments that are easily
>> identified in the example.
>
> I think better reference documents are the real solution here.
If by reference docs you mean the API docs, then judging by the
activity on user/dev lists it seems the end users are not being able
to find them easily.
I think atleast the core concepts should be in the tutorial. Otherwise
what is the point of a tutorial ?
>>> I don't think 7. and 8. require a separate example. It is just a
>>> configuration issue. Ideally all the examples should work using different
>>> authentication configuration and we need some clear and accessible
>>> documentation on how to do that rather than new examples. The same is
>>> probably true for SSL.
>>
>> Well examples are not just code only.
>> There were many users who asked on the list/offline about a working
>> SSL or Kerberos example.
>
> Right, and having documentation that shows how to get an example working
> with those features is needed. I'm saying it doesn't require a distinct
> example program though, which is what I assumed your list above was
> implying.
My bad for not explaining properly. The list above is not necessarily
complete pieces of code that are runnable. They are more like
categories of examples (or perhaps entries in a TOC) that I would like
to see in a tutorial.
>> While the latter is difficult, at least the SSL one could be easily done.
>> The configuration matters and can be easily shown in the shell script
>> etc..
>> The script can use code from another example.
>
> If - in addition to clear documentation on the approach - you provide a
> script for creating test certs and setting up env vars accordingly, fair
> enough. I don't see any need to tie that to a specific example though.
Fair point I agree.
>>
>> I agree with you that we need good supplementary documentation.
>>
>>>> The examples should be simple.
>>>
>>> I think one of the problems is that all the examples are very simple.
>>> Having
>>> simple examples is certainly important. However to my mind some of the
>>> questions raised might be better answered by a slightly more involved
>>> example, e.g. the reservations example in python.
>>>
>>> My suggestion is:
>>>
>>> (a) we get rid of the old amqp 0-10 specific examples
>>
>> +1
>>
>>> (b) we have a simple helloworld example in each language
>>
>> I am not sure what is really achieved here. Perhaps I misunderstood the
>> intent?
>
> It shows how to use the api to send and receive a message in a single simple
> piece of code. This conveys the key objects (connection, session, sender,
> receiver and message) that make up the api, and shows the basic usage
> pattern.
>
> I see this as a merging of a simple sender and a simple receiver program
> into a single program that sends itself a message. I don't think any
> information is lost, and the resulting example is smaller and easier to take
> in through a single glance.
Having seen the examples I totally agree with you.
I also thought the hello world examples provided a nice entry to the tutorial.
>>> (c) we have spout and drain to show different messaging patterns
>>
>> See my comments above.
>>
>>> (d) we have a client-server example (to show use of reply-to and creation
>>> or
>>> temp reply queues)
>>
>> +1
>>
>>> (e) maybe have a dedicated map message example (not totally sure this is
>>> needed)
>>
>> IMO this is needed.
>>
>>> (f) we start trying to build out the reservations example as a more
>>> complete
>>> program
>>
>> I could definitely see the value of such an example.
>>
>>> (g) we describe how to run at least spout and drain using authentication,
>>> SSL etc
>>
>> See my comment about.
>>
>> In summary I don't think a one size fits all example is going to be
>> useful at all.
>> While a generic example can be used as much as we can, specific
>> targeted examples are needed as well.
>
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project: http://qpid.apache.org
> Use/Interact: mailto:dev-subscribe@qpid.apache.org
>
>
--
Regards,
Rajith Attapattu
Red Hat
http://rajith.2rlabs.com/
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org
Re: Examples
Posted by Gordon Sim <gs...@redhat.com>.
On 04/13/2010 04:36 PM, Rajith Attapattu wrote:
> On Tue, Apr 13, 2010 at 8:19 AM, Gordon Sim<gs...@redhat.com> wrote:
>> On 04/12/2010 10:30 PM, Rajith Attapattu wrote:
>>>
>>> Hi All,
>>>
>>> Judging by some of the questions on the user list, I feel we could do
>>> a much better with our examples.
>>> (Also our examples should be more visible in the source tree and
>>> easily accessible from our release artefacts.
>>> However I believe that is a different discussion for another day.)
>>>
>>> I am envisioning the following structure for the examples, and most of
>>> the old examples can be easily adapted to the new format.
>>>
>>> 1. store-and-forward.
>>> 2. pub/sub with topics
>>> 3. request-reply
>>> 4. map messages
>>> 5. using flow control
>>> 6. * using addressing options (multiple examples showing binding to
>>> multiple exchanges, create/delete/assert options ..etc)
>>> 7. using SSL/Kerb encryption
>>> 8. Authentication (ex. Kerberos, external)
>>> 9. using failover
>>> 10. transactions
>>>
>>> * Maybe drain and spout could be used for this (as is or with some
>>> modifications) ?
>>
>> I think drain and spout should be used for 1. and 2. as well, also for 9.
>> and even to a lesser extent for 4.
>
> I strongly disagree here.
So in your view what would the examples for 1. and 2. look like for the
new api?
As far as I can see the only thing that will change between them is the
address used (have a look for example at queue_sender/queue_receiver v.
topic_sender/topic_receiver in c++).
And for 9. again there is little that changes in the code, so what would
the example code for that look like in your view?
> While drain and spout are excellent for demonstrating these aspects
> they are not necessarily good code examples.
> While the python is nice and compact the c++ and and the JMS based
> versions are not !
I would argue that the issue to be dealt with there is some
restructuring of the example code (e.g. moving the options handling
code) to make it more readable.
> Even in the python version 90% of the code is for handling opt parsing.
> So IMO they are not good code examples, but excellent tools for
> demoing concepts.
> Hence I think they are excellent at showing different addressing examples.
Other than different addresses how do 1. and 2. differ in your view?
> We really need to make a distinction btw code examples and tools/demos.
>
> I think the end users are looking for both.
> That is why I think a dedicated map message example that does nested
> lists/maps is very very important !
>
> How many times have seen people asking about how to do flow control
> and acking etc.. ?
> People are looking for specific code segments that are easily
> identified in the example.
I think better reference documents are the real solution here.
>> I don't think 7. and 8. require a separate example. It is just a
>> configuration issue. Ideally all the examples should work using different
>> authentication configuration and we need some clear and accessible
>> documentation on how to do that rather than new examples. The same is
>> probably true for SSL.
>
> Well examples are not just code only.
> There were many users who asked on the list/offline about a working
> SSL or Kerberos example.
Right, and having documentation that shows how to get an example working
with those features is needed. I'm saying it doesn't require a distinct
example program though, which is what I assumed your list above was
implying.
> While the latter is difficult, at least the SSL one could be easily done.
> The configuration matters and can be easily shown in the shell script etc..
> The script can use code from another example.
If - in addition to clear documentation on the approach - you provide a
script for creating test certs and setting up env vars accordingly, fair
enough. I don't see any need to tie that to a specific example though.
>
> I agree with you that we need good supplementary documentation.
>
>>> The examples should be simple.
>>
>> I think one of the problems is that all the examples are very simple. Having
>> simple examples is certainly important. However to my mind some of the
>> questions raised might be better answered by a slightly more involved
>> example, e.g. the reservations example in python.
>>
>> My suggestion is:
>>
>> (a) we get rid of the old amqp 0-10 specific examples
> +1
>
>> (b) we have a simple helloworld example in each language
>
> I am not sure what is really achieved here. Perhaps I misunderstood the intent?
It shows how to use the api to send and receive a message in a single
simple piece of code. This conveys the key objects (connection, session,
sender, receiver and message) that make up the api, and shows the basic
usage pattern.
I see this as a merging of a simple sender and a simple receiver program
into a single program that sends itself a message. I don't think any
information is lost, and the resulting example is smaller and easier to
take in through a single glance.
>> (c) we have spout and drain to show different messaging patterns
> See my comments above.
>
>> (d) we have a client-server example (to show use of reply-to and creation or
>> temp reply queues)
> +1
>
>> (e) maybe have a dedicated map message example (not totally sure this is
>> needed)
>
> IMO this is needed.
>
>> (f) we start trying to build out the reservations example as a more complete
>> program
> I could definitely see the value of such an example.
>
>> (g) we describe how to run at least spout and drain using authentication,
>> SSL etc
> See my comment about.
>
> In summary I don't think a one size fits all example is going to be
> useful at all.
> While a generic example can be used as much as we can, specific
> targeted examples are needed as well.
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org
Re: Examples
Posted by Rajith Attapattu <ra...@gmail.com>.
On Tue, Apr 13, 2010 at 8:19 AM, Gordon Sim <gs...@redhat.com> wrote:
> On 04/12/2010 10:30 PM, Rajith Attapattu wrote:
>>
>> Hi All,
>>
>> Judging by some of the questions on the user list, I feel we could do
>> a much better with our examples.
>> (Also our examples should be more visible in the source tree and
>> easily accessible from our release artefacts.
>> However I believe that is a different discussion for another day.)
>>
>> I am envisioning the following structure for the examples, and most of
>> the old examples can be easily adapted to the new format.
>>
>> 1. store-and-forward.
>> 2. pub/sub with topics
>> 3. request-reply
>> 4. map messages
>> 5. using flow control
>> 6. * using addressing options (multiple examples showing binding to
>> multiple exchanges, create/delete/assert options ..etc)
>> 7. using SSL/Kerb encryption
>> 8. Authentication (ex. Kerberos, external)
>> 9. using failover
>> 10. transactions
>>
>> * Maybe drain and spout could be used for this (as is or with some
>> modifications) ?
>
> I think drain and spout should be used for 1. and 2. as well, also for 9.
> and even to a lesser extent for 4.
I strongly disagree here.
While drain and spout are excellent for demonstrating these aspects
they are not necessarily good code examples.
While the python is nice and compact the c++ and and the JMS based
versions are not !
Even in the python version 90% of the code is for handling opt parsing.
So IMO they are not good code examples, but excellent tools for
demoing concepts.
Hence I think they are excellent at showing different addressing examples.
We really need to make a distinction btw code examples and tools/demos.
I think the end users are looking for both.
That is why I think a dedicated map message example that does nested
lists/maps is very very important !
How many times have seen people asking about how to do flow control
and acking etc.. ?
People are looking for specific code segments that are easily
identified in the example.
> I don't think 7. and 8. require a separate example. It is just a
> configuration issue. Ideally all the examples should work using different
> authentication configuration and we need some clear and accessible
> documentation on how to do that rather than new examples. The same is
> probably true for SSL.
Well examples are not just code only.
There were many users who asked on the list/offline about a working
SSL or Kerberos example.
While the latter is difficult, at least the SSL one could be easily done.
The configuration matters and can be easily shown in the shell script etc..
The script can use code from another example.
I agree with you that we need good supplementary documentation.
>> The examples should be simple.
>
> I think one of the problems is that all the examples are very simple. Having
> simple examples is certainly important. However to my mind some of the
> questions raised might be better answered by a slightly more involved
> example, e.g. the reservations example in python.
>
> My suggestion is:
>
> (a) we get rid of the old amqp 0-10 specific examples
+1
> (b) we have a simple helloworld example in each language
I am not sure what is really achieved here. Perhaps I misunderstood the intent?
> (c) we have spout and drain to show different messaging patterns
See my comments above.
> (d) we have a client-server example (to show use of reply-to and creation or
> temp reply queues)
+1
> (e) maybe have a dedicated map message example (not totally sure this is
> needed)
IMO this is needed.
> (f) we start trying to build out the reservations example as a more complete
> program
I could definitely see the value of such an example.
> (g) we describe how to run at least spout and drain using authentication,
> SSL etc
See my comment about.
In summary I don't think a one size fits all example is going to be
useful at all.
While a generic example can be used as much as we can, specific
targeted examples are needed as well.
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project: http://qpid.apache.org
> Use/Interact: mailto:dev-subscribe@qpid.apache.org
>
>
--
Regards,
Rajith Attapattu
Red Hat
http://rajith.2rlabs.com/
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org
Re: Examples
Posted by Jonathan Robie <jo...@redhat.com>.
On 04/13/2010 08:19 AM, Gordon Sim wrote:
> On 04/12/2010 10:30 PM, Rajith Attapattu wrote:
>> Hi All,
>>
>> Judging by some of the questions on the user list, I feel we could do
>> a much better with our examples.
>> (Also our examples should be more visible in the source tree and
>> easily accessible from our release artefacts.
>> However I believe that is a different discussion for another day.)
>>
>> I am envisioning the following structure for the examples, and most of
>> the old examples can be easily adapted to the new format.
>>
>> 1. store-and-forward.
>> 2. pub/sub with topics
>> 3. request-reply
>> 4. map messages
>> 5. using flow control
>> 6. * using addressing options (multiple examples showing binding to
>> multiple exchanges, create/delete/assert options ..etc)
>> 7. using SSL/Kerb encryption
>> 8. Authentication (ex. Kerberos, external)
>> 9. using failover
>> 10. transactions
>>
>> * Maybe drain and spout could be used for this (as is or with some
>> modifications) ?
>
> I think drain and spout should be used for 1. and 2. as well, also for
> 9. and even to a lesser extent for 4.
I agree for 1, 2, and 9.
To me, map messages are distinct, the code will look different enough to
be worth a separate example.
> I don't think 7. and 8. require a separate example. It is just a
> configuration issue. Ideally all the examples should work using
> different authentication configuration and we need some clear and
> accessible documentation on how to do that rather than new examples.
> The same is probably true for SSL.
Agreed - though I wonder if example shell scripts and batch files could
be helpful for some of this.
>> The examples should be simple.
>
> I think one of the problems is that all the examples are very simple.
> Having simple examples is certainly important. However to my mind some
> of the questions raised might be better answered by a slightly more
> involved example, e.g. the reservations example in python.
>
> My suggestion is:
>
> (a) we get rid of the old amqp 0-10 specific examples
> (b) we have a simple helloworld example in each language
> (c) we have spout and drain to show different messaging patterns
> (d) we have a client-server example (to show use of reply-to and
> creation or temp reply queues)
> (e) maybe have a dedicated map message example (not totally sure this
> is needed)
> (f) we start trying to build out the reservations example as a more
> complete program
> (g) we describe how to run at least spout and drain using
> authentication, SSL etc
This makes sense to me.
Perhaps sample shell scripts and batch files in the drain/spout
directories would be helpful for (g).
Jonathan
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org
Re: Examples
Posted by Gordon Sim <gs...@redhat.com>.
On 04/12/2010 10:30 PM, Rajith Attapattu wrote:
> Hi All,
>
> Judging by some of the questions on the user list, I feel we could do
> a much better with our examples.
> (Also our examples should be more visible in the source tree and
> easily accessible from our release artefacts.
> However I believe that is a different discussion for another day.)
>
> I am envisioning the following structure for the examples, and most of
> the old examples can be easily adapted to the new format.
>
> 1. store-and-forward.
> 2. pub/sub with topics
> 3. request-reply
> 4. map messages
> 5. using flow control
> 6. * using addressing options (multiple examples showing binding to
> multiple exchanges, create/delete/assert options ..etc)
> 7. using SSL/Kerb encryption
> 8. Authentication (ex. Kerberos, external)
> 9. using failover
> 10. transactions
>
> * Maybe drain and spout could be used for this (as is or with some
> modifications) ?
I think drain and spout should be used for 1. and 2. as well, also for
9. and even to a lesser extent for 4.
I don't think 7. and 8. require a separate example. It is just a
configuration issue. Ideally all the examples should work using
different authentication configuration and we need some clear and
accessible documentation on how to do that rather than new examples. The
same is probably true for SSL.
> The examples should be simple.
I think one of the problems is that all the examples are very simple.
Having simple examples is certainly important. However to my mind some
of the questions raised might be better answered by a slightly more
involved example, e.g. the reservations example in python.
My suggestion is:
(a) we get rid of the old amqp 0-10 specific examples
(b) we have a simple helloworld example in each language
(c) we have spout and drain to show different messaging patterns
(d) we have a client-server example (to show use of reply-to and
creation or temp reply queues)
(e) maybe have a dedicated map message example (not totally sure this is
needed)
(f) we start trying to build out the reservations example as a more
complete program
(g) we describe how to run at least spout and drain using
authentication, SSL etc
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org