1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Which Language & Why For A Multithreaded Bot?

Discussion in 'General Programming Chat' started by MatthewWoodward, Oct 29, 2012.

  1. MatthewWoodward

    MatthewWoodward Jr. VIP Jr. VIP Premium Member

    Joined:
    Aug 31, 2012
    Messages:
    992
    Likes Received:
    1,680
    Occupation:
    SEO
    Location:
    UK
    Home Page:
    Please do not reply to this thread or PM me with your services

    I have just finished off a software specification and am currently mulling over what language to get it written in.

    It is essentially just a bot that can cycle through a list of URLs looking for a specified string in the URL or on the page itself.

    Once it has found that string it should lookup and return data against a separate table.

    I want it to be fast and as lightweight on resources as possible with multi threading as an option.

    What language is best for the job and why? Although I'm technically minded I'm not a programmer - so don't dumb down your answers :)

    Thanks in advance for any help or support you can offer
     
  2. DarkPixel

    DarkPixel Jr. VIP Jr. VIP Premium Member

    Joined:
    Oct 4, 2011
    Messages:
    1,328
    Likes Received:
    1,239
    Location:
    ↓↓↓↓
    Home Page:
    C# or VB.net would do the job. It's easy to create multithreaded apps with it, and the apps made with it are pretty good and not very CPU intensive.
     
  3. neutralhatter

    neutralhatter Jr. VIP Jr. VIP Premium Member

    Joined:
    Jun 23, 2010
    Messages:
    430
    Likes Received:
    330
    this question is to broad... a lot of languages will suffice, especially with modern day machines.
    you should worry more about on what platform or what scale you want to run it, that way you'll get a better answer
     
  4. qrazy

    qrazy Senior Member

    Joined:
    Mar 19, 2012
    Messages:
    1,111
    Likes Received:
    1,712
    Location:
    Banana Republic
    I'd prefer C# or VB.net as it's easy to create and manage threads than in C++ or Java. Again it depends on which language you are already proficient with.
     
  5. MatthewWoodward

    MatthewWoodward Jr. VIP Jr. VIP Premium Member

    Joined:
    Aug 31, 2012
    Messages:
    992
    Likes Received:
    1,680
    Occupation:
    SEO
    Location:
    UK
    Home Page:
    Thanks

    Lets say it has to cycle through 50,000 urls with threads set between 1 and 50 looking up against 1,500 possible string matches either in the URL itself (no get required) or on the page after getting it.

    I'm going to hire someone eventually but I wanted to do some research on language before hand, thanks for your recommendation.

    Whats the key differences between C# and VB.net ? I assume VB.net is the .net framework business?
     
  6. Gary Becks

    Gary Becks Power Member

    Joined:
    Apr 11, 2010
    Messages:
    675
    Likes Received:
    282
    Location:
    Atl
    Home Page:
    Ditto, really depends on your preferences. There's plenty of of languages that could accomplish this easily, just depends on what features you need. Do you want it to be a web app or desktop? what platforms should it run on? Will it be distributed or only used in house? Etc..
     
  7. MatthewWoodward

    MatthewWoodward Jr. VIP Jr. VIP Premium Member

    Joined:
    Aug 31, 2012
    Messages:
    992
    Likes Received:
    1,680
    Occupation:
    SEO
    Location:
    UK
    Home Page:
    Hi,

    Ahh I understand.

    Well it will be a desktop app and distributed to a lot of people for free. It should run on windows as a priority but if it's easy to make it cross platform then why not?
     
  8. jazzc

    jazzc Moderator Staff Member Moderator Jr. VIP

    Joined:
    Jan 27, 2009
    Messages:
    2,468
    Likes Received:
    10,147
    For lightweight & Windows, you 'll have to go with a native language: C++, Delphi. If lightweight isn't really a hard requirement, any .NET language will do (and it will probably be cheaper).
     
  9. Gary Becks

    Gary Becks Power Member

    Joined:
    Apr 11, 2010
    Messages:
    675
    Likes Received:
    282
    Location:
    Atl
    Home Page:
    For a non trivial app like the one you mentioned I go for anything that will give the benefit or being cross platform. Especially since you plan to give it away for free.

    C++ , Delphi, Python, Java, any of them can meet your requirements easily. I'd stay away from .Net on this one though.


    Sent from my iPhone using Tapatalk
     
  10. qrazy

    qrazy Senior Member

    Joined:
    Mar 19, 2012
    Messages:
    1,111
    Likes Received:
    1,712
    Location:
    Banana Republic
    The difference is they are just two different programming languages and both belongs to .NET framework.
     
  11. gurusoftheghetto

    gurusoftheghetto Newbie

    Joined:
    Oct 29, 2012
    Messages:
    3
    Likes Received:
    0
    My vote goes to C++

    It's got its limits yes, but as far as the "bug" war goes, you'll get less programming with C++
     
  12. ./v3xr

    ./v3xr Newbie

    Joined:
    Sep 26, 2012
    Messages:
    44
    Likes Received:
    14
    Platform should be your biggest concern, but in my opinion C++ has the potential to best fit your needs.
     
  13. madoctopus

    madoctopus Supreme Member

    Joined:
    Apr 4, 2010
    Messages:
    1,249
    Likes Received:
    3,498
    Occupation:
    Full time IM
    NOT PHP
    NOT Python

    PHP has no thread support, Python has broken thread support, unless you use Stackless variant of Python which never tried.

    Frankly I'd go for any hard typed, compiled language - .NET, C/C++, Java. If you want lightweight, Java might not be the best option (but it is multi-platform). C/C++ is harder to learn but if you don't do it yourself it can be the fastest.
     
  14. MatthewWoodward

    MatthewWoodward Jr. VIP Jr. VIP Premium Member

    Joined:
    Aug 31, 2012
    Messages:
    992
    Likes Received:
    1,680
    Occupation:
    SEO
    Location:
    UK
    Home Page:
    Hi,

    Thanks for all the great feedback guys, so far I've got-


    Languages To Consider
    C++
    Delphi


    Languages To Forget
    PHP
    Python
    .net
    Java

    Is C/C#/C+/C++ different languages or just different ways to refer to the same language? Always get confused over that when people refer to them.

    Any arguments for Delphi over C++ or vice versa?
     
  15. ./v3xr

    ./v3xr Newbie

    Joined:
    Sep 26, 2012
    Messages:
    44
    Likes Received:
    14
    Here's my understanding of all of this. Keep in mind I am a web-developer by nature, and while I have 10+ years in the programming field, all of this should be verified before jumping on it.

    As I understand it, C is the most difficult to code in due to complexity. Everything has to be declared, as it is the "closest" you can get to interfacing directly with the processor. Because of this, there is the largest potential for a "perfect" program, but also the largest potential for failure.

    C+ does not exist. :p

    C++ is object-oriented... all this means to you, is that it relies upon other systems to do the hard part. However, C++ is still regarded as one of the best programing languages for general to above-average computing. Basically, anything aside from programs that require instantaneous response for user interaction; things like video games. I have used C++, and while it is complex, I thoroughly enjoy it.

    C# is a .NET language, which means the groundwork is made by Microshit, and Windows-only. While it is by far the best .NET language, .NET is still clunky and disorganized, leaving much to be desired. It is, however, the simplest approach to writing Windows-based programs, if all you care about is "can it be done". I have used a considerable amount of .NET for small demeaning programs and it suited my needs, but anything multi-threaded will be limited by many factors.


    Because of this, my recommendation was C++ :)
     
  16. MatthewWoodward

    MatthewWoodward Jr. VIP Jr. VIP Premium Member

    Joined:
    Aug 31, 2012
    Messages:
    992
    Likes Received:
    1,680
    Occupation:
    SEO
    Location:
    UK
    Home Page:
    Hi,

    Thanks for your detailed reply that has really boosted my understanding of it all!

    I'm feeling pretty confident with C++ after some further reading and speaking to others.

    Thanks for all the help guys! Now I just need a decent C++ dev =D
     
  17. Ambassy

    Ambassy BANNED BANNED

    Joined:
    Apr 13, 2011
    Messages:
    642
    Likes Received:
    163
    All you who say C# / .NET are optimal are obviously lost.
    Sure they're easy to use (I code C# and vb.net exclusively) but they're NOT light weight.
    Languages like C++ or Delphi are way lighter than .NET applications.
     
  18. Dubulous

    Dubulous Newbie

    Joined:
    Mar 14, 2010
    Messages:
    13
    Likes Received:
    1
    To contribute something new...

    You might also consider Go, though I'm not sure how easy it would be for you to find someone with Go experience.

    To summarize from the wikipedia page and the Go website (I'm not allowed to post links), Go is a compiled, garbage-collected, concurrent language developed by Google. The Go website claims that Go makes it easy to build simple, reliable, and efficient software. Check out some of the demos on their homepage. Some of them use concurrency.

    Go has been getting a lot of hype on all of the nerd sites :) ... I'm a web developer (php), and have been wanting to try out Go for a while, but I haven't had a project to try it out on. If I was about to start work on your project, I'd Go for it :p
     
  19. matessim

    matessim Junior Member

    Joined:
    Nov 22, 2008
    Messages:
    164
    Likes Received:
    72
    Occupation:
    Being funny and kind to puppies
    Location:
    UT 2003
    Java with Threads and Executor pools make a good design for a multithreaded bot IMO, Python with Gevent would work also and there are a million languages that can do it in a million ways.

    Use what feels good and is comfortable.
     
  20. rugbyjack2005

    rugbyjack2005 Power Member

    Joined:
    Oct 2, 2011
    Messages:
    539
    Likes Received:
    50
    Location:
    United Kingdom
    I'm no programmer but my dad has run software companies over the years and has employed a fair few programmers and little bits have sunk in :p I didn't think C++ was object oriented and thought it has object oriented features and this is why people call it an intermediate language because it is easier than C but harder than object orientated languages like php, VB.net, Java etc.

    Like i said, i am no programmer but I have heard loads of these discussions before and the general consensus normally is that if it needs to be fast, build it in C or C++. If it doesn't then build it in a simple object orientated language like VB.Net. An object orientated program is far less buggy and the programmers are cheaper and easier to come by as it is easier. Not a huge problem if the program is small but for longer programs if you are not careful, you spend more time fixing bugs than building the program.