Re: Ignite support for IoC beyond spring framework

2022-12-07 Thread Łukasz Dywicki

Hello,
I would like to check again status on proposed changes as the pull 
request went over first (and I think second) cycle of reviews.
Looking forward for your feedback and possibility to include these 
changes in Ignite 2.15 release.


Kind regards,
Łukasz

On 17.10.2022 18:56, Łukasz Dywicki wrote:
Going forward over evaluation - I think for naming consistency reasons 
we shall stay with @InjectResource cause other annotations which bring 
outside values are @SpringResource, @LoggerResource and 
@IgniteInstanceResource.


Making it @IgniteInject is fine for me too, but it might not fit into 
existing package contents. WDYT?


Best,
Łukasz

On 17.10.2022 16:48, Łukasz Dywicki wrote:

I created https://issues.apache.org/jira/browse/IGNITE-17915.
Going to try updating code and see how much impact it will have.

Best,
Łukasz

On 14.10.2022 20:21, Łukasz Dywicki wrote:

Hello Semyon,
I wasn't sure if deprecation of @SpringResource would be acceptable, 
if so It gives us more flexibility in bringing IoC adapter layer. 
Linked code is just fitted into existing boundaries, but I can update 
it to deal with @IgniteInject.


I will register feature request/improvement in JIRA and start working 
on it next week.


Kind regards,
Łukasz

On 14.10.2022 16:26, Данилов Семён wrote:

Hi!

This sounds like a good enhancement. Feel free to create a pull 
request!
As I see it, for now we should continue using SpringResource 
annotation (even if it injects non-spring resources), but at the 
same time create a new annotation (maybe something like 
@IgniteInject, I am bad with naming) and deprecate SpringResource 
annotation. Both annotations should work exactly the same.
Then we will have a spring version of injector interface and some 
generic version that any user can extend and use without spring.

WDYT?

P.S. You can create a JIRA ticket and mention me there, I'll be 
happy to review and merge your PR


Kind regards, Semyon.



Hello,
I would like to bring a proposal for Ignite to include support for
@SpringResource without spring at all.
We currently use ignite without Spring Framework and, to make things
harder, under OSGi. As a part of exercise couple weeks ago I 
implemented

support for IoC [1] in environment we run. I did it by simulating
spring's ApplicationContext instance expected by IgnitionEx [2] and
GridSpringResourceContext.

Turns out that Ignite IoC is fine with below API:
public interface BeanRegistry {
 T lookup(Class type);
Object lookup(String name);
}

Given that we look forward to keep use of Ignite I was asked to
contribute my work back to your project.
Would you be up to discuss, and if agreed, guide me on a shape of ioc
updates which would best fit Ignite itself? If you do not expect 
changes
in Spring integration then, maybe we could get a working solution 
within

ignite-osgi itself?

Best,
Łukasz

[1]
https://github.com/OpenNMS/horizon-stream/tree/develop/minion/minion-taskset/taskset-worker/src/main/java/org/opennms/horizon/minion/taskset/worker/ignite/resource

[2]
https://github.com/OpenNMS/horizon-stream/blob/develop/minion/minion-taskset/taskset-worker/src/main/java/org/opennms/horizon/minion/taskset/worker/ignite/IgnitionFactory.java#L15


Re: Ignite support for IoC beyond spring framework

2022-10-19 Thread Łukasz Dywicki

Hello,
I brought first version of PR, for now with limited set of tests:
https://github.com/apache/ignite/pull/10337

If you're ok with approach I've taken I can continue on satisfying 
quality criteria and stabilization of it.
I made a sample Spring registry to prove how "injection source" could 
look a like.


Best,
Łukasz

On 17.10.2022 18:56, Łukasz Dywicki wrote:
Going forward over evaluation - I think for naming consistency reasons 
we shall stay with @InjectResource cause other annotations which bring 
outside values are @SpringResource, @LoggerResource and 
@IgniteInstanceResource.


Making it @IgniteInject is fine for me too, but it might not fit into 
existing package contents. WDYT?


Best,
Łukasz

On 17.10.2022 16:48, Łukasz Dywicki wrote:

I created https://issues.apache.org/jira/browse/IGNITE-17915.
Going to try updating code and see how much impact it will have.

Best,
Łukasz

On 14.10.2022 20:21, Łukasz Dywicki wrote:

