You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lucenenet.apache.org by Simone Chiaretta <si...@gmail.com> on 2010/07/07 10:51:52 UTC

Best "architecture" for Lucene.net

Sometimes ago when I was integrating Lucene.net in Subtext I've been told by
this ML that using Lucene directly inside a web application was not a good
idea because that way I was not in control of initialization and such
things. But unfortunately at that time I had to keep everything in one
application as it was supposed to run in medium trust in hosted environments

Now I've full control of my environment, but I cannot find that answer any
more: which is the best way to do it? Windows Service? WCF Service?
I was thinking of making a windows service that runs and index things, and
then a WCF service that my web app connects to do queries (or maybe directly
using lucene in the web app)

What do you think?
Simone

-- 
Simone Chiaretta
Microsoft MVP ASP.NET - ASPInsider
Blog: http://codeclimber.net.nz
RSS: http://feeds2.feedburner.com/codeclimber
twitter: @simonech

Any sufficiently advanced technology is indistinguishable from magic
"Life is short, play hard"

Re: Best "architecture" for Lucene.net

Posted by "xzxz@mail.ru" <xz...@mail.ru>.
  I do it in this way:

  - application that maintains index   (run under Windows  Scheduler. 
Actually, it can be easily converted to Windows Service)
  - WCF Service to search
  - ASP/ASP.NET or something else as front end to WCF service
---
Andrei

On 07.07.2010 12:51, Simone Chiaretta wrote:
> Sometimes ago when I was integrating Lucene.net in Subtext I've been told by
> this ML that using Lucene directly inside a web application was not a good
> idea because that way I was not in control of initialization and such
> things. But unfortunately at that time I had to keep everything in one
> application as it was supposed to run in medium trust in hosted environments
>
> Now I've full control of my environment, but I cannot find that answer any
> more: which is the best way to do it? Windows Service? WCF Service?
> I was thinking of making a windows service that runs and index things, and
> then a WCF service that my web app connects to do queries (or maybe directly
> using lucene in the web app)
>
> What do you think?
> Simone
>


Re: Best "architecture" for Lucene.net

Posted by Noel Lysaght <ly...@hotmail.com>.
Hi Simone,

That is the route we went down, especially when you consider things like 
load balancing and multiple web-servers. Also IIS can re-start application 
domains on a whim, without almost any notification so maintaining and 
coordinating index creation/updating in that environment for us was simply 
not a runner.

We have a number of windows services which can potentially update the index, 
but only one of them ever does it at a time.
We have web-services which  generate queries against the index and return 
the results to the clients (other web-app's and some rich clients also).

So I think you are on the right path, you loose some performance by not 
being able to access the Writers.GetReader method (because it's in another 
process) but overall I think the stability and control are worth it.

Hope this helps

Kind Regards
Noel

--------------------------------------------------
From: "Simone Chiaretta" <si...@gmail.com>
Sent: Wednesday, July 07, 2010 9:51 AM
To: "lucene-net-user" <lu...@lucene.apache.org>
Subject: Best "architecture" for Lucene.net

> Sometimes ago when I was integrating Lucene.net in Subtext I've been told 
> by
> this ML that using Lucene directly inside a web application was not a good
> idea because that way I was not in control of initialization and such
> things. But unfortunately at that time I had to keep everything in one
> application as it was supposed to run in medium trust in hosted 
> environments
>
> Now I've full control of my environment, but I cannot find that answer any
> more: which is the best way to do it? Windows Service? WCF Service?
> I was thinking of making a windows service that runs and index things, and
> then a WCF service that my web app connects to do queries (or maybe 
> directly
> using lucene in the web app)
>
> What do you think?
> Simone
>
> -- 
> Simone Chiaretta
> Microsoft MVP ASP.NET - ASPInsider
> Blog: http://codeclimber.net.nz
> RSS: http://feeds2.feedburner.com/codeclimber
> twitter: @simonech
>
> Any sufficiently advanced technology is indistinguishable from magic
> "Life is short, play hard"
>