New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
If you had to build a linux console server application, what language would you use?
Hi everyone, thanks for all your continued answers and suggestions on the questions I ask here on LET. As the title says, what would you be comfortable using and why? Also, what would you be comfortable running on your vps or dedicated server. I can build software using java but I'm not quite sure if people hate the idea of running java on their linux servers - curious to know what you guys think. What's your take if you don't mind me asking?
Thanks!
Comments
Depends on what it does, different languages are better suited to different types of applications. Seems like a silly question. Java is often problematic on low end servers due to high memory footprint.
100% not Java!
Go seems interesting recently. Then there is also Python. Or go old school and use C/C++ like many of the Linux applications are made of. Although it depends on what exactly you want to do.
As @perennate said Java is way out of LEB range and it's just shitty anyway.
@perennate not sure why it's a silly question... that's the only issue I've come across using java... high memory which can be limited (obviously not on a 128 VPS though but the intended application would be running on 512MB or higher which still covers some of the LET community)
@Hidden_Refuge The only thing I don't like about it is the memory fingerprint... other than that, its been an awesome language when it comes to object oriented code, portability and threading. If you have any other reasons its "shi**ty", please let me know.
@risharde it's a silly question because it depends on the type of application, as I said, different languages are suited for different types of applications (and a "console server application" not a specific enough type).
Something where security is the top priority? Java would be a lot better than C/C++/Python (buffer overflow, dynamic typing) although holes in the JVM might be an issue, Go/Rust are options too but probably too new.
A minimal DNS server? Not Java.
A configuration tool (to help set up configuration for some other application based on small set of options)? Python could work.
java is like a big hammer.
for a console server app i would use a mix of python,nodejs,c,cgi-bin.
+1 for perl or python
I'd prefer python or node
I read "console application" as something you run in the shell.
nodejs for that? No.
I'd pick python or perl. If you need more performance or something they don't offer, then you're into C or C++. If you're a rubyhead, then sure use ruby but I don't see a lot of value in learning ruby at this point as it seems to have died in the market after RoR petered out, though opinions would vary.
You could (ab)use php for this purpose but don't.
Go would be the fancybeard double-bamboo-latte trendy choice. I would avoid these lesser-traveled byways (along with Erlang, Clojure, Haskell, etc.) because you'll have less community to work with, have a hard time finding partners, and the library of packages/libraries/extensions/etc. is not as rich.
Java is fine, except that it's memory-hungry, though this is only really an issue at the extreme low end (the 128MB VM). I run crashplan on Linux and it's Java, but that's all hidden from me and I only know it's Java because of what I see in the process table. If I was going to run a Java app I sure as hell wouldn't want to type "java -jar " at the command line...please wrap it.
Java is not shitty. It's overly verbose and if we could start over we would, but it's certainly serviceable. If you know it, why not?
Well, I feel like Java is like Flash. Many problems and security issues with a big footprint. Although I'd say it's not as loud around Java as it used to be times ago now. I had to learn Java so I know it and can program with it. It probably improved. I don't know. I've kept my fingers way from it since years (aside form having to learn it and program on a dedicated machine I made for that purposes).
My arguments might be invalid by now if Java did indeed improve but the footprint thing will probably never change. And depending on what you do watch out for CPU and IO hammering (ehmm Minecraft XD).
Not quite sure what you mean by "linux console server application". In my experience, Java runs pretty well in linux, is very fast, and it may not take as much ram as one might think (make sure you limit the heap size on app start). Java can be used to build pretty much anything (and works quite well in many instances). One area in which Java is not that great is in interacting with the shell (for a number of reasons). If you do not like the java language, you can use the JVM with serverside javascript (Rhino/Nashorn), Groovy (great language) Ruby or Scala... lots of options and great dev tools.
Personally, on my lowend boxes I run java Tomcat with server-side Javascript (Rhino), and an embedded H2 database. Within a single JVM you get the webserver, database, object caching, etc.
@risharde can you provide more info on what the app would do?
I'd differentiate Java as a desktop/browser environment vs. Java as a server environment. The former is ridiculous and should never be used because of the security issues. The latter is ubiquitously used in big environments without issue.
If memory is a problem there are a number of different jvm parameters that can help: heapsize, permgen size, stack size (for each thread), etc, etc.
C#
C# on linux? Seriously?
I am using ruby for simpler tasks and C++ for the more advanced ones. nodejs for interacting with the web.
I would use python but im still learning it.
i will use english xD
It's really depending on what language you feel comfortable with. Also you have to talk a bit more about what your app is doing.
Exactly my thought
I figured out a way to not use the console application. It was really to do a server monitoring system which keeps a centralized page showing all owned servers. Nevertheless, the information was useful and I think I might need it to implement another system which will allow one master controller to do basic tasks to multiple servers simultaneously. I'll let you guys know further after I actually start building it. For the mean time, some simple http posts were enough to get the monitoring system done though it would have been nicer to do something more real time with a console app - just expensive on ram usage and perhaps cpu usage.