• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

Network programming

Scheduled Pinned Locked Moved Off-Topic & Non-Support Discussion
13 Posts 5 Posters 7.7k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Z
    ZGamer
    last edited by May 10, 2006, 12:25 AM

    I am in the early stages of planning a network file transfer application and am having difficulties deciding on the language to use.

    Functionality:
    For sake of example say you need to transfer a million files each 1k in size and another time you need to transfer ten files two gigs in size each.

    Enviroment: (everything run's windows server 2000/2003…..instructor's sanction)
    Hardware: as high end as you'd like
    Network Medium: 1000base-sx direct from one server to another on the high end and on the low end a T-1 linking from distant locations.

    As for the languages I'm currently familiary with: java, c++, c, pascal (more knowledge to the left and less to the right).

    I have heard some horrible stories about java's past performance in this area in terms of throughput and io/second but haven't heard anything recently on the topic and am wondering if some of the problems with earlier versions of java have been solved? or should I stick with c++ because it's been used for this kind of application before?

    I'm not trying to start a bashing war as each language has it's benefits, I'm trying to keep the talks to this specialized case in terms of performance and am wondering if anyone has any first-hands experiance with it and which has been better?

    –------------------------------------------------------------------------------------
    pfSense Documentation Wiki
    Need Commercial Support?
    Personal Blog

    1 Reply Last reply Reply Quote 0
    • S
      sullrich
      last edited by May 10, 2006, 12:53 AM

      Go with c#.  It's all the rage and is very easy to code in.

      In addition, go ahead and make a good binary diff engine built into the file transfer software that way you don't have to transfer entire files over slow links… Do what 2003 R2 does and "binary diff" the difference and only transfer the changed bits.

      With that your professors head should spin.

      1 Reply Last reply Reply Quote 0
      • B
        billm
        last edited by May 10, 2006, 9:31 PM

        Write it in a perl one liner and really piss off the instructor ;-P

        Better yet, use ssh and rsync out of a shell script.  I know, I know…not the intent of the exercise, but I'm lazy, why re-invent the wheel.

        --Bill

        pfSense core developer
        blog - http://www.ucsecurity.com/
        twitter - billmarquette

        1 Reply Last reply Reply Quote 0
        • L
          Leoandru
          last edited by May 11, 2006, 12:33 AM

          @billm:

          Write it in a perl one liner and really piss off the instructor ;-P

          Better yet, use ssh and rsync out of a shell script.  I know, I know…not the intent of the exercise, but I'm lazy, why re-invent the wheel.

          --Bill

          LOL  ;D good one.

          I'd probably go with C# as well if its windows only. but since you already know Java I'd go with that if your pressed for time in learning C#. Really its just a matter of preference and which language you feel more comfortable developing in. not sure about those horrible io perf for Java, its speed for network IO is almost comparable to C++. Also I have done network apps in Java before and I wouldn't say they were "slow" (running on 1.4 and 1.5 sdk), here are some performace numbers you can look at http://www.artima.com/articles/io_design_patterns3.html..
          C# as Scott said has all the rage for windows, the company I work for is buying heavily into it and porting lots of their legacy stuff to .net using the C# language, I'm literally dreaming C# code to show the extent of the work being done and I must say its a really nice language, especially the new 2.0 platform. I can't say I really notice any performance difference between Java and C++ and C# for IO apps, both Java and C# can and will munch a lot of memory especially for network apps that see a lot of activity, C++ if programmed correctly will be more memory efficient but the development time may stretch longer because if you can't find the necessary libraries to do what you want you may end up spending a lot of time coding them.

          1 Reply Last reply Reply Quote 0
          • Z
            ZGamer
            last edited by May 11, 2006, 2:44 AM

            Talked with a friend of mine who graduated while they still mainly taught c/c++/c# here and they said the reason why they didn't do java was cause of the overhead with the language….kinda like those people who would walk around campus with a wheely-bag, a backpack, and a laptop when all they need is book. I'll have to look more into c#, haven't touched it ever but I would assume it's pretty similar to c++.

            –------------------------------------------------------------------------------------
            pfSense Documentation Wiki
            Need Commercial Support?
            Personal Blog

            1 Reply Last reply Reply Quote 0
            • L
              Leoandru
              last edited by May 11, 2006, 3:55 PM

              @ZGamer:

              the reason why they didn't do java was cause of the overhead with the language….kinda like those people who would walk around campus with a wheely-bag, a backpack, and a laptop when all they need is book.

              Huh? C# and Java are in the same boat in terms of the overhead incurred by their programs. If you talking about a features comparison then C# may have the edge..

              1 Reply Last reply Reply Quote 0
              • Z
                ZGamer
                last edited by May 11, 2006, 8:58 PM

                so I heard lastnight when I was talking to a friend about, started coding in c++.

                –------------------------------------------------------------------------------------
                pfSense Documentation Wiki
                Need Commercial Support?
                Personal Blog

                1 Reply Last reply Reply Quote 0
                • J
                  Juve
                  last edited by Jun 1, 2006, 6:40 PM

                  I agree with scott, I'm using .NET every day and it's really powerfull, since you know how to code in Java you will be at ease with C#.

                  Java has the advantage of runing on multiple OS  but windows implementation is still very slow at my point of view…. :-D

                  1 Reply Last reply Reply Quote 0
                  • L
                    Leoandru
                    last edited by Jun 1, 2006, 6:44 PM

                    I have started playing with a new language named D.. its pretty decent in my opinion, the author called it the successor to C++. I'v its still a young langauge but I'm loving its features.

                    1 Reply Last reply Reply Quote 0
                    • S
                      sullrich
                      last edited by Jun 1, 2006, 7:58 PM

                      @Leoandru:

                      I have started playing with a new language named D.. its pretty decent in my opinion, the author called it the successor to C++. I'v its still a young langauge but I'm loving its features.

                      If you like D, you'll love D-Trace from Solaris :P

                      1 Reply Last reply Reply Quote 0
                      • L
                        Leoandru
                        last edited by Jun 1, 2006, 8:10 PM

                        @sullrich:

                        If you like D, you'll love D-Trace from Solaris :P

                        LOL..

                        I think their are a few languages around named D. Sun named the DTrace query language D. But the one I'm referring to is D system programming language from Digital Mars http://www.digitalmars.com/d/. here is a comparison to other languages http://www.digitalmars.com/d/comparison.html. I think this language is perfect for my little hobby projects as it strikes a good balance between power and easy of use. Just need to check if the gcc compiler for Free supports this language, It should.

                        I havn't gotten around to playing with DTrace but I will one day when the port to Free is complete.

                        1 Reply Last reply Reply Quote 0
                        • S
                          sullrich
                          last edited by Jun 1, 2006, 8:13 PM Jun 1, 2006, 8:11 PM

                          As far as I know it uses the "D" language for its scripts.  Maybe I am wrong here.

                          EDIT: http://www.eweek.com/article2/0,1759,1626474,00.asp?kc=EWRSS03129TX1K0000612 (explains that they use the D language)

                          1 Reply Last reply Reply Quote 0
                          • L
                            Leoandru
                            last edited by Jun 1, 2006, 8:35 PM Jun 1, 2006, 8:32 PM

                            Oh. I can see where the name really cause confusion.

                            http://en.wikipedia.org/wiki/D_programming_language_%28disambiguation%29

                            :-\

                            1 Reply Last reply Reply Quote 0
                            • First post
                              Last post
                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                              This community forum collects and processes your personal information.
                              consent.not_received