Hello Semyon,
I wasn't sure if deprecation of @SpringResource would be acceptable, 
if so It gives us more flexibility in bringing IoC adapter layer. 
Linked code is just fitted into existing boundaries, but I can update 
it to deal with @IgniteInject.


I will register feature request/improvement in JIRA and start working 
on it next week.


Kind regards,
Łukasz

On 14.10.2022 16:26, Данилов Семён wrote:

Hi!

This sounds like a good enhancement. Feel free to create a pull 
request!
As I see it, for now we should continue using SpringResource 
annotation (even if it injects non-spring resources), but at the 
same time create a new annotation (maybe something like 
@IgniteInject, I am bad with naming) and deprecate SpringResource 
annotation. Both annotations should work exactly the same.
Then we will have a spring version of injector interface and some 
generic version that any user can extend and use without spring.

WDYT?

P.S. You can create a JIRA ticket and mention me there, I'll be 
happy to review and merge your PR


Kind regards, Semyon.



Hello,
I would like to bring a proposal for Ignite to include support for
@SpringResource without spring at all.
We currently use ignite without Spring Framework and, to make things
harder, under OSGi. As a part of exercise couple weeks ago I 
implemented

support for IoC [1] in environment we run. I did it by simulating
spring's ApplicationContext instance expected by IgnitionEx [2] and
GridSpringResourceContext.

Turns out that Ignite IoC is fine with below API:
public interface BeanRegistry {
 T lookup(Class type);
Object lookup(String name);
}

Given that we look forward to keep use of Ignite I was asked to
contribute my work back to your project.
Would you be up to discuss, and if agreed, guide me on a shape of ioc
updates which would best fit Ignite itself? If you do not expect 
changes
in Spring integration then, maybe we could get a working solution 
within

ignite-osgi itself?

Best,
Łukasz

[1]
https://github.com/OpenNMS/horizon-stream/tree/develop/minion/minion-taskset/taskset-worker/src/main/java/org/opennms/horizon/minion/taskset/worker/ignite/resource

[2]
https://github.com/OpenNMS/horizon-stream/blob/develop/minion/minion-taskset/taskset-worker/src/main/java/org/opennms/horizon/minion/taskset/worker/ignite/IgnitionFactory.java#L15


Re: Ignite support for IoC beyond spring framework

2022-10-17 Thread Łukasz Dywicki
Going forward over evaluation - I think for naming consistency reasons 
we shall stay with @InjectResource cause other annotations which bring 
outside values are @SpringResource, @LoggerResource and 
@IgniteInstanceResource.


Making it @IgniteInject is fine for me too, but it might not fit into 
existing package contents. WDYT?


Best,
Łukasz

On 17.10.2022 16:48, Łukasz Dywicki wrote:

I created https://issues.apache.org/jira/browse/IGNITE-17915.
Going to try updating code and see how much impact it will have.

Best,
Łukasz

On 14.10.2022 20:21, Łukasz Dywicki wrote:

Hello Semyon,
I wasn't sure if deprecation of @SpringResource would be acceptable, 
if so It gives us more flexibility in bringing IoC adapter layer. 
Linked code is just fitted into existing boundaries, but I can update 
it to deal with @IgniteInject.


I will register feature request/improvement in JIRA and start working 
on it next week.


Kind regards,
Łukasz

On 14.10.2022 16:26, Данилов Семён wrote:

Hi!

This sounds like a good enhancement. Feel free to create a pull request!
As I see it, for now we should continue using SpringResource 
annotation (even if it injects non-spring resources), but at the same 
time create a new annotation (maybe something like @IgniteInject, I 
am bad with naming) and deprecate SpringResource annotation. Both 
annotations should work exactly the same.
Then we will have a spring version of injector interface and some 
generic version that any user can extend and use without spring.

WDYT?

P.S. You can create a JIRA ticket and mention me there, I'll be happy 
to review and merge your PR


Kind regards, Semyon.



Hello,
I would like to bring a proposal for Ignite to include support for
@SpringResource without spring at all.
We currently use ignite without Spring Framework and, to make things
harder, under OSGi. As a part of exercise couple weeks ago I 
implemented

support for IoC [1] in environment we run. I did it by simulating
spring's ApplicationContext instance expected by IgnitionEx [2] and
GridSpringResourceContext.

Turns out that Ignite IoC is fine with below API:
public interface BeanRegistry {
 T lookup(Class type);
Object lookup(String name);
}

