Hacker News new | past | comments | ask | show | jobs | submit login

And to go even lighter I use pippo(https://github.com/decebals/pippo). I like the modular way that allows me to tailor my apps to be <1MB final size. Really helps with lightning fast deployments on my many DigitalOcean smallest 512MB instances.It also works great on raspberry pies - I was using nodejs webapps until pippo because they were lighter on resources(I rather hate js and nodejs and hence the praise for pippo) . I also pair it with jooq for db access when needed.



Pippo looks pretty sweet. How does it compare to Spark?


I'm trying pippo for the last couple of weeks, its quite lightweight and really fast. I could customize it for whenever the need arises, better than sparkjava. For eg: I couldn't customize the Jetty server params with sparkjava, I could with pippo.


I don't know many things about Spark, so I can't make a full comparison. I will try bellow to enumerate some advantages of Pippo:

- modular [1] (spark uses a giant static singleton architecture)

- support (via modules) for many Template Engines [2] (Freemarker, Jade, Groovy, Trimou, Pebble)

- support (via modules) for many Servers [3] (Jetty, Undertow, TJWS); spark depends on Jetty

- directly serving of static resources [4], support for WebJar

- content type negotiation

- custom session [5] (support for cookie based implementation)

- support (via modules) for many ContentTypeEngines [6] (Plain text, Json - Gson/Fastjson, Xml - Jaxb/Xstream, Yaml - SnakeYaml)

- i18n [7] (in java or directly in template)

- support (via modules) for many IoC [8] (Guice, Spring)

- support metrics [9] (via modules - Ganglia, Graphite, InfluxDB, Librato)

- custom (template) error pages

- regex routes

Unfortunately the actual documentation of Pippo it's a little bit behind of the implementation (from documentation are missing some nice concepts: named routes, finally filters, custom route context, ...) and from this reason I cannot give you more useful links but I will fix this aspect asap.

Another difference in Pippo to other (micro) java web framework (spark, ninja) is that a RouteHandler it's a real endpoint (the handle method return void). You can finalize/commit the response using send, render, redirect. Everything is transparent.

[1] http://www.pippo.ro/doc/modularity.html

[2] http://www.pippo.ro/doc/templates.html

[3] http://www.pippo.ro/doc/server.html

[4] http://www.pippo.ro/doc/static-files.html

[5] http://www.pippo.ro/doc/session.html

[6] http://www.pippo.ro/doc/content-types.html

[7] http://www.pippo.ro/doc/internationalization.html

[8] http://www.pippo.ro/mod/spring.html

[9] http://www.pippo.ro/mod/metrics.html




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: