You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tamaya.apache.org by Mark Struberg <st...@yahoo.de> on 2014/12/27 10:44:05 UTC

[DISCUSS] Do the PropertySource and the whole Configuration System needs to be Serializable?

What is the benefit of having all the things Serializable? 


Usually the configuration will be rebuilt on every node and if something needs to be serializable then only the configured values. The configuration system itself imo doesn't need to be Serializable. And sometimes it's even impossible/counter-productive to do so. E.g. sometimes the configuration differs depending on the cluster node you are on...

LieGrue,
strub

Re: [DISCUSS] Do the PropertySource and the whole Configuration System needs to be Serializable?

Posted by Mark Struberg <st...@yahoo.de>.
Configuration might be different on each node. Thus having it Serializable is simply counter-productive. 


It will be very easy to just add an @ApplicationScopedproducer later. But this is not part of our SE core but later for EE integration. Spring can do the same as can do guice. WE don't need to support that. 


LieGrue,
strub  





> On Saturday, 27 December 2014, 10:52, Romain Manni-Bucau <rm...@gmail.com> wrote:
> > Well it should be but it shouldnt be serialized to let it be injectable.
> Having AppScope or equivalent sounds the main constraint when we ll
> integrate it with IoCs.
> 
> Le 27 déc. 2014 10:45, "Mark Struberg" <st...@yahoo.de> a 
> écrit :
> 
>>  What is the benefit of having all the things Serializable?
>> 
>> 
>>  Usually the configuration will be rebuilt on every node and if something
>>  needs to be serializable then only the configured values. The configuration
>>  system itself imo doesn't need to be Serializable. And sometimes 
> it's even
>>  impossible/counter-productive to do so. E.g. sometimes the configuration
>>  differs depending on the cluster node you are on...
>> 
>>  LieGrue,
>>  strub
>> 
>

Re: [DISCUSS] Do the PropertySource and the whole Configuration System needs to be Serializable?

Posted by Romain Manni-Bucau <rm...@gmail.com>.
If you put it on api you force impl as well. But we dont need it so let s
drop it
Le 27 déc. 2014 12:34, "Anatole Tresch" <at...@gmail.com> a écrit :

> In practice from a SE design standpoint you would claim Serializability
> within JavaDoc/spec. Serializable as marker interface is added on
> implementation level!
>
> 2014-12-27 11:18 GMT+01:00 Romain
> ​It w​
> Manni-Bucau <rm...@gmail.com>:
>
> > So seems we agree to have only local handling in the api so no
> serializable
> > ;)
> > Le 27 déc. 2014 11:02, "Anatole Tresch" <at...@gmail.com> a écrit :
> >
> > > Dear all
> > > i dont think it makes sense to make OropertySource serializable,
> because
> > > when its a dynamic one there is not much sense in doing so. What I
> > propose
> > > and have implemented is that you created a frozen instance of a source
> > > (containing the scannable parts ), which then is serializable. In most
> > > cases I nevertheless would expect some JSON/xml based format to tranfer
> > > property sources/config remotely ...
> > > Romain Manni-Bucau <rm...@gmail.com> schrieb am Sa., 27. Dez.
> 2014
> > > um
> > > 10:52:
> > >
> > > > Well it should be but it shouldnt be serialized to let it be
> > injectable.
> > > > Having AppScope or equivalent sounds the main constraint when we ll
> > > > integrate it with IoCs.
> > > > Le 27 déc. 2014 10:45, "Mark Struberg" <st...@yahoo.de> a écrit :
> > > >
> > > > > What is the benefit of having all the things Serializable?
> > > > >
> > > > >
> > > > > Usually the configuration will be rebuilt on every node and if
> > > something
> > > > > needs to be serializable then only the configured values. The
> > > > configuration
> > > > > system itself imo doesn't need to be Serializable. And sometimes
> it's
> > > > even
> > > > > impossible/counter-productive to do so. E.g. sometimes the
> > > configuration
> > > > > differs depending on the cluster node you are on...
> > > > >
> > > > > LieGrue,
> > > > > strub
> > > > >
> > > >
> > >
> >
>
>
>
> --
> *Anatole Tresch*
> Java Engineer & Architect, JSR Spec Lead
> Glärnischweg 10
> CH - 8620 Wetzikon
>
> *Switzerland, Europe Zurich, GMT+1*
> *Twitter:  @atsticks*
> *Blogs: **http://javaremarkables.blogspot.ch/
> <http://javaremarkables.blogspot.ch/>*
>
> *Google: atsticksMobile  +41-76 344 62 79 <%2B41-76%20344%2062%2079>*
>

Re: [DISCUSS] Do the PropertySource and the whole Configuration System needs to be Serializable?

Posted by Anatole Tresch <at...@gmail.com>.
In practice from a SE design standpoint you would claim Serializability
within JavaDoc/spec. Serializable as marker interface is added on
implementation level!

2014-12-27 11:18 GMT+01:00 Romain
​It w​
Manni-Bucau <rm...@gmail.com>:

