NightOwl888 opened a new issue, #747:
URL: https://github.com/apache/lucenenet/issues/747

   When `Lucene.Net.Replicator` was ported in #209, we were considering options 
on how to integrate it into various .NET technologies so it would work across 
both .NET Framework and .NET Core. Unfortunately, unlike Java,  .NET has no 
such thing as a "Servlet" that is a piece that can be plugged into any network 
technology, so this was a bit of a struggle.
   
   Since that time 
   
   1. ASP.NET Core has become much more mainstream
   2. The `Lucene.Net.Tests.Replicator` tests have been debugged and 
`Lucene.Net.Replicator` is now deemed more stable
   3. A new approach was explored into how to use [Replicator as middleware in 
.NET 
5+](https://github.com/apache/lucenenet/commit/65ab43cdf57e00024b96244c04656edf1fe3ccc6)
   
   Back then, we also [opted not to release 
`Lucene.Net.Replicator.AspNetCore`](https://github.com/apache/lucenenet/pull/209#issuecomment-323868570),
 but leave it as more of a demo until we had a chance to fully explore and 
document how to configure it.
   
   ## Tasks to Complete
   
   - [ ] Allow both HTTP and HTTPS to be configured as a protocol (I noticed 
the scan picked up that we have it hard-coded to HTTP in some places).
   - [ ] Build extension methods to extend 
`Microsoft.Extensions.DependencyInjection.Abstractions` to configure 
`Lucene.Net.Replicator` for use in any AspNetCore app (middleware where it is 
allowed) - [example extension 
method](https://github.com/apache/lucenenet/blob/dfae964ce0a1b066fd808275fd81d90385cde3fe/src/Lucene.Net.Tests.Replicator/Http/ReplicationServlet.cs#L100-L112)
 - [example 
configuration](https://github.com/apache/lucenenet/blob/dfae964ce0a1b066fd808275fd81d90385cde3fe/src/Lucene.Net.Tests.Replicator/ReplicatorTestCase.cs#L38-L103).
   - [ ] Add documentation on how to use the new extension methods to configure 
the replication server.
   - [ ] Install `Lucene.Net.Replicator.AspNetCore` and set it up for use in a 
demo project and look for any usability issues to address.
   - [ ] Add tests for `Lucene.Net.Replicator.AspNetCore` (note that it is used 
by `Lucene.Net.Tests.Replicator` to test functionality, we just want some basic 
tests to ensure the extension methods function)
   - [ ] Enable `Lucene.Net.Replicator.AspNetCore` to be packed to NuGet.
   
   To build the extension methods, we should be analyzing the source of other 
various AspNetCore services and closely following the design patterns used by 
Microsoft. These methods follow a builder pattern where they can be chained 
together as fluent configuration methods.
   
   Note that we use a different configuration setup prior to .NET 5 where 
routing configuration was changed to map routes to middleware, so we may need 
to have different extension methods depending on which target framework the 
user has installed. We may need to consider targeting net5.0 directly and/or 
adding another project `Lucene.Net.Replicator.AspNetCore.Extensions` to make 
the net5.0+ requirement work right for setting up middleware.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@lucenenet.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to