lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shad Storhaug (JIRA)" <>
Subject [jira] [Commented] (LUCENENET-565) Port Lucene.Net.Replicator
Date Tue, 20 Jun 2017 18:02:00 GMT


Shad Storhaug commented on LUCENENET-565:

Thanks. Looks pretty good. 

We're missing 11 tests out of 30, as well as some other features not yet implemented, but
at least the 19 tests that are ported are passing.

I am no expert on which hosting technology to port this to, but after a bit of research, it
seems that the option that would work the best and is most portable to .NET Core is to use
an OWIN self-hosted Web API 2 as the "servlet":

See this for more of a comparison of web technologies in .NET Framework:

I guess another option would be to make it an HTTP Handler (or module), which corresponds
to a .NET Core middleware:
As far as I can tell, that would require a bit of web.config configuration, but an OWIN self-host
could have all of this configuration added as code or injected, which is preferable. Not to
mention, I believe the OWIN self-host could also run as a Windows Service or Console Application,
without the need for a web server.

Let me know if you concur or if you think it could be better. We are certainly open to suggestions.

Ideally, we could provide this as both a DLL via NuGet package that could be dropped into
a web application AND an alternative Windows Service to make deployment a breeze. Any setup
steps that are required and other instructions (such as how to make a Console Application
to host it) should have documentation. For now, please provide the documentation as a Markdown
document in the project's folder.

A few issues:

1. RevisionFile.Size - Please change to `Length` to .NETify
2. IReplicator & IRevision: Please leave the "I" prefix in the actual name of the interfaces,
but change the names of the files back to the original "Replicator" and "Revision". It is
easier to maintain if the files are in the same order as they are in Java.
3. Please change IReadOnlyCollection, IReadOnlyDictionary, etc to ICollection, IDictionary,
4. Please rename (the class only, not the file) IndexInputInputStream to IndexInputStream
(since in .NET InputStream is just a Stream).
5. Please add the project.json and PROJECTNAME.project.json files to the projects (we use
these for NuGet dependencies as well as for specifying NuGet package info). See the other
projects for examples.
6. Please arrange the code so it is in a similar order as it was in Java. In cases where you
need to order it differently (such as de-nesting types), add a "LUCENENET specific" comment
to indicate it diverges from Java.
7. Please ensure it will compile and tests will pass on .NET Core (we use the Lucene.Net.Portable.sln
file to do these tests).

Do note that using BinaryFormatter is not supported in .NET Standard 1.5. In similar cases,
we ended up converting to JSON instead.

When completed, please submit a pull request for review. If there is anything else you wish
to discuss or need help with, let us know.

> Port Lucene.Net.Replicator
> --------------------------
>                 Key: LUCENENET-565
>                 URL:
>             Project: Lucene.Net
>          Issue Type: Task
>          Components: Lucene.Net.Replicator
>    Affects Versions: Lucene.Net 4.8.0
>            Reporter: Shad Storhaug
>            Priority: Minor
>              Labels: features

This message was sent by Atlassian JIRA

View raw message