Go Back  DVD Talk Forum > General Discussions > Tech Talk
Reload this Page >

What programming language to use?

Tech Talk Discuss PC Hardware, Software, Internet and Other Technology

What programming language to use?

Old 05-12-08, 11:37 AM
  #1  
DVD Talk Legend
Thread Starter
 
Mordred's Avatar
 
Join Date: Jan 2000
Location: Austin, TX
Posts: 12,214
Likes: 0
Received 1 Like on 1 Post
What programming language to use?

Without getting too specific or technical I'm looking for some help on what programming language/method for some web development.

I've got a rather large MySQL database. At pre-scheduled times I need to run some queries and then run some rather involved simulations on the data, before writing it back to the database. These simulations will occur without a user having to load a webpage and more than one may take place simultaneously (although never using the same records to seed the simulation).

Coming from a C and PHP background, what languages/methods should I look into? None of these servers are local so everything has to be doable through a web interface. I don't even know if/how you could schedule chron jobs to run this code.

If you have any ideas/recommendations, I'd love to hear them.
Old 05-13-08, 04:46 PM
  #2  
DVD Talk Legend
 
Raul3's Avatar
 
Join Date: Apr 2003
Location: Picture a cup in the middle of the sea
Posts: 10,706
Likes: 0
Received 1 Like on 1 Post
In windows you can use VB script to create some .bat files that could be run by the windows scheduler.
I have something like that. Those .bat files run a webpage every day in the morning.

The main component, i.e. the most important tool, there is httprequester, a script I found to run webpages from the windows shell.
If you google httprequester you'll find that there are a lot of versions of that script/tool in different languages, java, vbs, etc.
Old 05-13-08, 06:46 PM
  #3  
DVD Talk Legend
Thread Starter
 
Mordred's Avatar
 
Join Date: Jan 2000
Location: Austin, TX
Posts: 12,214
Likes: 0
Received 1 Like on 1 Post
The thing is, all of this is going to be run in a Unix environment, on a machine I don't control.

Right now, it looks like my best bet is to just set up some PHP code to add some info to a "schedule" table in my DB and then use a chron jobs which query that table every 5-10 minutes looking for entries and then spawning off the simulation.

I still don't know what exactly to code the simulation in so that it can run like this. It'll be slow, but I could probably write it in PHP. I really don't know any other way to write stand alone code that can access my database and run like this. I'm still pretty new when it comes to trying to get crap done in a Unix environment.
Old 05-13-08, 07:15 PM
  #4  
Senior Member
 
Join Date: Apr 2002
Posts: 628
Likes: 0
Received 0 Likes on 0 Posts
Could you clarify what you mean by "everything has to be doable through a web interface"? Do you mean that the script's execution should be controllable through a Web front-end? Or that the script itself can only access the database by screen-scraping a remote Web site?

For a research project I just finished up, I used Python in combination with psycopg2 and SciPy to access the database and do the number-crunching respectively. Neither pure Python nor PHP is going to set any land-speed records, so I strongly recommend against using either of them for complex simulations. SciPy helps a lot (it does all the heavy lifting in C), but you're probably not going to match C/C++ or Java for raw speed without a lot of tweaking.

Java's another way to go, if your host supports it. It's gotten very fast at number-crunching in recent releases (sometimes even outperforming C code, since the JIT can do additional optimizations at runtime) and its database support via JDBC is also very good. The downside is that the VM startup time is still poor even in Java 6.0, so it's not suited for short-lived simulations.

Last edited by GHackmann; 05-13-08 at 07:17 PM.

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Thread Tools
Search this Thread

Archive - Advertising - Cookie Policy - Privacy Statement - Terms of Service - Do Not Sell My Personal Information -

Copyright 2021 MH Sub I, LLC dba Internet Brands. All rights reserved. Use of this site indicates your consent to the Terms of Use.