sijie edited a comment on issue #4127: [Issue#4110] [component/functions] 
Adding message as source or input of Function
URL: https://github.com/apache/pulsar/pull/4127#issuecomment-488095002
 
 
   > If we were to support this for python, it will most likely need to be 
exposed with context. I would like to see some uniformity in how we do this 
across languages though.
   
   It is *some* not all. Most of the features available in Java Client / 
Function is specific to Java, because Java supports Generic Type. Most of other 
languages like Python and Go don't support Generic Type. The approach I am 
proposing is using Generic Type, which is specific to Java. 
   
   The concern I have with exposing Message in Java Record is casting. Because 
the Java function code is also used for pulsar-io (source and sink). But there 
are not source and sinks in Python or Go. 
   
   Hence IMO it is really hard to achieve uniformity across the languages from 
many aspects. 
   
   Also, the original motivation of functions is to let user write the function 
in a native way as how they write a normal function in their preferred 
language. If that still stands, we should just consider the most native 
approach for each language rather than choosing the uniformity. If you look 
into severless world, you will find that it is really hard to get the 
uniformity across languages.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to