These are chat archives for atomix/atomix

3rd
Jun 2018
Jordan Halterman
@kuujo
Jun 03 2018 01:02
Classpath scanning is done… just gotta test it in ONOS and we’ll see if I need to make any more class loader changes
Johno Crawford
@johnou
Jun 03 2018 02:42
@kuujo opening a pr?
diff on github isn't loading all the good stuff
aha services
i wouldn't recommend using it like that
Johno Crawford
@johnou
Jun 03 2018 02:50
or it might take some time with apps that have a lot of jars on the classpath
some things that would help
if there are internal primitives restricting the scanSpec speeds it up a shitload
obviously that's not going to work if you want other others to register their own primitives though
ah it's almost 5am, i'll take a look after some shut eye
Jordan Halterman
@kuujo
Jun 03 2018 09:28
Performance is not exactly a concern. The classpath only needs to be scanned when the node is bootstrapped or when a primitive type is missing if we want to allow for classes being added at runtime. The whole point is to allow users to extend Atomix with custom primitives, otherwise we could just hard code the class names. The best you can do is expose some more options for limiting the classpath, but that just complicates configuration for slightly less time starting up a system that takes a long time to startup regardless.
Reflections takes package names to limit scanning, but if you’re going to require a configuration for extensions then might as well just go back to requiring extensions to be explicitly registered in the builder.
The PR might be done. I haven’t tested it much yet. Probably will be pretty busy tomorrow and will be traveling on Monday
Works really well with OSGi though
Johno Crawford
@johnou
Jun 03 2018 10:07
yeah great library, well documented and actively maintained
Johno Crawford
@johnou
Jun 03 2018 10:23
@kuujo don't merge it just yet, i'm making some changes but wife is kicking me out to pick up food for lunch and dinner so i'll need to commit later
Johno Crawford
@johnou
Jun 03 2018 12:50
atomix/atomix@02b1bc1
Johno Crawford
@johnou
Jun 03 2018 14:59
got a better idea
Johno Crawford
@johnou
Jun 03 2018 18:22
@kuujo i'll push what I have, feel free to revert if you're not a fan
Jordan Halterman
@kuujo
Jun 03 2018 21:26
@johnou that seems fine. I haven’t tested this but I wonder if this code will match abstract classes
Nvm
It’s fine
Jordan Halterman
@kuujo
Jun 03 2018 21:34
I actually looked through the Apache Felix classpath scanning code and it’s totally hacky but does its job. It basically reads fields from the Felix class loader to get bundle paths.
Johno Crawford
@johnou
Jun 03 2018 23:26
Yep
Johno Crawford
@johnou
Jun 03 2018 23:35
Maybe it could be written without reflection
Would need to see what it provides