Given that we look forward to keep use of Ignite I was asked to
contribute my work back to your project.
Would you be up to discuss, and if agreed, guide me on a shape of ioc
updates which would best fit Ignite itself? If you do not expect 
changes
in Spring integration then, maybe we could get a working solution 
within

ignite-osgi itself?

Best,
Łukasz

[1]
https://github.com/OpenNMS/horizon-stream/tree/develop/minion/minion-taskset/taskset-worker/src/main/java/org/opennms/horizon/minion/taskset/worker/ignite/resource

[2]
https://github.com/OpenNMS/horizon-stream/blob/develop/minion/minion-taskset/taskset-worker/src/main/java/org/opennms/horizon/minion/taskset/worker/ignite/IgnitionFactory.java#L15


Re: Ignite support for IoC beyond spring framework

2022-10-17 Thread Łukasz Dywicki

I created https://issues.apache.org/jira/browse/IGNITE-17915.
Going to try updating code and see how much impact it will have.

Best,
Łukasz

On 14.10.2022 20:21, Łukasz Dywicki wrote:

Hello Semyon,
I wasn't sure if deprecation of @SpringResource would be acceptable, if 
so It gives us more flexibility in bringing IoC adapter layer. Linked 
code is just fitted into existing boundaries, but I can update it to 
deal with @IgniteInject.


I will register feature request/improvement in JIRA and start working on 
it next week.


Kind regards,
Łukasz

On 14.10.2022 16:26, Данилов Семён wrote:

Hi!

This sounds like a good enhancement. Feel free to create a pull request!
As I see it, for now we should continue using SpringResource 
annotation (even if it injects non-spring resources), but at the same 
time create a new annotation (maybe something like @IgniteInject, I am 
bad with naming) and deprecate SpringResource annotation. Both 
annotations should work exactly the same.
Then we will have a spring version of injector interface and some 
generic version that any user can extend and use without spring.

WDYT?

P.S. You can create a JIRA ticket and mention me there, I'll be happy 
to review and merge your PR


Kind regards, Semyon.



Hello,
I would like to bring a proposal for Ignite to include support for
@SpringResource without spring at all.
We currently use ignite without Spring Framework and, to make things
harder, under OSGi. As a part of exercise couple weeks ago I implemented
support for IoC [1] in environment we run. I did it by simulating
spring's ApplicationContext instance expected by IgnitionEx [2] and
GridSpringResourceContext.

Turns out that Ignite IoC is fine with below API:
public interface BeanRegistry {
 T lookup(Class type);
Object lookup(String name);
}

Given that we look forward to keep use of Ignite I was asked to
contribute my work back to your project.
Would you be up to discuss, and if agreed, guide me on a shape of ioc
updates which would best fit Ignite itself? If you do not expect changes
in Spring integration then, maybe we could get a working solution within
ignite-osgi itself?

Best,
Łukasz

[1]
https://github.com/OpenNMS/horizon-stream/tree/develop/minion/minion-taskset/taskset-worker/src/main/java/org/opennms/horizon/minion/taskset/worker/ignite/resource

[2]
https://github.com/OpenNMS/horizon-stream/blob/develop/minion/minion-taskset/taskset-worker/src/main/java/org/opennms/horizon/minion/taskset/worker/ignite/IgnitionFactory.java#L15


Re: Ignite support for IoC beyond spring framework

2022-10-14 Thread Łukasz Dywicki

Hello Semyon,
I wasn't sure if deprecation of @SpringResource would be acceptable, if 
so It gives us more flexibility in bringing IoC adapter layer. Linked 
code is just fitted into existing boundaries, but I can update it to 
deal with @IgniteInject.


I will register feature request/improvement in JIRA and start working on 
it next week.


Kind regards,
Łukasz

On 14.10.2022 16:26, Данилов Семён wrote:

Hi!

This sounds like a good enhancement. Feel free to create a pull request!
As I see it, for now we should continue using SpringResource annotation (even 
if it injects non-spring resources), but at the same time create a new 
annotation (maybe something like @IgniteInject, I am bad with naming) and 
deprecate SpringResource annotation. Both annotations should work exactly the 
same.
Then we will have a spring version of injector interface and some generic 
version that any user can extend and use without spring.
WDYT?

P.S. You can create a JIRA ticket and mention me there, I'll be happy to review 
and merge your PR

Kind regards, Semyon.



Hello,
I would like to bring a proposal for Ignite to include support for
@SpringResource without spring at all.
We currently use ignite without Spring Framework and, to make things
harder, under OSGi. As a part of exercise couple weeks ago I implemented
support for IoC [1] in environment we run. I did it by simulating
spring's ApplicationContext instance expected by IgnitionEx [2] and
GridSpringResourceContext.

