cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ralph Goers <Ralph.Go...@dslextreme.com>
Subject Re: [jira] Created: (COCOON-2154) Servlet:/ protocol: Support absolute URIs
Date Fri, 28 Dec 2007 07:45:13 GMT
Thanks for the explanation, except I'm still not clear what a 
"connection name" is. See below for my 2 cents.

Grzegorz Kossakowski wrote:
> The only problem is that we have no way to check if given URI contains connection name
or servlet
> ID. Therefore the idea to add special sign that would remove the ambiguousness appeared.
Current
> proposal are:
> a) add a plus sign after servlet ID (by Reinhard)
> b) add a exclamation mark at the very beginning of the path (by Vadim)
>
> My personal preference is a plus sign but as Reinhard already pointed out it does not
matter that
> much because we usually won't be using absolute URIs directly.
>   
Yuck, yuck, yuck.  (If you get the impression I don't like a or b you 
are on track).

c) Use a different scheme to identify one vs the other.
d) Use a different pattern. i.e "conventional" urls look like 
http://authority/path where authority can be a variety of things such as 
"server[:port]", "user@server[:port]" and server can be a domain name or 
an ip address. In this case, you could do something like 
servlet://connection@local/path which, if I understood you correctly. 
could be abbreviated to servlet://connection/path. For servlet id you 
could use the same syntax with servlet://connection@servlet_id/path. Of 
course, since I don't really know what a connection is I have no idea if 
this makes sense, but it could certainly be abbreviated to 
servlet://@servlet_id/path.  Or use servlet://[connection][:id]/path, 
although servlet://:Servlet_C/path still looks a little odd.

+ and : characters in uri's just plain look strange, even if they are 
allowed, unless they are used in a similar fashion to existing schemes. 
Also, not having the // in the uri makes one wonder just what the token 
before the first slash is. Everybody knows that whatever follows the 
double slashes is not part of the path so it is less confusing.
>                                                  -- o0o --
>
> Now it's the time to give some description of static connection list problem. Currently
one can
> define list of connection of a given servlet statically in XML config. If you compile
a block there
> is no chance to add new connections to other servlets. Now, imagine situation that you
have some
> application making charts and you create separate block (and servlet) for each datasource
provider.
> For example, you create block that extracts some data from database and second one that
extracts
> some data from mailbox. If you want to pull this data, you need to connect to these two
blocks of
> course so you add them to your local connection list.
> Now you can compile your application and everything will be working fine. But what if
you want to
> define another datasource for your charts, for example data from some web service? Of
course you
> develop a new block that downloads and transforms interesting data but you need a way
to inform your
> appliction that there is a third block. The most obvious way is to add connection to
the third block
> but this involves recompilation of your application!
>
> The solution that I and Reinhard (and probably others) have in mind is to let servlet
use absolute
> URIs so you don't need to define connections statically to other block. There would be
also some
> discovery mechanism of available blocks, probably a generator, that would return you
a list of
> blocks fulfilling particular needs. The list would contain servlet ID of each servlet
(block) so you
> could reference them later on.
>
> I hope this helps you a little bit.
>   
I still don't quite get this connection thing.

What I don't get is why this can't just be servlet://service@block/path? 
Or better yet, why shouldn't my application just reference a bean id and 
wire it to the block service in its Spring configuration (think Spring 
remoting)?

Please reply, even though I'll be on a plane in a few hours. I'm sure 
I'll find time to look at email while I'm out of town.

Ralph

Mime
View raw message