You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Ajith Ranabahu <aj...@gmail.com> on 2005/09/12 13:36:17 UTC
[Axis2] More about service groups
Hi all,
We had some discussions among ourselves about the Service groups (refer the
IRC chat on 31st of August) and came up with some suggesions. Following is a
brief account of what was discussed and how we sought out possible solution.
For the folks who are not familiar with the whole business of service
groups, the idea is to deploy a group of services at once (The current
implementation allows the deploying of single services only.). Refer to the
chat log at http://marc.theaimsgroup.com/?l=axis-dev&m=112549326807148&w=2for
more information on what was mentioned at the initial discussion)
Ok. Back to the original discussion. These are the things that seems to be
needed.
* Introduce a new description and a context. It was decided to call this
"ServiceGroup" (context/ description) [Hopefully I'm not starting another
naming war here :)] to avoid confusion. These will lie in between the
Service and Configuration in the respective hierarchies. The archive will
have either a service descriptor xml with a single service description or a
group description xml with multiple service descriptions. (Again the naming
of the descriptor files is open to discussion. I guess the names service.xmland
serviceGroup.xml would be fine for now)
* With the introduction of service groups springs up some issues that
requires us to look back (perhaps redefine some of the concepts).
* How to keep the consistancy? User can deploy services and service groups
in a mix !
The solution to this would be to introduce a default service group per
service. So logically all services will live in a service group. The settled
way is to have a service group with the name of the service and attach the
service as anonymous to that group.
* Should the group concept be visible to the outside ?
No. Even if the services live in groups, groups are not visible to the
outside world and the services are accessible directly without going through
the group. However the service authors have the flexibility to use service
names in the scope of service groups (i.e. service names need only be unique
within a service group) so to avoid confusion, the name of the service for
the outside world will be service group name : service name. For a service
group containing a single service, just the group name would suffice.
* How to dispatch the services ? Now there is a service group to be
identified !
Actually Service group makes it easier to identify the services. Find the
service group and the search is narrowed! For the URL based dispatcher the
modified service name will do. However when addressing is present, a
reference property will be the right way to enforce it. The suggested name
of the reference property is "axis2:serviceGroupContextId".
Again the discussion of these contexts leads to a rethinking of the
lifetimes of the contexts. For now these are the suggested life times for
the contexts.
OperationContext - For an operation instance. The operation context should
terminate when the last message relating to it's MEP is sent/received.
ServiceContext - For a service instance. A service instantiates when a call
comes to one of it's operations. It is possible to have multiple service
conetexts lying around (probably per user)
ServiceGroup - This is the tricky one. This should be in scope across
services hence it's more in the scope of a session! For the Http case it can
directly be mapped to the http session.
That should be enough for the concepts :) Thoughts anyone ?
--
Ajith Ranabahu
Re: [Axis2] More about service groups
Posted by Davanum Srinivas <da...@gmail.com>.
Ajith,
Good stuff. Let's start with implementing this and see what else crops up :)
thanks,
dims
On 9/12/05, Ajith Ranabahu <aj...@gmail.com> wrote:
> Hi all,
> We had some discussions among ourselves about the Service groups (refer the
> IRC chat on 31st of August) and came up with some suggesions. Following is a
> brief account of what was discussed and how we sought out possible solution.
> For the folks who are not familiar with the whole business of service
> groups, the idea is to deploy a group of services at once (The current
> implementation allows the deploying of single services only.). Refer to the
> chat log at
> http://marc.theaimsgroup.com/?l=axis-dev&m=112549326807148&w=2
> for more information on what was mentioned at the initial discussion)
>
> Ok. Back to the original discussion. These are the things that seems to be
> needed.
>
> * Introduce a new description and a context. It was decided to call this
> "ServiceGroup" (context/ description) [Hopefully I'm not starting another
> naming war here :)] to avoid confusion. These will lie in between the
> Service and Configuration in the respective hierarchies. The archive will
> have either a service descriptor xml with a single service description or a
> group description xml with multiple service descriptions. (Again the naming
> of the descriptor files is open to discussion. I guess the names service.xml
> and serviceGroup.xml would be fine for now)
>
> * With the introduction of service groups springs up some issues that
> requires us to look back (perhaps redefine some of the concepts).
>
> * How to keep the consistancy? User can deploy services and service
> groups in a mix !
> The solution to this would be to introduce a default service group
> per service. So logically all services will live in a service group. The
> settled way is to have a service group with the name of the service and
> attach the service as anonymous to that group.
>
> * Should the group concept be visible to the outside ?
> No. Even if the services live in groups, groups are not visible to
> the outside world and the services are accessible directly without going
> through the group. However the service authors have the flexibility to use
> service names in the scope of service groups (i.e. service names need only
> be unique within a service group) so to avoid confusion, the name of the
> service for the outside world will be service group name : service name. For
> a service group containing a single service, just the group name would
> suffice.
>
> * How to dispatch the services ? Now there is a service group to be
> identified !
> Actually Service group makes it easier to identify the services.
> Find the service group and the search is narrowed! For the URL based
> dispatcher the modified service name will do. However when addressing is
> present, a reference property will be the right way to enforce it. The
> suggested name of the reference property is "axis2:serviceGroupContextId".
>
> Again the discussion of these contexts leads to a rethinking of the
> lifetimes of the contexts. For now these are the suggested life times for
> the contexts.
> OperationContext - For an operation instance. The operation context should
> terminate when the last message relating to it's MEP is sent/received.
> ServiceContext - For a service instance. A service instantiates when a
> call comes to one of it's operations. It is possible to have multiple
> service conetexts lying around (probably per user)
> ServiceGroup - This is the tricky one. This should be in scope across
> services hence it's more in the scope of a session! For the Http case it can
> directly be mapped to the http session.
>
> That should be enough for the concepts :) Thoughts anyone ?
>
>
>
>
> --
> Ajith Ranabahu
--
Davanum Srinivas : http://wso2.com/ - Oxygenating The Web Service Platform
Re: [Axis2] More about service groups
Posted by Glen Daniels <gl...@thoughtcraft.com>.
Hi Dennis, all:
>>> rather than introducing new description file I like to have
>>> service.xml insider archive file and which root element can either be
>>> <service> or <services> , if the root element is <service> I will
>>> create ServiceGroupDescription by giving archive name as group name
>>> and the group only contain one service. In the other hand if the root
>>> element is <services> ServiceGruopDescription will be created by
>>> giving archive name as Service Group name and all the service in
>>> service.xml will belong to that service group.
>>
>> +1, but how about a slight variation: s/service.xml/services.xml/.
>>
> +1, but I'd suggest a more distinctive name - how about
> service-group.xml? I think that would reduce the chance of user errors
> from misreading one name as the other.
There would only be one common filename - the differentiation would
happen via the XML inside the file, which would either be <serviceGroup>
or <service>.
I'm +1 for this idea of switching based on the XML, and I like
"services.xml" as the file name.
--Glen
Re: [Axis2] More about service groups
Posted by Dennis Sosnoski <dm...@sosnoski.com>.
Sanjiva Weerawarana wrote:
>On Tue, 2005-09-13 at 14:42 +0600, Deepal Jayasinghe wrote:
>
>
>>Hi all;
>>
>>+1 for proposal ,
>>
>>But I have some comments ,
>>rather than introducing new description file I like to have service.xml
>>insider archive file and which root element can either be <service> or
>><services> , if the root element is <service> I will create
>>ServiceGroupDescription by giving archive name as group name and the group
>>only contain one service. In the other hand if the root element is
>><services> ServiceGruopDescription will be created by giving archive name as
>>Service Group name and all the service in service.xml will belong to that
>>service group.
>>
>>
>
>+1, but how about a slight variation: s/service.xml/services.xml/.
>
>That makes it slightly clearer - so we're not introducing an additional
>description file but rather just renaming the current one.
>
>Only bad thing is we'd be changing what we've had so far .. OTOH adding
>service groups is a significant new function. In any case, I can live
>with either name.
>
>
+1, but I'd suggest a more distinctive name - how about
service-group.xml? I think that would reduce the chance of user errors
from misreading one name as the other.
- Dennis
Re: [Axis2] More about service groups
Posted by Sanjiva Weerawarana <sa...@opensource.lk>.
On Tue, 2005-09-13 at 14:42 +0600, Deepal Jayasinghe wrote:
> Hi all;
>
> +1 for proposal ,
>
> But I have some comments ,
> rather than introducing new description file I like to have service.xml
> insider archive file and which root element can either be <service> or
> <services> , if the root element is <service> I will create
> ServiceGroupDescription by giving archive name as group name and the group
> only contain one service. In the other hand if the root element is
> <services> ServiceGruopDescription will be created by giving archive name as
> Service Group name and all the service in service.xml will belong to that
> service group.
+1, but how about a slight variation: s/service.xml/services.xml/.
That makes it slightly clearer - so we're not introducing an additional
description file but rather just renaming the current one.
Only bad thing is we'd be changing what we've had so far .. OTOH adding
service groups is a significant new function. In any case, I can live
with either name.
Sanjiva.
Re: [Axis2] More about service groups
Posted by Deepal Jayasinghe <de...@opensource.lk>.
Hi all;
+1 for proposal ,
But I have some comments ,
rather than introducing new description file I like to have service.xml
insider archive file and which root element can either be <service> or
<services> , if the root element is <service> I will create
ServiceGroupDescription by giving archive name as group name and the group
only contain one service. In the other hand if the root element is
<services> ServiceGruopDescription will be created by giving archive name as
Service Group name and all the service in service.xml will belong to that
service group.
Thanks,
Deepal
................................................................
~Future is Open~
----- Original Message -----
From: "Sanjiva Weerawarana" <sa...@opensource.lk>
To: <ax...@ws.apache.org>
Sent: Tuesday, September 13, 2005 10:00 AM
Subject: Re: [Axis2] More about service groups
> On Tue, 2005-09-13 at 09:49 +0600, Deepal Jayasinghe wrote:
>> I think we do not need to introduce new archive file or
>> description to solve this problem , so my idea is this
>> no matter archive file contain a service or service-group, the
>> archive file contain service.xml and the it will be like that
>>
>> <services >
>> <service name="Service1">
>> ...........................
>> ............................
>> </service>
>> <service name="Service2">
>> ...........................
>> ............................
>> </service>
>> </services>
>>
>> So the existing service.xml has to change to this format,
>>
>> and the name of the archive file will be that name of the
>> service group , if the name of the archive file is foo.aar
>> then service-group name will be "foo" and the epr of the
>> services will axis2/services/foo:Service1
>> and axis2/services/foo:Service2
>>
>>
>> In addition to that META-INF folder can contain any number of
>> wsdl file , in this case that can contain
>> Service1.wsdl , Service2.wsdl in that case ServiceDescriptions
>> will be created using WSDLs and overide and configure using
>> srevice.xml
>
> This works for the case of >1 service per aar. But what about the simple
> case? Doesn't this force the user to come up with 2 names in that case-
> one for the .aar file and one for the service?? If so that's ugly ...
>
> An alternative is to use one file service.xml (or rename to
> package.xml ??) which contains either
> <service> .. </service>
> or
> <services>
> <service name="s1"> .. </service>
> <service name="s2"> .. </service>
> </services>
>
> The deployment code can figure out which case it is based on the QName
> of the document element.
>
> Sanjiva.
>
>
Re: [Axis2] More about service groups
Posted by Sanjiva Weerawarana <sa...@opensource.lk>.
On Tue, 2005-09-13 at 09:49 +0600, Deepal Jayasinghe wrote:
> I think we do not need to introduce new archive file or
> description to solve this problem , so my idea is this
> no matter archive file contain a service or service-group, the
> archive file contain service.xml and the it will be like that
>
> <services >
> <service name="Service1">
> ...........................
> ............................
> </service>
> <service name="Service2">
> ...........................
> ............................
> </service>
> </services>
>
> So the existing service.xml has to change to this format,
>
> and the name of the archive file will be that name of the
> service group , if the name of the archive file is foo.aar
> then service-group name will be "foo" and the epr of the
> services will axis2/services/foo:Service1
> and axis2/services/foo:Service2
>
>
> In addition to that META-INF folder can contain any number of
> wsdl file , in this case that can contain
> Service1.wsdl , Service2.wsdl in that case ServiceDescriptions
> will be created using WSDLs and overide and configure using
> srevice.xml
This works for the case of >1 service per aar. But what about the simple
case? Doesn't this force the user to come up with 2 names in that case-
one for the .aar file and one for the service?? If so that's ugly ...
An alternative is to use one file service.xml (or rename to
package.xml ??) which contains either
<service> .. </service>
or
<services>
<service name="s1"> .. </service>
<service name="s2"> .. </service>
</services>
The deployment code can figure out which case it is based on the QName
of the document element.
Sanjiva.
Re: [Axis2] More about service groups
Posted by Deepal Jayasinghe <de...@opensource.lk>.
hi all;
see my comments below;
Thanks,
Deepal
................................................................
~Future is Open~
----- Original Message -----
From: Ajith Ranabahu
To: Axis developer list
Sent: Monday, September 12, 2005 5:36 PM
Subject: [Axis2] More about service groups
Hi all,
We had some discussions among ourselves about the Service groups (refer the IRC chat on 31st of August) and came up with some suggesions. Following is a brief account of what was discussed and how we sought out possible solution.
For the folks who are not familiar with the whole business of service groups, the idea is to deploy a group of services at once (The current implementation allows the deploying of single services only.). Refer to the chat log at http://marc.theaimsgroup.com/?l=axis-dev&m=112549326807148&w=2 for more information on what was mentioned at the initial discussion)
Ok. Back to the original discussion. These are the things that seems to be needed.
* Introduce a new description and a context. It was decided to call this "ServiceGroup" (context/ description) [Hopefully I'm not starting another naming war here :)] to avoid confusion. These will lie in between the Service and Configuration in the respective hierarchies. The archive will have either a service descriptor xml with a single service description or a group description xml with multiple service descriptions. (Again the naming of the descriptor files is open to discussion. I guess the names service.xml and serviceGroup.xml would be fine for now)
>>>>>>>>>>>>>>>>>>>>>>>>>>
I think we do not need to introduce new archive file or description to solve this problem , so my idea is this
no matter archive file contain a service or service-group, the archive file contain service.xml and the it will be like that
<services >
<service name="Service1">
...........................
............................
</service>
<service name="Service2">
...........................
............................
</service>
</services>
So the existing service.xml has to change to this format,
and the name of the archive file will be that name of the service group , if the name of the archive file is foo.aar then service-group name will be "foo" and the epr of the services will axis2/services/foo:Service1
and axis2/services/foo:Service2
In addition to that META-INF folder can contain any number of wsdl file , in this case that can contain
Service1.wsdl , Service2.wsdl in that case ServiceDescriptions will be created using WSDLs and overide and configure using srevice.xml
>>>>>>>>>>>>>>>>>>>>>>>>>>>
* With the introduction of service groups springs up some issues that requires us to look back (perhaps redefine some of the concepts).
* How to keep the consistancy? User can deploy services and service groups in a mix !
The solution to this would be to introduce a default service group per service. So logically all services will live in a service group. The settled way is to have a service group with the name of the service and attach the service as anonymous to that group.
* Should the group concept be visible to the outside ?
No. Even if the services live in groups, groups are not visible to the outside world and the services are accessible directly without going through the group. However the service authors have the flexibility to use service names in the scope of service groups (i.e. service names need only be unique within a service group) so to avoid confusion, the name of the service for the outside world will be service group name : service name. For a service group containing a single service, just the group name would suffice.
* How to dispatch the services ? Now there is a service group to be identified !
Actually Service group makes it easier to identify the services. Find the service group and the search is narrowed! For the URL based dispatcher the modified service name will do. However when addressing is present, a reference property will be the right way to enforce it. The suggested name of the reference property is "axis2:serviceGroupContextId".
Again the discussion of these contexts leads to a rethinking of the lifetimes of the contexts. For now these are the suggested life times for the contexts.
OperationContext - For an operation instance. The operation context should terminate when the last message relating to it's MEP is sent/received.
ServiceContext - For a service instance. A service instantiates when a call comes to one of it's operations. It is possible to have multiple service conetexts lying around (probably per user)
ServiceGroup - This is the tricky one. This should be in scope across services hence it's more in the scope of a session! For the Http case it can directly be mapped to the http session.
That should be enough for the concepts :) Thoughts anyone ?
--
Ajith Ranabahu