You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@doris.apache.org by 寒江雪 <ya...@gmail.com> on 2021/12/29 03:24:36 UTC

[DISCUSS] Support UDF through RPC call

Hi all:

More and more users have requirements for UDF, but because the doris udf
implementation framework is very complex and only supports the C++
language, many users are not capable of implementing UDF, so I want to
implement UDF through RPC. This brings several benefits:

   1.

   The udf implementation language is not limited to c++, users can use any
   familiar language to implement udf
   2.

   UDF is decoupled from Doris, udf will not be doris coredump together,
   udf computing resources are separated from doris, and doris services are
   not affected

But RPC's UDF has a fixed overhead, so its performance is much slower than
C++ UDF, especially when the amount of data is large. But in the future, we
can reduce these overheads by sending data requests in batches.

create function like

 CREATE FUNCTION rpc_add(INT, INT) RETURNS INT PROPERTIES (
   "SYMBOL"="add_int",
   "OBJECT_FILE"="127.0.0.1:9999",
   "MD5"=""

function service need to implements check_fn and fn_call methods

Welcome everyone to discuss, especially for the rpc protocol definition
part: function-service.proto