On Fri, Aug 28, 2009 at 11:37 PM, Deepal jayasinghe <deep...@gmail.com>wrote:
> > > > > Ok let me explain. In the URI based service dispatcher, lets say we > > have the incoming URL services/foo/Echo. When it give this to > > parseRequestURLForServiceAndOperation method to process, it returns > > value[0] > foo, value[1] > Echo and value[2] > foo/Echo. > > > > Then it tries to find a service from 'foo'. If so, fine this is the > > existing case (In the URI based operation dispatcher, it will find the > > operation Echo). If there's no service called 'foo', then it tries to > > find a service from foo/Echo (value[2]). If it exists, that is our > > hierarchical serivce. > Make sense, then how about the operation name for the hierarchical > service? is it like /services/foo/Echo/echo ?. Yes exactly. in this case, value[2] > foo/Echo/echo. As I explained above, after checking for foo, it tries to find a hierarchical service from foo/Echo/echo. If that is also not found, if tries to find a hierarchical service foo/Echo with the operation 'echo'. > > > Only worry I have is this is confusing, by looking at the URI it is hard > to tell whether it is a service or operation ("/" is a special character > when for URL and it has its own meaning). That is why I suggested to > follow something like "/services/version-isusru/echo" > "/services/version-azeez/echo". Which does not break anything and you do > not need to do anything to get that working. Yes exactly. That can be done. We can use some other charactor like '-' to represent '/' charactors in the service name. That will avoid most of the logics I've added to properly handle this. I can resend a pathc using '-' if we can agree on that. > > > > > That is how I've done it. The only limitaion is in the scenario in > > which we have two services 'foo' and 'foo/Echo'. In that case, > > priority is given to 'foo' service. But I think it is not common to > > have a service name equal to a folder name. > I think if the service is "version" then it will have directory called > "/services/version". Yes if the servnce name is version and we have services/version.aar and something like services/version/1.0.0/version.aar, it will cause a problem. But that is a limitation with which the user have to live with, if he wants to use hierarchical services. Otherwise he can use the way we have right now. Thanks, ~Isuru -- Senior Software Engineer, WSO2 Inc. http://wso2.org/ Blog : http://isurues.wordpress.com/