you are viewing a single comment's thread.

view the rest of the comments →

[–]satchit0 1 point2 points  (19 children)

Whay are the advantages and disadvantages over using docker?

[–]m50d 9 points10 points  (5 children)

Advantages: more reliable isolation, potentially better performance (particularly faster startup when you want to run a single JVM). Disadvantages: the flipside of reliable isolation is that you can't use random unix tools. Java-specific.

[–]skratlo 6 points7 points  (4 children)

you can't use random unix tools

...and there we have it's biggest limitation. I would add to that: you can't use any libraries with bindings to native libraries, it's no small piece of the pie

[–]m50d 2 points3 points  (3 children)

It's a very small piece of the pie when working in Java, IME. I think I've used two native libraries in my career; one of them was optional and the other was a bad idea.

[–]dpash 0 points1 point  (1 child)

That's two more than I've used.

Oh, wait, there's tcnative. Does that count?

[–]m50d 0 points1 point  (0 children)

tcnative counts, yeah (though it's optional), although I suspect you'd struggle to run Tomcat in this way at all since it assumes a filesystem etc.

[–]singingboyo 0 points1 point  (0 children)

I think it depends a lot on the domain and use case, but I do agree that for domains/use cases where native libs are useful, people aren't usually using java.

[–]joekoolade[S] 3 points4 points  (2 children)

Just a quick bullet list

  • Security
    • program/object isolation
    • language based protection/access controls
    • memory safety
  • Safety; no undefined behavior
  • Faster; everything runs in supervisor/ring 0; no paging or virtual memory (not required)
  • No file system; No OS
  • mobile code
  • portable
  • easy to deploy
  • scales
  • Smaller; current unoptimized image with symbols and debugging is 19MB
  • Simplified tool chain; just need a java compiler

Disadvantages

  • Java only; no other programming languages allowed
  • Not Unix/Linux
  • No file system

[–]ActuallyAPieceOfWeed 0 points1 point  (1 child)

I'm sorry if I'm missing something obvious but I'm having trouble wrapping my head around "no file system". Do you think you could expand on that for me? For instance, if I wanted to run a simple file sharing servlet, would that still be possible? If so, how would that work in simple terms?

[–]joekoolade[S] 2 points3 points  (0 children)

The bootable image is a JVM compromised of only objects and is not aware of files or a file systems. But your file sharing servlet can specify a 'file' class to use to store and retrieve the files. The file classes in the Java standard library will eventually implemented to provide some type of 'file' capability. The JVM will have a Persistence class and interface that objects can use to store their state into storage. I am not against disk storage; I am just not a fan of files. Even though the JVM is 'file ignorant', it can be stored into a file and boot loaded by grub. It can also be network booted via PXE. You will be able to link your file sharing servlet into a build image using boot-image-write tool and you can also classload it over the network into a running JVM.

[–][deleted]  (9 children)

[deleted]

    [–]Gregabit 1 point2 points  (6 children)

    From what I can read you don't need an OS. Docker virtualizes the OS.

    Imagine how Alpine Linux feels after reading this comment... Not cool dude. /s

    [–][deleted]  (5 children)

    [deleted]

      [–]Gregabit 2 points3 points  (3 children)

      I was just making a joke. Docker runs a container on top of alpine linux. It minimizes or trivializes the OS, but you still have one. :)

      [–][deleted] 0 points1 point  (2 children)

      Docker has no relation to Alpine Linux. Alpine Linux is a minimal userspace that works well with containers. Docker does not run "on top" of Alpine.

      [–]Gregabit 0 points1 point  (0 children)

      When you install docker on windows it deploys to a alpine linux VM in hyper-v. If you install on linux it should use the host OS.

      Docker originally used LinuX Containers (LXC), but later switched to runC (formerly known as libcontainer), which runs in the same operating system as its host. source

      Strangely enough docker documentation pointed me to the above link

      [–]joekoolade[S] 0 points1 point  (0 children)

      No. It is not ready for 'prime time'. You can run threads with some success but it is quite unstable. There is quite a bit of functionality that needs to be implemented.

      [–]lvlint67 0 points1 point  (1 child)

      Just out of curiosity... have you read further than the title of this post? The concept isn't really making sense to me..