accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikewalch <...@git.apache.org>
Subject [GitHub] accumulo pull request #194: ACCUMULO-3005 Added REST API calls
Date Fri, 23 Dec 2016 17:22:22 GMT
Github user mikewalch commented on a diff in the pull request:

    https://github.com/apache/accumulo/pull/194#discussion_r93785751
  
    --- Diff: assemble/src/main/assemblies/component.xml ---
    @@ -40,15 +40,48 @@
             <include>org.apache.commons:commons-math3</include>
             <include>org.apache.commons:commons-vfs2</include>
             <include>org.apache.thrift:libthrift</include>
    +        <include>org.eclipse.jetty:jetty-continuation</include>
             <include>org.eclipse.jetty:jetty-http</include>
             <include>org.eclipse.jetty:jetty-io</include>
             <include>org.eclipse.jetty:jetty-security</include>
             <include>org.eclipse.jetty:jetty-server</include>
    +        <!-- jetty-servlet only needed by old monitor -->
             <include>org.eclipse.jetty:jetty-servlet</include>
             <include>org.eclipse.jetty:jetty-util</include>
             <include>org.apache.htrace:htrace-core</include>
             <include>org.slf4j:slf4j-api</include>
             <include>org.slf4j:slf4j-log4j12</include>
    +        <!-- Jersey/Jackson-based webservice -->
    --- End diff --
    
    Jersey brings in a lot of dependencies that will have to be distributed with Accumulo.
 While I think Jersey is great for unreleased software, I think the [Spark microframework](http://sparkjava.com/)
would be a better fit for the Accumulo monitor.  Spark only relies on Jetty (which is already
a dependency).  You could generate JSON using GSON (which is also already a dependency). Spark
also has a freemarker template engine.  If you use Spark, new dependencies should only be
limited to the following:
    
    ```
    <include>com.sparkjava:spark-core</include>
    <include>com.sparkjava:spark-template-freemarker</include>
    <include>org.freemarker:freemarker</include>
    ```
    If you are interested in using Spark, I can send you some code examples.  With Spark,
you might need to have separate REST & HTML routes but you can keep your code simple by
wrapping your business logic in methods.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message