4 ms·
Java - "run anywhere" (supposedly) Docker - "The Linux Container Engine" Think you've got your answer there.
by philbarr 12y ago
Java - "run anywhere" (supposedly)
Docker - "The Linux Container Engine"
Think you've got your answer there.
- curun1r 12y agoDocker is an option if you're deploying on Linux, which is what the majority of server deployments use these days. Chef works on the rest of the Unixes, including OS X. If you're deploying Java on a Windows server, you're doing it wrong. And the days of needing to use different development and production OSs are over...if you develop in Windows and deploy on some Unix variant, you should be using a VM. I'm still not buying ClassLoader contortions as being in any way justified to support the single deployable artifact requirement. It's just not necessary and can lead to many subtle and hard-to-track-down issues as well as introducing unnecessary performance overhead.
- philbarr 12y ago> If you're deploying Java on a Windows server, you're doing it wrong. You're assuming you have control over what the customer's servers are.
- pron 12y agoCapsule has exactly 0 class-loader contortions (that's why I'm not too keen on One-Jar)
- curun1r 12y agoClassLoader contortions are one of the cleaner ways to handle the problem, but they're not the only way. You could: - Create a fat jar, which necessitates bytecode transformations to prevent namespace collisions if you don't want to be sloppy. JarJar did this kinda of thing many years ago, but it seems hard to trust a process like that. - Create what is essentially a self-extracting archive. This looks like the path Capsule took. This introduces unnecessary state and increases startup time. This is what servlet containers do, so reinventing that wheel seems like a particularly foolish decision. Not to mention that it appears that Capsule adds the additional step of pulling in all dependencies from an external server...slow deployment and an additional point of failure! I still believe that some sort of VM image or container makes the most sense. Short of that, any system that supports sshd can be configured with Chef. The "solutions" I see coming out of the Java camp all seem like hacks by comparison.
- pron 12y agoThe next release will include the option to resolve (potentially download) all dependencies without launching the app, if someone finds that useful. If dependencies are resolved, or are embedded, startup time is increased by 100ms or so.
- curun1r 12y agoIt still feels like a pre-automation mindset...this is a step that should happen during CI, not application startup or even deployment. The delay is going to be a lot more than 100ms if you use something like this when scaling elastically. In that situation, you need to go from automatically provisioned to running and accepting load in as short a timeframe as possible. Fully-baked machine images or Docker containers work for this use case, your solution doesn't. Also, making your Maven repository a dependency of your production environment just seems like a bad idea. It creates an additional attack vector from a security standpoint and an additional component that can fail from a reliability standpoint.
- diroussel 12y agoCopying a file takes the same time, regardless of it's capsule of chef that is copying the file. Once capsule has cached the file, you can cut a VM image, and no copying will occur later. > making your Maven repository a dependency of your production environment It becomes a dependency of your deployment process, which probably already depends on a maven repo. And a maven repo can be just a NAS drive, which is often reliable enough for use in production.
- mindcrime 12y agoDocker is an option if you're deploying on Linux, which is what the majority of server deployments use these days. Chef works on the rest of the Unixes, including OS X. If you're deploying Java on a Windows server, you're doing it wrong. What about OS/400, OS/390, MVS, etc? Believe it or not, the world is a lot bigger than *NIX and Windows. Go track down a mid-sized manufacturing company in the midwest or the southeast, for example, and I'd almost bet you money they have apps running on an AS/400 (iSeries), or an S/38 or S/36 or something, if not a mainframe.
- Crito 12y ago> Java - "run anywhere" (supposedly) Sure, it's a nice benefit, but is it actually used? In 2014, how many of us are doing backend/service development in java and not deploying to Linux machines? There are certainly still backend/service java shops out there that aren't deploying to linux machines, but I wager that most are. Regardless of those numbers though, why do the linux shops actually care about being able to deploy to non-linux machines if they never do in practice? Python can run just about anywhere these days, but python shops that deploy exclusively on Linux don't care about maintaining deployment compatibility with systems that they don't actually use.
- astine 12y agoIn 2014, how many of us are doing backend/service development in java and not deploying to Linux machines? Among silicon valley webstartups? Not many. But there still are a lot of Windows based installs large megacorps and small offices all over. For a lot of them, switching away is not an option so you might want to support them.
- Crito 12y agoAmong silicon valley webstartups, I would be surprised to hear much about java service/backend work at all. My experience is primarily with the megacorps. If you are developing backend/service shit for other companies to use, then that is one thing, but I am thinking about in-house development. Most megacorps aren't software vendors; if they are developing software it is for themselves. Regardless though, some megacorps deploying to windows doesn't explain the practices of java shops that don't deploy to windows. It seems like portability just for the sake of portability, without any real purpose but with real added hassle.
- Xorlev 12y agoYou would be? Because its daily I hear about services written on the JVM.
- pjmlp 12y agoGNU/Linux != UNIX, and there are still lots of it on the enterprise. At the enterprise it is also common to develop on Windows and deploy across Windows and UNIX systems. Finally, there are quite a few banks, finance and insurance institutions running Java on mainframes.