You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm creating this issue just to start a discussion - not because I think this project should provide this feature, but I thought this is probably the right place to start the discussion since this is where everyone that has done work on Akka and Graal native has come together.
While Graal does provide some tooling to help generate config, it misses a lot of things. For example, the self/context fields in an actor are reflected on not just when watching, but also when the actor is restarted. That only occurs when the actor fails, and it's highly unlikely that in the environment where you run your Graal tooling that you're going to trigger all the failure possibilities, more likely, it'll happen some day in production, and your system will have big problems because an actor couldn't be restarted. Likewise, a lot of things relating to clustering may not be triggered in the environment where you run your Graal tooling, eg, a lot of reflection config is needed to run kubernetes based cluster bootstrap, and that can only run inside a kubernetes cluster.
So, we need something better. The idea is that we could automate much of the generation of reflection config, both for Akka itself, as well as for end user libraries. Such a tool would work with one "artifact" at a time, for Akka libraries, an artifact would be a jar, for an end user library, an artifact would be all the class files and resources on disk that are about to be packaged into a jar. It would do the following:
Inspect all the classes, looking for anything that implements akka.actor.Actor, and generate config to allow writable access to self and context.
Find all uses of Props.apply that use reflection, and generate the necessary config for that.
Load all HOCON configuration files, look for known Akka configuration that passes an FQCN, and determine and generate the necessary reflection config to construct that class - this would obviously be done for classes in the jar, but may also need to be done for classes in other jars, since a class may be declared in another shared jar, but not used, and then it gets instantiated in this jar. We could inspect existing reflection config on the classpath to determine if it's needed.
Find all usages of spray reflection based formats (eg, used by cluster bootstrap for json messages sent through akka-management-http) and generate the necessary config.
Find all protobuf/ScalaPB messages and generate a reflection config compatible with Akkas protobuf serializer.
The above is all the things that I can think of off the top of my head, there's likely more.
The text was updated successfully, but these errors were encountered:
Given the above tooling, we could run it against all the Akka artifacts to assist in producing the artifacts that this project currently provides. It could also some day be incorporated into Akka itself, so that Akka provides it's own graal reflection config.
I'm creating this issue just to start a discussion - not because I think this project should provide this feature, but I thought this is probably the right place to start the discussion since this is where everyone that has done work on Akka and Graal native has come together.
While Graal does provide some tooling to help generate config, it misses a lot of things. For example, the
self
/context
fields in an actor are reflected on not just when watching, but also when the actor is restarted. That only occurs when the actor fails, and it's highly unlikely that in the environment where you run your Graal tooling that you're going to trigger all the failure possibilities, more likely, it'll happen some day in production, and your system will have big problems because an actor couldn't be restarted. Likewise, a lot of things relating to clustering may not be triggered in the environment where you run your Graal tooling, eg, a lot of reflection config is needed to run kubernetes based cluster bootstrap, and that can only run inside a kubernetes cluster.So, we need something better. The idea is that we could automate much of the generation of reflection config, both for Akka itself, as well as for end user libraries. Such a tool would work with one "artifact" at a time, for Akka libraries, an artifact would be a jar, for an end user library, an artifact would be all the class files and resources on disk that are about to be packaged into a jar. It would do the following:
akka.actor.Actor
, and generate config to allow writable access toself
andcontext
.Props.apply
that use reflection, and generate the necessary config for that.The above is all the things that I can think of off the top of my head, there's likely more.
The text was updated successfully, but these errors were encountered: