Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Oct 2013
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Arrow Your opinions on which language I should use for my project

    Hello all,

    I have this project where I should interact with an API to download some JSON files. And according to the data of the JSON file, I should download some html pages. And after everything is done I should prepare a local web page automatically with some interactivity and with the data provided by JSONs.

    I have used AutoHotkey to do this and it works, but I was wondering if there is any better methods of doing this. Since I need to download millions of JSONs I have to do the downloads and parsing with a lot of programs at the same time. The way I do it with AHK is I just create 1000s of scripts and run them 100 at a time.

    I keep hearing about perl and ruby and wondering if they are any good. I once tried this with C but I gave up but it was a long time ago.

    Remember, whatever you advice, it should be able to run in multiple threads.

    I look forward for your answers, thanks in advance

  • #2
    Senior Coder
    Join Date
    Feb 2011
    Location
    Your Monitor
    Posts
    4,281
    Thanks
    57
    Thanked 523 Times in 510 Posts
    Blog Entries
    5
    Quote Originally Posted by cbt13 View Post
    I keep hearing about perl and ruby and wondering if they are any good.
    Yet you're posting in a php forum? - Apart from the odd member like Fou, I don't think many folks here will comment on perl or ruby. This topic may of been better placed in one of the other forums.

    Quote Originally Posted by cbt13 View Post
    Remember, whatever you advice, it should be able to run in multiple threads.
    That pretty much shoots php out of the water then IMO. PHP can fork multiple processes but only on linux. In windows it does not do multiple threads. There is a hack but its dirty.. call one script and then have it (in a loop) call another script multiple times via http with a timeout to force it to disconnect but leave that script running (using ignore_user_abort() in the called script). It has a similar effect but passing back data is hit-n-miss. To be honest it does work very well but it's just not as clean as a language that can run multiple threads and will use more resources as the webserver is involved.

    IMO if you want to do something with multiple processes on your windows machine, you're better off doing it in a windows language that can be compiled and run which can create it's own threads natively. I personally use object pascal for many things - at the moment I'm using it to download thousands of emails from yahoo and import them into a mysql database (via a http call which posts the data to a php script). It's an old language but still robust but you may prefer something newer like java, c# etc.

    Cheers for the AHK tip though, been looking for something like that..
    Last edited by tangoforce; 10-20-2013 at 12:21 PM.
    See my new CodingForums Blog: http://www.codingforums.com/blogs/tangoforce/

    Many useful explanations and tips including: Cannot modify headers - already sent, The IE if (isset($_POST['submit'])) bug explained, unexpected T_CONSTANT_ENCAPSED_STRING, debugging tips and much more!

  • Users who have thanked tangoforce for this post:

    cbt13 (10-20-2013)

  • #3
    New to the CF scene
    Join Date
    Oct 2013
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Thanks for your answer tangoforce, I know this is a PHP forum. I tried asking this on StackOwerflow but they did not like an opinion based question. And this is the only other alternative I could find. (with some active developer community)

    Your answer made my path more clear, but if you can suggest me a better place to ask the same question I'd be happy.

    Thanks again


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •