avro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Baldassari (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AVRO-539) Allow asynchronous clients to specify a callback to be run when server processing completes
Date Wed, 08 Jun 2011 05:46:58 GMT

    [ https://issues.apache.org/jira/browse/AVRO-539?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13045797#comment-13045797
] 

James Baldassari commented on AVRO-539:
---------------------------------------

Thanks for looking it over!

bq. the flag might better be named 'generateCallbacks' than 'generateClientInterface'.
OK, easy change.

bq. can we make this flag optional?
I believe it's optional in the mojo and in the Ant plugin.  It should default to true if not
specified.  Just in case anyone is calling SpecificCompiler directly, I'll add overloaded
methods that will match the old signatures (without the generateCallbacks boolean) and will
default generateCallbacks to true.  This way SpecificCompiler should be totally backwards
compatible.

bq. maybe instead of generating another file, we could generate a nested interface?
Sure.  I'll make that change.  It's probably a little cleaner with just one generated file
per protocol.

bq. i don't think we need guards around log.debug statements that are passed a constant string
No problem.  The isDebugEnabled checks were in there so that the full stack traces would be
printed when debug mode enabled; otherwise only the exception message would be printed without
the stack trace.  It's just a pattern I've gotten used to working with high-throughput messaging
in which a lot of errors can be written in a short amount of time.  I'll change these statements
to be consistent with the Avro logging conventions.

bq. can Request, Response and RequestorTranscieverCallback be private or package-private?
Request and Response certainly can, so I'll change them.  TransceiverCallback can be made
package-private, but then we should also make Transceiver.transceive(List<ByteBuffer>,
TransceiverCallback) package private.  Since Transceiver.transceive(List<ByteBuffer>)
is public, I thought the one that takes a Callback should also be public.  Then again, I don't
think any of those transceiver methods are called from outside the package.  Your call.

bq. Also, I will be mostly offline for the next week and may not be able to review patches
very quickly.
That's fine.  I'm swamped at work right now, so I don't think I'll have time to work on these
changes until the weekend anyway.

> Allow asynchronous clients to specify a callback to be run when server processing completes
> -------------------------------------------------------------------------------------------
>
>                 Key: AVRO-539
>                 URL: https://issues.apache.org/jira/browse/AVRO-539
>             Project: Avro
>          Issue Type: New Feature
>            Reporter: Jeff Hammerbacher
>            Assignee: James Baldassari
>         Attachments: AVRO-539-v2-2.patch, AVRO-539-v2.patch, AVRO-539.patch
>
>


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message