>> The other thing you can do is externalize the lucene index, possibly
>> via solr, which is a web-service shell that uses lucene to manage
[quoted text clipped - 5 lines]
>
> Arne
Actually, a flow like this looks pretty reasonable to me.
User Request Servlet Controller Data Access Web Service
--+-----(http)----->| | | |
| |-(Method)->| | |
| | |---(Method)-->| |
| | | |-----(http)->|
| | | |<------------|
| | |<-------------| |
| | |--(jsp)->View | |
<---------------------------------------------/ | |
It's called multi layered architecture, and the underlying protocols
(http vs method, etc...) are irrelevant, or at the very most minor
implementation details.

Signature
Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>
joehust@gmail.com - 12 May 2008 11:36 GMT
On May 12, 2:31 pm, Daniel Pitts
<newsgroup.spamfil...@virtualinfinity.net> wrote:
> >> The other thing you can do is externalize the lucene index, possibly
> >> via solr, which is a web-service shell that uses lucene to manage
[quoted text clipped - 24 lines]
> --
> Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>
Yes, this picture is very clear. Framework like Spring and Struts do
their jobs in this way.
My problem is really very simple, I just want to find a place to
initialize my app before any
jsp page is requested. It is not a big bussiness project, and I just
use pure jsp.
I found my solution by using setting the web.xml.
I write a Servlet and set it load-on-startup, which tells the server
to run it when the app starts,
and I can then do my jobs there. It works well. And Spring also works
in this way.
Thanks again.
Joe
Arne Vajhøj - 12 May 2008 23:26 GMT
>>> The other thing you can do is externalize the lucene index, possibly
>>> via solr, which is a web-service shell that uses lucene to manage
[quoted text clipped - 3 lines]
>>
>> looks like a classic anti-pattern ...
> Actually, a flow like this looks pretty reasonable to me.
>
[quoted text clipped - 11 lines]
> (http vs method, etc...) are irrelevant, or at the very most minor
> implementation details.
I do not have a problem with the multi-layered design for this.
I have a problem with the multi-tiered design for this.
Using HTTP instead of in-JVM calls or even a binary protocol has
a huge impact on performance.
And it is a classic anti-pattern.
If you happen to own or have access to Fowler "Patterns of
Enterprise Application Architecture", then check chapter 7.
Arne
Arne Vajhøj - 12 May 2008 23:37 GMT
>>>> The other thing you can do is externalize the lucene index, possibly
>>>> via solr, which is a web-service shell that uses lucene to manage
[quoted text clipped - 31 lines]
> If you happen to own or have access to Fowler "Patterns of
> Enterprise Application Architecture", then check chapter 7.
An somewhat related: it is a key point in good SOA to expose
the business logic layer as a service and not the data access
layer.
Arne