8 ms·
Vert.x native: how to run a JVM app in 10Mb of RAM
- th3iedkid 8y agoWas trying to seek akka support(for native-image), but looks it has sadly been left behind https://discuss.lightbend.com/t/akka-and-graal-s-native-image-tool/940 https://discuss.lightbend.com/t/akka-and-graal-s-native-imag...
- spockz 8y agoThat seems more like the work just hasn’t been done yet, not that is has explicitly been left behind as your phrasing suggests. In fact, multiple requests to file issues/bugs have been made in that thread.
- Fnoord 8y agoBitcoin as example. Ugh. Anyone got a more interesting use case? Using Unifi Controller in Docker right now, uses 300 MB for Java (OpenJDK 1.8 x86-64) and 63 MB for Mongo DB. Haven't compared with UNMS though which needs to run in an Ubuntu 16.04 VM.
- johnbellone 8y agoI sold my UniFi gear because I shouldn’t have to install software on a server or buy an accessory to get the full features of my device. Their gear is great, but there are several lines that can’t be managed from the same control plane. It was infuriating.
- old-gregg 8y ago> It was infuriating. What part? The Unifi controller software is not for "a device", it's for multiple devices, imagine having to manage SSIDs / auth for primary+guest Wifi network across just 5 access points. I don't think anyone would enjoy logging into 5 separate AP UIs. Add your Unifi gateway + switches to that and the need to have a unified control plane is pretty obvious. If you want self-contained, that's a separate product line, usually prefixed with "Edge". What's "infuriating" about having two product lines I don't understand. Honda makes motorcycles, boat engines, cars and jets and nobody gets pissed about it.
- blattimwind 8y agoGP is saying the exact opposite of what you think he's saying > there are several lines that can’t be managed from the same control plane.
- voltagex_ 8y agoIt's more infuriating when you realise that there's no consistency between devices. The Security Gateway is an ancient MIPS thing that can only barely keep up with 100 megabit WAN even with hardware offload, the Cloud Key is a Mediatek dongle that makes remote management slightly less painful (although Power over Ethernet is nice) and the AC access points are some Qualcomm SoC that's sure to be abandoned as soon as the next shiny thing comes along. Oh, and that $400 AP is slower than the Turris Omnia that it was replacing - and that was doing 4x gigabit switching at the same time.
- mmastrac 8y agoYeah - it's pretty heavyweight. I run my Unifi controller on a spare Raspberry Pi that's been kicking around. There are plenty of pre-packaged versions of that tool as well. Would love to see them reduce the overhead of the controller, but to be honest, traditional IT managers will probably just spring for the $100 cloud key and be done with it.
- derefr 8y agoCheaply embedding a Datomic (=Clojure=JVM) transactor into a C process or other dynamic runtime to get shared-memory IPC to your non-JVM business logic?
- parabx 8y agoI guess as he mentioned on the blog it was a POC, if you just ignored the fact it's using the bitcoin api to track transactions it implements DB access, interaction with the event bus, websockets. I fail to see why it's not interesting.
- Fnoord 8y agoI'm asking for other (IMO more interesting) POCs, and I do find in interesting.
- old-gregg 8y agoI haven't been following Java community in a while, can someone clarify this for me please: so the benefit of "thin" JVM comes from GraalVM or Vert.x? I looked at https://vertx.io/ https://vertx.io/ and it says nothing to me, I have no idea what a "reactive" application is. Is it an async event loop library? And then there's Polyglot, so now there are 3 new things in the picture. What do I need to have a simple "hello world" CLI Java app which starts within 25ms and doesn't eat more than 10MB of RAM? Is GrallVM enough?
- deleted 8y ago[deleted]
- yunyu 8y agoVert.x is a framework for developing server applications using an event loop (think Node.js but for the JVM, with the ability to fallback to normal threads). If you've heard of Spring Boot or Spark, it's a lighter/faster alternative to those (which are generally based off of heavier webservers like Tomcat or Jetty). Graal compiles JVM bytecode to native code, so that's the critical factor for your CLI app use case. You'd only need Vert.x if you were writing a server.
- dominotw 8y ago> Spark I thought u were talking about big data spark. But I think you are talking about http://sparkjava.com/ http://sparkjava.com/
- needusername 8y ago> Spring Boot Vert.x is nothing like Spring Boot. Spring Boot combines Spring with autoconfiguration and the ability to run in its own container. Spring Boot can run on Undertow which the other branch of JBoss marketing promotes a lighter weight than Netty.
- Areading314 8y agoBut they're both frameworks for writing a server right?
- std_throwaway 8y agoMinor typo in the title: "10Mb" would be 10 Megabits. They really mean "10 MB" as in 10 Megabytes.
- sadamznintern 8y agoIts pretty clear from context what it means
- jacoblambda 8y agoIt is fairly clear however it is a small nitpick that has some significant consequences when it comes up as one is an 8th the size of the other.
- std_throwaway 8y agoMegabits is often used in the context of RAM.
- icedchai 8y agoAt the hardware (RAM chip) level, yes. At the software level, basically never.
- partycoder 8y agoMegabytes (1000^2, MB) or mebibytes (1024^2, MiB)?
- std_throwaway 8y agoThey used MB and not MiB on the homepage.
- beders 8y agoVert.x is pretty sweet. It's basically like Node.js but automagically multi-threaded and will also play nicely with fibers. Performance is usually way better than any Spring-driven app.
- deleted 8y ago[deleted]
- ataturk 8y agoI don't understand why he's copying all the sources, pom.xml, and running the build inside the Docker container? Can someone explain that part, please? The author's command of English may be an issue...
- zmmmmm 8y agoHave recently been trying out Micronaut [1] which is a similar idea. However Micronaut does not use Graal and manages a very similar memory footprint [2]. So I don't think you necessarily need Graal to achieve just that. I have actually been surprisingly happy with my initial experience with Micronaut. It is clearly engineered as a next-generation framework where all the defaults are set to exactly what you want to build small microservices right from the start. I am using Groovy and it still starts up in ~ 1 second with minimal memory use. [1] http://micronaut.io/ http://micronaut.io/ [2] https://jaxenter.com/micronaut-framework-microservices-142457.html https://jaxenter.com/micronaut-framework-microservices-14245...
- needusername 8y agoIt looks as if Micronaut is using compile time class generation through annotation processors. This explains a lot as this probably removes a lot of not all of their reflection at startup and runtime. This seems to be the right way to do things in Java to me since I learned about Dagger https://github.com/google/dagger https://github.com/google/dagger
- joemccall86 8y agoThey are also working on graalvm compatibility, as of late July.