Anyone using Java?

software development

#1

Hello people

I’m very new to dreamhost. I’ve come from site5 because I have a high-data (but not high usage) site that wouldn’t really be possible there.

It was with pleasant surprise that I saw that java is installed on dreamhost machines. The docs are very clear that JSP an tomcat are not feasible, however. This makes me wonder about how happy they’d be about actually using java as part of a website.

Have people used java on dreamhost before? If I can use it as part of my site without getting complaints, that would be amazing. I had in mind a small java program to accept a user request, do a little data processing and then make a mysql call. Nothing massive.

Advice?

Cheers

Joe


#2

If the program isn’t running overboard you should be good.

It might pay to send a ticket to Support outlining your requirements (noting the low traffic) as they’d be in the best position to take a look at your current server stats and give an educated response.


#3

Joe, you should also take a look at Ruby on Rails. It’s fully supported here for the development and hosting of web applications.

What are [color=#CC0000]50DISK50[/color], [color=#CC0000]3DOM50[/color], and [color=#CC0000]1IP1DOM50[/color]?
They’re Dreamhost coupons!


#4

Thanks Lensman. I’ve done quite a lot with PHP and RoR in the past. I was thinking of using PHP for the www bit and call a java program to do the data processing. RoR wouldn’t really be appropriate: the site won’t be structurally complex, it’s a simple front-end to preprocessed data.

It’s just java’s so much better for things like dynamic data structures, fast loops etc. I thought it might have benefits over php for that bit.

I will send a mail to support and see what they say.

Joe


#5

I just kind of think of the overhead of starting up the jvm to be a bit much for small utilities. Have you considered a straight Ruby program?

Again, I don’t know the particular utility you have in mind and as you know it’s hard to make these recommendations without knowing the kinds of data structures, algorithms, and data access requirements you’re going to need. :slight_smile:

But you know all this. I just don’t think Java has that much over Ruby as a general purpose programming language. I mean, there are obviously some advantages to Java just as there are to C and C++, but I tend to think of Ruby as fine (and easy).

What are [color=#CC0000]50DISK50[/color], [color=#CC0000]3DOM50[/color], and [color=#CC0000]1IP1DOM50[/color]?
They’re Dreamhost coupons!


#6

It really comes from my unfamiliarity with PHP. I’ve written the function in java and re-implemented it in PHP as I didn’t expect to have java on the server. It was a pleasant surprise to find it!

The thing is, to a certain extent I know how java works. I can say how much memory my data structures will take up, roughly what time-complexity etc etc. I don’t know PHP well enough to be able to compare my two implementations. The fact is that one’s a programming language and one’s a scripting language and each have their strengths and weaknesses. I happen to believe that tight loops and recursion are slightly better in java.

I suppose the only answer is test it and see! I agree, starting and stopping a jvm every query is expensive. But perhaps so is PHP in its own way? I’ve also worked with Rails and found it to be great for all kinds of exciting things. But chewing arrays…

FIY support said this about executing a java program from php with exec():

" As long as it’s not persistent and it doesn’t eat up too much of the
server’s CPU/RAM then it’s cool. "

Thanks for your input!

Joe


#7

Yep! That is one of the things I like the most about DreamHost. They are “techies” at heart and generally will let you do most anything you want that is reasonable within the limits of shared hosting.

I really appreciate the wide range of technologies they make accessible to us on the shared servers for the price they charge. It makes it possible for me to learn, and experiment with, things that would otherwise be out of my reach! :slight_smile:

–rlparker


#8

Hey, it’s all cool! Let us know how things go with this. I’m sure your experiences will be very instructive to us all!

BTW, for those of you following my career, I’ll be moving back to Java from .NET later this month!

What are [color=#CC0000]50DISK50[/color], [color=#CC0000]3DOM50[/color], and [color=#CC0000]1IP1DOM50[/color]?
They’re Dreamhost coupons!