Turns out that Ignite IoC is fine with below API:
public interface BeanRegistry {
 T lookup(Class type);
Object lookup(String name);
}

Given that we look forward to keep use of Ignite I was asked to
contribute my work back to your project.
Would you be up to discuss, and if agreed, guide me on a shape of ioc
updates which would best fit Ignite itself? If you do not expect changes
in Spring integration then, maybe we could get a working solution within
ignite-osgi itself?

Best,
Łukasz

[1]
https://github.com/OpenNMS/horizon-stream/tree/develop/minion/minion-taskset/taskset-worker/src/main/java/org/opennms/horizon/minion/taskset/worker/ignite/resource

[2]
https://github.com/OpenNMS/horizon-stream/blob/develop/minion/minion-taskset/taskset-worker/src/main/java/org/opennms/horizon/minion/taskset/worker/ignite/IgnitionFactory.java#L15


Re: Ignite support for IoC beyond spring framework

2022-10-14 Thread Данилов Семён
Hi! 

This sounds like a good enhancement. Feel free to create a pull request!
As I see it, for now we should continue using SpringResource annotation (even 
if it injects non-spring resources), but at the same time create a new 
annotation (maybe something like @IgniteInject, I am bad with naming) and 
deprecate SpringResource annotation. Both annotations should work exactly the 
same.
Then we will have a spring version of injector interface and some generic 
version that any user can extend and use without spring.
WDYT?

P.S. You can create a JIRA ticket and mention me there, I'll be happy to review 
and merge your PR

Kind regards, Semyon.


> Hello,
> I would like to bring a proposal for Ignite to include support for
> @SpringResource without spring at all.
> We currently use ignite without Spring Framework and, to make things
> harder, under OSGi. As a part of exercise couple weeks ago I implemented
> support for IoC [1] in environment we run. I did it by simulating
> spring's ApplicationContext instance expected by IgnitionEx [2] and
> GridSpringResourceContext.
> 
> Turns out that Ignite IoC is fine with below API:
> public interface BeanRegistry {
>  T lookup(Class type);
> Object lookup(String name);
> }
> 
> Given that we look forward to keep use of Ignite I was asked to
> contribute my work back to your project.
> Would you be up to discuss, and if agreed, guide me on a shape of ioc
> updates which would best fit Ignite itself? If you do not expect changes
> in Spring integration then, maybe we could get a working solution within
> ignite-osgi itself?
> 
> Best,
> Łukasz
> 
> [1]
> https://github.com/OpenNMS/horizon-stream/tree/develop/minion/minion-taskset/taskset-worker/src/main/java/org/opennms/horizon/minion/taskset/worker/ignite/resource
> 
> [2]
> https://github.com/OpenNMS/horizon-stream/blob/develop/minion/minion-taskset/taskset-worker/src/main/java/org/opennms/horizon/minion/taskset/worker/ignite/IgnitionFactory.java#L15


Ignite support for IoC beyond spring framework

2022-10-12 Thread Łukasz Dywicki

Hello,
I would like to bring a proposal for Ignite to include support for 
@SpringResource without spring at all.
We currently use ignite without Spring Framework and, to make things 
harder, under OSGi. As a part of exercise couple weeks ago I implemented 
support for IoC [1] in environment we run. I did it by simulating 
spring's ApplicationContext instance expected by IgnitionEx [2] and 
GridSpringResourceContext.


Turns out that Ignite IoC is fine with below API:
public interface BeanRegistry {
 T lookup(Class type);
Object lookup(String name);
}

Given that we look forward to keep use of Ignite I was asked to 
contribute my work back to your project.
Would you be up to discuss, and if agreed, guide me on a shape of ioc 
updates which would best fit Ignite itself? If you do not expect changes 
in Spring integration then, maybe we could get a working solution within 
ignite-osgi itself?


Best,
Łukasz

[1] 
https://github.com/OpenNMS/horizon-stream/tree/develop/minion/minion-taskset/taskset-worker/src/main/java/org/opennms/horizon/minion/taskset/worker/ignite/resource


[2] 
https://github.com/OpenNMS/horizon-stream/blob/develop/minion/minion-taskset/taskset-worker/src/main/java/org/opennms/horizon/minion/taskset/worker/ignite/IgnitionFactory.java#L15