Hey all :wave: . We have existing java services th...
# flyte-support
a
Hey all πŸ‘‹ . We have existing java services that process Kafka events. We would like these events to trigger workflows in Flyte. Is this possible with flytekit-java or is there some other recommended way of doing this?
f
Flyte has endpoints to do this
The core service is golang - Grpc
So you can use any language clients
Cc @steep-jackal-21573 / @colossal-solstice-11091 do you folks have guidance on using Java client
a
Yea, looking through the code, there's a
FlyteAdminClient
that's part of the
jflyte-utils
, but I've not seen anything more official discussed
f
@alert-oil-1341 you can use the buf generated client itself
βž• 1
s
I would suggest generating stub from proto and calling flyteadmin gRPC endpoints. It's likely too much if you use flytekit-java because it is a full blown Flyte sdk.
https://docs.flyte.org/projects/flyteidl/en/latest/protos/docs/service/service.html is the API ref. I guess it is the
CreateExecution
that you are interested in.
@freezing-airport-6809 I would really love if gh:flyteorg/flyte could publish Java artifact to maven central, with both proto and rpc stubs. πŸ˜„
a
Thanks for the response. I'll generate the stubs from
flyteidl-protos
dep.
Is there anything around auth w/ flyte admin that can be shared for java impl? Or should I just look at the go code and work from there?
s
I think go code is the best place to check for the oauth flow.
πŸ‘ 1
f
@steep-jackal-21573 can you help
s
@freezing-airport-6809 What do you refer to? The auth flow? Internally we don't use the standard flyteadmin auth flow directly, but with our own gateway in front to be able to use GCP auth flow. Between the gateway and flyteadmin, we use the static client_secret setup. The flytekit-java implementation unfortunately takes that assumption which is not very proper as part of open source, to be fair.
So, tl;dr is, there is not much to learn from flytekit-java in terms of auth.
f
Cc @high-park-82026 why is implementing oauth2 annoying for every client
a
For me, I'm not apposed to implementing oAuth, but it's just non-differentiating work that will take up some time. I was hoping for a packaged up client w/ all the auth built in(refreshing token, etc.)
s
To be clear, I didn't mean it was annoying for us because we had to hook into GCP anyway and that was the reason we had to set up our own gateway.
f
Isn’t this sad when you use a standard
s
I believe there should be standard oauth lib in Java.
f
I know @steep-jackal-21573 , this just reflection of how hard security makes the life of developers
s
Yeah, that I fully agree. πŸ˜„
f
a
I'll be doing this with a gRPC interceptor, but yea