lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lance Norskog (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-3044) Incrementally deprecate NamedList & replace with typesafe API
Date Sat, 09 Jun 2012 06:08:22 GMT

    [ https://issues.apache.org/jira/browse/SOLR-3044?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13292201#comment-13292201
] 

Lance Norskog commented on SOLR-3044:
-------------------------------------

LISP is indeed very very old. NamedList is LISP with keys for the nodes.
                
> Incrementally deprecate NamedList & replace with typesafe API
> -------------------------------------------------------------
>
>                 Key: SOLR-3044
>                 URL: https://issues.apache.org/jira/browse/SOLR-3044
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 3.6, 4.0
>            Reporter: Simon Willnauer
>            Priority: Critical
>
> The first thing I can think of when I see how and where NamedList is used in solr is
"if you have a hammer in your hands, every problem looks like a nail". IMO and I know others
think the same way the use of NamedList is way over the top for a long time. However the biggest
issues here is the massive use of this class all over the place which has several problem,
here is a list just to name a some:
> * no type safety
> * produces lots of garbage
> * makes things hard to refactor
> * binds everything strongly to Solr and is contra modularization 
> * code is hardly readable - one example is all the distributed request / response processing
> * requires autoboxing of primitives all over the place
> * some processing is N^2 where N is possible 
> * requires tons of instanceof conditions
> * ...
> Yet this task is not simple nor is it possible to do this in a single patch. I think
the target of this issue and all its subtasks will be 5.0 but we need to start doing it to
eventually clean up the API enough to get rid of all the issues I named above.
> One way of starting would be to create a couple of subtasks like:
> * Refactor ResponseWriters to pass in a StreamWriter similar to what XML or JSON apis
(Jackson / STAX) and let the ResponseObject write itself based on the StreamWriter impl.
> * Refactor configuration and resourceloading to use some libraries that are specialized
to do that.
> * Deprecate SearchComponent methods that accept named list in favor of a typesafe API
> I think we should start doing this its time to move on here!

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message