You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@unomi.apache.org by Thomas Draier <td...@jahia.com> on 2016/04/26 10:54:14 UTC

csv export

Hi,

In order to solve https://issues.apache.org/jira/browse/UNOMI-25 , I need
to have access to segments service, which is not available in profile
service. Also in my opinion the CSV export has nothing to do in low-level
service like profile - I would rather move the
exportProfilesPropertiesToCsv method to the REST endpoint and remove it
from the service API. What do you think ?

thomas

Re: csv export

Posted by Christophe Laprun <cl...@jahia.com>.
> On 27 Apr 2016, at 14:32, Thomas Draier <td...@jahia.com> wrote:
> 
> Hi,
> For now I implemented as Chris suggested - this way I did not have to
> change the API, and keep the logic inside the service. The API will need to
> be changed anyway at one point - it currently return a String for the whole
> csv export, it would be better to return a Stream.

+1

Christophe Laprun
Senior Software Engineer

8 rue du Sentier | 75002 Paris | France
jahia.com <http://www.jahia.com/>
SKYPE <skype:chris.laprun?add> | LINKEDIN <https://www.linkedin.com/in/chrislaprun> | TWITTER <https://twitter.com/metacosm> | VCARD <http://www.jahia.com/vcard/LaprunChristophe.vcf>

> JOIN OUR COMMUNITY <http://www.jahia.com/> to evaluate, get trained and to discover why Jahia is a leading User Experience Platform (UXP) for Digital Transformation.


Re: csv export

Posted by Thomas Draier <td...@jahia.com>.
Hi,
For now I implemented as Chris suggested - this way I did not have to
change the API, and keep the logic inside the service. The API will need to
be changed anyway at one point - it currently return a String for the whole
csv export, it would be better to return a Stream.
Thomas


On Tue, Apr 26, 2016 at 3:47 PM Thomas Draier <td...@jahia.com> wrote:

> Yes, that also make sense, at least for the "what" to export - however i
> still find it strange that the service does the format (csv), which is for
> me more the responsibility of the endpoint. Anyway, adding a wire from
> profile to segments service is possible and simpler - I thought we already
> had the opposite dependency, but actually profile service is not injected
> any other base service.
>
>
> On Tue, Apr 26, 2016 at 2:50 PM Christophe Laprun <cl...@jahia.com>
> wrote:
>
>> Hi,
>>
>> > On 26 Apr 2016, at 10:54, Thomas Draier <td...@jahia.com> wrote:
>> >
>> > In order to solve https://issues.apache.org/jira/browse/UNOMI-25 , I
>> need
>> > to have access to segments service, which is not available in profile
>> > service. Also in my opinion the CSV export has nothing to do in
>> low-level
>> > service like profile - I would rather move the
>> > exportProfilesPropertiesToCsv method to the REST endpoint and remove it
>> > from the service API. What do you think ?
>>
>> Architecturally speaking, it doesn’t seem appropriate to put the code
>> into the endpoint since it would expose too many low-level details to the
>> endpoint. Also, exporting really seems appropriate for the profile service
>> since it should be responsible for knowing the details of what needs to be
>> exported in profiles and how that exported data should be laid out. Can’t
>> we just wire the profile service to access the segments service?
>>
>> Cheers,
>> Christophe Laprun
>> Senior Software Engineer
>>
>> 8 rue du Sentier | 75002 Paris | France
>> jahia.com <http://www.jahia.com/>
>> SKYPE <skype:chris.laprun?add> | LINKEDIN <
>> https://www.linkedin.com/in/chrislaprun> | TWITTER <
>> https://twitter.com/metacosm> | VCARD <
>> http://www.jahia.com/vcard/LaprunChristophe.vcf>
>>
>> > JOIN OUR COMMUNITY <http://www.jahia.com/> to evaluate, get trained
>> and to discover why Jahia is a leading User Experience Platform (UXP) for
>> Digital Transformation.
>>
>>

Re: csv export

Posted by Thomas Draier <td...@jahia.com>.
Yes, that also make sense, at least for the "what" to export - however i
still find it strange that the service does the format (csv), which is for
me more the responsibility of the endpoint. Anyway, adding a wire from
profile to segments service is possible and simpler - I thought we already
had the opposite dependency, but actually profile service is not injected
any other base service.


On Tue, Apr 26, 2016 at 2:50 PM Christophe Laprun <cl...@jahia.com> wrote:

> Hi,
>
> > On 26 Apr 2016, at 10:54, Thomas Draier <td...@jahia.com> wrote:
> >
> > In order to solve https://issues.apache.org/jira/browse/UNOMI-25 , I
> need
> > to have access to segments service, which is not available in profile
> > service. Also in my opinion the CSV export has nothing to do in low-level
> > service like profile - I would rather move the
> > exportProfilesPropertiesToCsv method to the REST endpoint and remove it
> > from the service API. What do you think ?
>
> Architecturally speaking, it doesn’t seem appropriate to put the code into
> the endpoint since it would expose too many low-level details to the
> endpoint. Also, exporting really seems appropriate for the profile service
> since it should be responsible for knowing the details of what needs to be
> exported in profiles and how that exported data should be laid out. Can’t
> we just wire the profile service to access the segments service?
>
> Cheers,
> Christophe Laprun
> Senior Software Engineer
>
> 8 rue du Sentier | 75002 Paris | France
> jahia.com <http://www.jahia.com/>
> SKYPE <skype:chris.laprun?add> | LINKEDIN <
> https://www.linkedin.com/in/chrislaprun> | TWITTER <
> https://twitter.com/metacosm> | VCARD <
> http://www.jahia.com/vcard/LaprunChristophe.vcf>
>
> > JOIN OUR COMMUNITY <http://www.jahia.com/> to evaluate, get trained and
> to discover why Jahia is a leading User Experience Platform (UXP) for
> Digital Transformation.
>
>

Re: csv export

Posted by Christophe Laprun <cl...@jahia.com>.
Hi,

> On 26 Apr 2016, at 10:54, Thomas Draier <td...@jahia.com> wrote:
> 
> In order to solve https://issues.apache.org/jira/browse/UNOMI-25 , I need
> to have access to segments service, which is not available in profile
> service. Also in my opinion the CSV export has nothing to do in low-level
> service like profile - I would rather move the
> exportProfilesPropertiesToCsv method to the REST endpoint and remove it
> from the service API. What do you think ?

Architecturally speaking, it doesn’t seem appropriate to put the code into the endpoint since it would expose too many low-level details to the endpoint. Also, exporting really seems appropriate for the profile service since it should be responsible for knowing the details of what needs to be exported in profiles and how that exported data should be laid out. Can’t we just wire the profile service to access the segments service?

Cheers,
Christophe Laprun
Senior Software Engineer

8 rue du Sentier | 75002 Paris | France
jahia.com <http://www.jahia.com/>
SKYPE <skype:chris.laprun?add> | LINKEDIN <https://www.linkedin.com/in/chrislaprun> | TWITTER <https://twitter.com/metacosm> | VCARD <http://www.jahia.com/vcard/LaprunChristophe.vcf>

> JOIN OUR COMMUNITY <http://www.jahia.com/> to evaluate, get trained and to discover why Jahia is a leading User Experience Platform (UXP) for Digital Transformation.