r/java • • Mar 09 '20

Milkman (Postman alternative) now available as native image via graal

https://github.com/warmuuh/milkman/blob/feature/graal/milkman-dist-graal/readme.md
32 Upvotes

21 comments sorted by

4

u/TuckingFypeos Mar 09 '20

Major high school flashbacks with that logo. Weren't those the sheep that'd walk around your desktop and fall off your windows? Sheep.exe

1

u/warmuuh Mar 09 '20

YES!!! :D

3

u/rulatore Mar 09 '20 edited Mar 10 '20

Nice, I tried this one a while back, am curious about the native performance. Is it possible to generate a linux native ?

Edit: Holy shit, is graal supposed to take all resources on your pc ? Currently trying to build this on Linux and it took all my ram, hitting the swap for 1gb, I'm scared....

2

u/warmuuh Mar 10 '20

yes, it is supposed to :). it takes roughly 9 GB on github actions build

1

u/rulatore Mar 10 '20

Sorry for the potentially ignorant question, but arent they charging you for these builds? With how sensitive companies are with their VMs and pipelines, I'ld think one would get flagged running this build. On my laptop it took all the 16gb of ram, 1gb of swap (by the end of it) and took some good 10 minutes to finish it.

I was a bit sad when I tested, I kept getting some malformed url exception and said that I should build it again with some other flag.

Also, I want to give only one feedback, but one of the things that really keeps me from using this, is the body editor for json. It doesnt do much to help ident (that I know of). Also, I little bit padding between the submit button and the one beside it would help. With those round corners, they look a bit weird

1

u/warmuuh Mar 10 '20

thanks for the feedback, might pick this up.

github actions are free for public repositories and < x minutes, so free for me...

would love to now what exception you got though...

2

u/dpash Mar 10 '20

Didn't Graal only do Linux native images for a while? I thought their support for Windows and OSX was limited at one point, only to come later.

1

u/rulatore Mar 10 '20

Ah yes, I asked because I'm not that familiar with the technology and OP only tested with MacOS, I thought he might had run into some specific issues.

Having said that, it did build with no changes required, ultimately something wasnt working when making requests, but I didnt puch much effort into it.

1

u/warmuuh Mar 10 '20

never tested on linux. windows is now supported by graalvm, but not the javafx part. gluon guys need to catch up for this.

2

u/[deleted] Mar 09 '20

Have you considered bundling Eclipse OpenJ9 (instead of HotSpot or Liberica) for the Windows release? This is what I did with my JavaFX app, since OpenJ9 has a lower memory footprint (I reduced the RAM usage around 100mb in my app thanks to simply switching to OpenJ9 -- as displayed in the Windows Task Manager). And it supposedly has a better startup speed compared to HotSpot (see: -Xquickstart and -Xtune:virtualized).

You speak of startup time improvements, but I'm curious did the memory footprint go down with the Graal Native Image? (which in my opinion, is something of an achilles heel of JavaFX)

2

u/warmuuh Mar 09 '20

thanks for that tip, i'll definitely look into OpenJ9.

the memory footprint went down from 146MB to 125MB (using activityMonitor on MacOs)

2

u/sureshg Mar 09 '20

Does it work only with the latest macos version? Trying running it on 10.13.6 gave the following error.

dyld: lazy symbol binding failed: Symbol not found: _objc_alloc_init
    Referenced from: .../milkman-dist-graal (which was built for Mac OS X 10.15)
    Expected in: /usr/lib/libobjc.A.dylib

dyld: Symbol not found: _objc_alloc_init
   Referenced from: .../milkman-dist-graal (which was built for Mac OS X 10.15)
   Expected in: /usr/lib/libobjc.A.dylib

[1]    10176 abort     .../milkman-dist-graal

1

u/warmuuh Mar 10 '20

it does work with macos 10.14.6. but there might be issues with older macos versions...

1

u/jon_sand Mar 09 '20

Is it possible to force http 1.1 or http 2.0 for requests? This is one of the things I really miss in postman or any other request tool. As far as I know only curl request are an option.

2

u/warmuuh Mar 09 '20

You can disable http 2 which basically forces http1. There is no other option but I might add it, sounds useful...

3

u/sureshg Mar 09 '20

I am using Mac - 10.13.6. Getting the following error. Does it work only with the latest mac-os release?

dyld: lazy symbol binding failed: Symbol not found: _objc_alloc_init Referenced from: .../milkman-dist-graal (which was built for Mac OS X 10.15) Expected in: /usr/lib/libobjc.A.dylib

dyld: Symbol not found: _objc_alloc_init Referenced from: .../milkman-dist-graal (which was built for Mac OS X 10.15) Expected in: /usr/lib/libobjc.A.dylib

[1] 10176 abort .../milkman-dist-graal

2

u/pragmatick Mar 10 '20

I just want to thank you for including a small description of what the tool is in the title. It's a pet peave of mine when posts mention news about a software or library and only use the name, assuming that everybody already knows what that software or library is.

-9

u/beowulf13th Mar 09 '20

Why? Why didn't use IDEA HTTP request from the Scratch?

7

u/warmuuh Mar 09 '20

if it fits you well, go ahead and use that. i dont always use IDEA. i want to do sql queries and other things. (i know, idea can do this too). i typically have about 200 collections with ~10 requests each, so scratch requests are hard to organize imo...

5

u/TM254 Mar 09 '20

Lol, funny how some people assume everybody likes being vendor locked to intellij. Just cause someone codes java doesn't mean the use Intellij πŸ˜‚.

Oh man, its gonna be like them swift devs in macos and apple shit πŸ˜‚

0

u/[deleted] Mar 09 '20

[deleted]

3

u/TM254 Mar 09 '20

My point is not that you are getting locked to java but that you are getting locked to intellij as a product, and might soon buy it, or have to keep buying it over and over just to get a feature.

Kotlin already only works best in intellij, android dev? Intellij, whats next?

I am happy that IDEA didn't create any other programming language other than Kotlin otherwise guess what? That language would only be usable if you use IDEA products πŸ˜‚πŸ€”πŸ€”πŸ€”... Maybe that's why Kotlin trying to compile to just about every language in the world, so that we get vendor locked in the end to IDEAπŸ€”πŸ€”πŸ€£πŸ˜‚, and the hype train πŸ˜‚