You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@aries.apache.org by Raymond Auge <ra...@liferay.com> on 2016/11/24 17:19:20 UTC
Component DSL
Hello All,
My very shy colleague Carlos has just added a very nice new project in
Aries here [1] called "component-dsl"
It's a functional DSL for OSGi.
- Ray
[1] http://svn.apache.org/repos/asf/aries/trunk/component-dsl/
Re: Component DSL
Posted by Matt Sicker <bo...@gmail.com>.
Looks very cool!
On 24 November 2016 at 11:19, Raymond Auge <ra...@liferay.com> wrote:
> Hello All,
>
> My very shy colleague Carlos has just added a very nice new project in
> Aries here [1] called "component-dsl"
>
> It's a functional DSL for OSGi.
>
> - Ray
>
> [1] http://svn.apache.org/repos/asf/aries/trunk/component-dsl/
>
>
--
Matt Sicker <bo...@gmail.com>
Re: Component DSL
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Ray,
interesting !
Thanks for sharing.
Maybe at some point, we can migrate the repo to git (and use github
integration). No rush, but it could be cool.
Regards
JB
On 11/24/2016 06:19 PM, Raymond Auge wrote:
> Hello All,
>
> My very shy colleague Carlos has just added a very nice new project in
> Aries here [1] called "component-dsl"
>
> It's a functional DSL for OSGi.
>
> - Ray
>
> [1] http://svn.apache.org/repos/asf/aries/trunk/component-dsl/
>
--
Jean-Baptiste Onofr�
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com
Re: Component DSL
Posted by Carlos Sierra Andrés <ca...@liferay.com>.
Hi again...
I uploaded an example on using the component dsl.
https://github.com/csierra/osgi-jaxrs-extracted/pull/8/commits/12f92a61d0e8cd0dbf630a806ac0a31af1ca5934#diff-b7c2953bc9bc598a22c5481f9681e181R120
so this basically tracks every service with a property
jaxrs.application.select. For each of those it looks for any
CXFJaxRsServiceRegistrator that matches the filter contained in the
jaxrs.application.select property of the other service. When it finds a
match it registers the endpoint in the registrator.
When any of the dependencies, be it the service or the registrator, goes
away it closes the "branches" corresponding to those instances closing
the trackers and unreferencing the services. The idea is to build a
fairly complete set of "primitives" that allow to operate with services
in a safe way trying to avoid leaks as much as possible.
Here
https://github.com/csierra/osgi-jaxrs-extracted/pull/8/commits/12f92a61d0e8cd0dbf630a806ac0a31af1ca5934#diff-b7c2953bc9bc598a22c5481f9681e181R103
you can see another snippet. In this case it registers two services in
the framework, a Bus and a Servlet. When any of the dependencies goes
away the services are unregistered. Together with the "primitives" for
configuration you can get something quite similar to STATIC in DS but
without the need of any annotation and using the original third party
classes.
This is just a first approach. I would like to refine the set of
primitives to make them as useful as possible.
One obvious caveat is the horrible syntax. On a bright side, it should
be possible to use this from Scala confortably.
Carlos.
El 25/11/16 a las 7:57, Guillaume Nodet escribi�:
> Thx ! Do you have a few tests / examples that could demonstrate the
> possibilities of this dsl ?
>
> 2016-11-24 18:19 GMT+01:00 Raymond Auge <raymond.auge@liferay.com
> <ma...@liferay.com>>:
>
> Hello All,
>
> My very shy colleague Carlos has just added a very nice new
> project in Aries here [1] called "component-dsl"
>
> It's a functional DSL for OSGi.
>
> - Ray
>
> [1] http://svn.apache.org/repos/asf/aries/trunk/component-dsl/
> <http://svn.apache.org/repos/asf/aries/trunk/component-dsl/>
>
>
>
>
> --
> ------------------------
> Guillaume Nodet
> ------------------------
> Red Hat, Open Source Integration
>
> Email: gnodet@redhat.com <ma...@redhat.com>
> Web: http://fusesource.com <http://fusesource.com/>
> Blog: http://gnodet.blogspot.com/
>
Re: Component DSL
Posted by Carlos Sierra Andrés <ca...@liferay.com>.
Hey... sorry for the lack of tests... I will create them for each of the
"primitives" and also for the composition.
In the meanwhile, I will try to use the DSL to modify some existing code
to show the equivalence and push it.
Nevertheless it is still in an early stage so the API will surely be
extended/modified to incorporate (hopefully) better ways to tackle the
use cases.
Bests.
El 25/11/16 a las 7:57, Guillaume Nodet escribi�:
> Thx ! Do you have a few tests / examples that could demonstrate the
> possibilities of this dsl ?
>
> 2016-11-24 18:19 GMT+01:00 Raymond Auge <raymond.auge@liferay.com
> <ma...@liferay.com>>:
>
> Hello All,
>
> My very shy colleague Carlos has just added a very nice new
> project in Aries here [1] called "component-dsl"
>
> It's a functional DSL for OSGi.
>
> - Ray
>
> [1] http://svn.apache.org/repos/asf/aries/trunk/component-dsl/
> <http://svn.apache.org/repos/asf/aries/trunk/component-dsl/>
>
>
>
>
> --
> ------------------------
> Guillaume Nodet
> ------------------------
> Red Hat, Open Source Integration
>
> Email: gnodet@redhat.com <ma...@redhat.com>
> Web: http://fusesource.com <http://fusesource.com/>
> Blog: http://gnodet.blogspot.com/
>
--
Carlos Sierra
Core Engineer
Liferay Espa�a y Portugal / Liferay Spain and Portugal
Tel. +34 917336343
www.liferay.com <http://www.liferay.com/>
Enterprise. Open Source. For Life.
Visit Us: www.liferay.com <http://www.liferay.com/> | Like Us:
facebook.com/liferay <http://facebook.com/liferay> | Follow Us:
twitter.com/liferay_es <http://twitter.com/liferay>
*AVISO DE CONFIDENCIALIDAD: */\u201cLa informaci�n contenida en este mensaje
y/o archivo(s) adjunto(s), enviada desde LIFERAY SL, es
confidencial/privilegiada y est� destinada a ser le�da s�lo por la(s)
persona(s) a la(s) que va dirigida. Le recordamos que sus datos han sido
incorporados en un fichero y que siempre y cuando se cumplan los
requisitos exigidos por la normativa, podr� ejercer los derechos de
acceso, rectificaci�n, cancelaci�n y oposici�n, ante nuestra entidad./
/Si usted lee este mensaje y no es el destinatario se�alado, el empleado
o el agente responsable de entregar el mensaje al destinatario, o ha
recibido esta comunicaci�n por error, le informamos que est� totalmente
prohibida, y puede ser ilegal, cualquier divulgaci�n, distribuci�n o
reproducci�n de esta comunicaci�n, y le rogamos que nos lo notifique
inmediatamente y nos devuelva el mensaje original a la direcci�n arriba
mencionada. //Gracias.\u201d/**
/"The information contained in this message and any attached file(s)
sent by Liferay SL is confidential / privileged and intended solely for
the addressee(s). If you are not the intended recipient, any form of
disclosure, reproduction, distribution or any action taken or refrained
from in reliance on it, is prohibited and may be unlawful. Please notify
the sender immediately and destroy this e-mail. Thank you." /
Re: Component DSL
Posted by David Bosschaert <da...@gmail.com>.
Hi Carlos,
In many cases it might sense to create pure unit tests and mock the
external objects using something like mockito.
For integration tests, in Aries pax-exam is mostly used for that I think.
But another framework like bnd-test should be perfectly fine from my pov...
Thanks!
David
On 25 November 2016 at 11:16, Carlos Sierra Andrés <
carlos.sierra@liferay.com> wrote:
> Yes... that's my bad only :(
>
> I hadn't decided yet how to bootstrap the test environment. I saw that
> some modules use pax-exam, others enRoute (or bnd test). I personally am
> acquainted to arquillian but I did not want to bring in a new test
> framework.
> Should I just use bnd-test? Any suggestions?
>
> El 25/11/16 a las 11:07, David Bosschaert escribió:
>
> On 25 November 2016 at 06:57, Guillaume Nodet <gn...@apache.org> wrote:
>
>> Thx ! Do you have a few tests / examples that could demonstrate the
>> possibilities of this dsl ?
>>
>>
> +1
>
> Just noticed that the code doesn't contain any tests at all. I think we
> should try to have at least a reasonable level of junit test coverage for
> Aries components...
>
> Thanks,
>
> David
>
>
> --
> Carlos Sierra
> Core Engineer
> Liferay España y Portugal / Liferay Spain and Portugal
> Tel. +34 917336343
> www.liferay.com
>
>
> Enterprise. Open Source. For Life.
>
> Visit Us: www.liferay.com | Like Us: facebook.com/liferay | Follow
> Us: twitter.com/liferay_es <http://twitter.com/liferay>
>
> *AVISO DE CONFIDENCIALIDAD: **“La información contenida en este mensaje
> y/o archivo(s) adjunto(s), enviada desde LIFERAY SL, es
> confidencial/privilegiada y está destinada a ser leída sólo por la(s)
> persona(s) a la(s) que va dirigida. Le recordamos que sus datos han sido
> incorporados en un fichero y que siempre y cuando se cumplan los requisitos
> exigidos por la normativa, podrá ejercer los derechos de acceso,
> rectificación, cancelación y oposición, ante nuestra entidad.*
>
> *Si usted lee este mensaje y no es el destinatario señalado, el empleado o
> el agente responsable de entregar el mensaje al destinatario, o ha recibido
> esta comunicación por error, le informamos que está totalmente prohibida, y
> puede ser ilegal, cualquier divulgación, distribución o reproducción de
> esta comunicación, y le rogamos que nos lo notifique inmediatamente y nos
> devuelva el mensaje original a la dirección arriba mencionada. *
> *Gracias.”*
>
> *"The information contained in this message and any attached file(s) sent
> by Liferay SL is confidential / privileged and intended solely for the
> addressee(s). If you are not the intended recipient, any form of
> disclosure, reproduction, distribution or any action taken or refrained
> from in reliance on it, is prohibited and may be unlawful. Please notify
> the sender immediately and destroy this e-mail. Thank you." *
>
Re: Component DSL
Posted by Carlos Sierra Andrés <ca...@liferay.com>.
Yes... that's my bad only :(
I hadn't decided yet how to bootstrap the test environment. I saw that
some modules use pax-exam, others enRoute (or bnd test). I personally am
acquainted to arquillian but I did not want to bring in a new test
framework.
Should I just use bnd-test? Any suggestions?
El 25/11/16 a las 11:07, David Bosschaert escribi�:
> On 25 November 2016 at 06:57, Guillaume Nodet <gnodet@apache.org
> <ma...@apache.org>> wrote:
>
> Thx ! Do you have a few tests / examples that could demonstrate
> the possibilities of this dsl ?
>
>
> +1
>
> Just noticed that the code doesn't contain any tests at all. I think
> we should try to have at least a reasonable level of junit test
> coverage for Aries components...
>
> Thanks,
>
> David
--
Carlos Sierra
Core Engineer
Liferay Espa�a y Portugal / Liferay Spain and Portugal
Tel. +34 917336343
www.liferay.com <http://www.liferay.com/>
Enterprise. Open Source. For Life.
Visit Us: www.liferay.com <http://www.liferay.com/> | Like Us:
facebook.com/liferay <http://facebook.com/liferay> | Follow Us:
twitter.com/liferay_es <http://twitter.com/liferay>
*AVISO DE CONFIDENCIALIDAD: */\u201cLa informaci�n contenida en este mensaje
y/o archivo(s) adjunto(s), enviada desde LIFERAY SL, es
confidencial/privilegiada y est� destinada a ser le�da s�lo por la(s)
persona(s) a la(s) que va dirigida. Le recordamos que sus datos han sido
incorporados en un fichero y que siempre y cuando se cumplan los
requisitos exigidos por la normativa, podr� ejercer los derechos de
acceso, rectificaci�n, cancelaci�n y oposici�n, ante nuestra entidad./
/Si usted lee este mensaje y no es el destinatario se�alado, el empleado
o el agente responsable de entregar el mensaje al destinatario, o ha
recibido esta comunicaci�n por error, le informamos que est� totalmente
prohibida, y puede ser ilegal, cualquier divulgaci�n, distribuci�n o
reproducci�n de esta comunicaci�n, y le rogamos que nos lo notifique
inmediatamente y nos devuelva el mensaje original a la direcci�n arriba
mencionada. //Gracias.\u201d/**
/"The information contained in this message and any attached file(s)
sent by Liferay SL is confidential / privileged and intended solely for
the addressee(s). If you are not the intended recipient, any form of
disclosure, reproduction, distribution or any action taken or refrained
from in reliance on it, is prohibited and may be unlawful. Please notify
the sender immediately and destroy this e-mail. Thank you." /
Re: Component DSL
Posted by David Bosschaert <da...@gmail.com>.
On 25 November 2016 at 06:57, Guillaume Nodet <gn...@apache.org> wrote:
> Thx ! Do you have a few tests / examples that could demonstrate the
> possibilities of this dsl ?
>
>
+1
Just noticed that the code doesn't contain any tests at all. I think we
should try to have at least a reasonable level of junit test coverage for
Aries components...
Thanks,
David
Re: Component DSL
Posted by Guillaume Nodet <gn...@apache.org>.
Thx ! Do you have a few tests / examples that could demonstrate the
possibilities of this dsl ?
2016-11-24 18:19 GMT+01:00 Raymond Auge <ra...@liferay.com>:
> Hello All,
>
> My very shy colleague Carlos has just added a very nice new project in
> Aries here [1] called "component-dsl"
>
> It's a functional DSL for OSGi.
>
> - Ray
>
> [1] http://svn.apache.org/repos/asf/aries/trunk/component-dsl/
>
>
--
------------------------
Guillaume Nodet
------------------------
Red Hat, Open Source Integration
Email: gnodet@redhat.com
Web: http://fusesource.com
Blog: http://gnodet.blogspot.com/
Re: Component DSL
Posted by Carlos Sierra Andrés <ca...@liferay.com>.
Thx!
absolutely! This is preliminary work and I will be more than happy to
collect ideas and suggestions from everybody!
Carlos.
El 25/11/16 a las 11:53, Felix Meschberger escribi�:
> Nice idea !
>
> One nitpick (apart from what has already been mentioned): I am a bit
> hit by the heavy use of the string \u201eOSGi\u201c in the class and interface
> names. Would that be something that could be adapted to be something
> more meaningfull ?
>
> Regards
> Fe�lix
>
>> Am 24.11.2016 um 18:19 schrieb Raymond Auge <raymond.auge@liferay.com
>> <ma...@liferay.com>>:
>>
>> Hello All,
>>
>> My very shy colleague Carlos has just added a very nice new project
>> in Aries here [1] called "component-dsl"
>>
>> It's a functional DSL for OSGi.
>>
>> - Ray
>>
>> [1] http://svn.apache.org/repos/asf/aries/trunk/component-dsl/
>>
>
Re: Component DSL
Posted by Felix Meschberger <fm...@adobe.com>.
Nice idea !
One nitpick (apart from what has already been mentioned): I am a bit hit by the heavy use of the string „OSGi“ in the class and interface names. Would that be something that could be adapted to be something more meaningfull ?
Regards
Feölix
Am 24.11.2016 um 18:19 schrieb Raymond Auge <ra...@liferay.com>>:
Hello All,
My very shy colleague Carlos has just added a very nice new project in Aries here [1] called "component-dsl"
It's a functional DSL for OSGi.
- Ray
[1] http://svn.apache.org/repos/asf/aries/trunk/component-dsl/