> So seems we agree to have only local handling in the api so no serializable
> ;)
> Le 27 déc. 2014 11:02, "Anatole Tresch" <at...@gmail.com> a écrit :
>
> > Dear all
> > i dont think it makes sense to make OropertySource serializable, because
> > when its a dynamic one there is not much sense in doing so. What I
> propose
> > and have implemented is that you created a frozen instance of a source
> > (containing the scannable parts ), which then is serializable. In most
> > cases I nevertheless would expect some JSON/xml based format to tranfer
> > property sources/config remotely ...
> > Romain Manni-Bucau <rm...@gmail.com> schrieb am Sa., 27. Dez. 2014
> > um
> > 10:52:
> >
> > > Well it should be but it shouldnt be serialized to let it be
> injectable.
> > > Having AppScope or equivalent sounds the main constraint when we ll
> > > integrate it with IoCs.
> > > Le 27 déc. 2014 10:45, "Mark Struberg" <st...@yahoo.de> a écrit :
> > >
> > > > What is the benefit of having all the things Serializable?
> > > >
> > > >
> > > > Usually the configuration will be rebuilt on every node and if
> > something
> > > > needs to be serializable then only the configured values. The
> > > configuration
> > > > system itself imo doesn't need to be Serializable. And sometimes it's
> > > even
> > > > impossible/counter-productive to do so. E.g. sometimes the
> > configuration
> > > > differs depending on the cluster node you are on...
> > > >
> > > > LieGrue,
> > > > strub
> > > >
> > >
> >
>



-- 
*Anatole Tresch*
Java Engineer & Architect, JSR Spec Lead
Glärnischweg 10
CH - 8620 Wetzikon

*Switzerland, Europe Zurich, GMT+1*
*Twitter:  @atsticks*
*Blogs: **http://javaremarkables.blogspot.ch/
<http://javaremarkables.blogspot.ch/>*

*Google: atsticksMobile  +41-76 344 62 79 <%2B41-76%20344%2062%2079>*

Re: [DISCUSS] Do the PropertySource and the whole Configuration System needs to be Serializable?

Posted by Romain Manni-Bucau <rm...@gmail.com>.
So seems we agree to have only local handling in the api so no serializable
;)
Le 27 déc. 2014 11:02, "Anatole Tresch" <at...@gmail.com> a écrit :

> Dear all
> i dont think it makes sense to make OropertySource serializable, because
> when its a dynamic one there is not much sense in doing so. What I propose
> and have implemented is that you created a frozen instance of a source
> (containing the scannable parts ), which then is serializable. In most
> cases I nevertheless would expect some JSON/xml based format to tranfer
> property sources/config remotely ...
> Romain Manni-Bucau <rm...@gmail.com> schrieb am Sa., 27. Dez. 2014
> um
> 10:52:
>
> > Well it should be but it shouldnt be serialized to let it be injectable.
> > Having AppScope or equivalent sounds the main constraint when we ll
> > integrate it with IoCs.
> > Le 27 déc. 2014 10:45, "Mark Struberg" <st...@yahoo.de> a écrit :
> >
> > > What is the benefit of having all the things Serializable?
> > >
> > >
> > > Usually the configuration will be rebuilt on every node and if
> something
> > > needs to be serializable then only the configured values. The
> > configuration
> > > system itself imo doesn't need to be Serializable. And sometimes it's
> > even
> > > impossible/counter-productive to do so. E.g. sometimes the
> configuration
> > > differs depending on the cluster node you are on...
> > >
> > > LieGrue,
> > > strub
> > >
> >
>

Re: [DISCUSS] Do the PropertySource and the whole Configuration System needs to be Serializable?

Posted by Anatole Tresch <at...@gmail.com>.
Dear all
i dont think it makes sense to make OropertySource serializable, because
when its a dynamic one there is not much sense in doing so. What I propose
and have implemented is that you created a frozen instance of a source
(containing the scannable parts ), which then is serializable. In most
cases I nevertheless would expect some JSON/xml based format to tranfer
property sources/config remotely ...
Romain Manni-Bucau <rm...@gmail.com> schrieb am Sa., 27. Dez. 2014 um
10:52:

> Well it should be but it shouldnt be serialized to let it be injectable.
> Having AppScope or equivalent sounds the main constraint when we ll
> integrate it with IoCs.
> Le 27 déc. 2014 10:45, "Mark Struberg" <st...@yahoo.de> a écrit :
>
> > What is the benefit of having all the things Serializable?
> >
> >
> > Usually the configuration will be rebuilt on every node and if something
> > needs to be serializable then only the configured values. The
> configuration
> > system itself imo doesn't need to be Serializable. And sometimes it's
> even
> > impossible/counter-productive to do so. E.g. sometimes the configuration
> > differs depending on the cluster node you are on...
> >
> > LieGrue,
> > strub
> >
>

Re: [DISCUSS] Do the PropertySource and the whole Configuration System needs to be Serializable?

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Well it should be but it shouldnt be serialized to let it be injectable.
Having AppScope or equivalent sounds the main constraint when we ll
integrate it with IoCs.
Le 27 déc. 2014 10:45, "Mark Struberg" <st...@yahoo.de> a écrit :

> What is the benefit of having all the things Serializable?
>
>
> Usually the configuration will be rebuilt on every node and if something
> needs to be serializable then only the configured values. The configuration
> system itself imo doesn't need to be Serializable. And sometimes it's even
> impossible/counter-productive to do so. E.g. sometimes the configuration
> differs depending on the cluster node you are on...
>
> LieGrue,
> strub
>