CodeGuru Forums -
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic Newsletters VB Forums Developer.com


Newest CodeGuru.com Articles:

  • Installing SQL Server 2008
  • Writing UDFs for Firebird Embedded SQL Server
  • [Updated] Shutdown Manager
  • Building Windows Azure Cloud Service Applications with Azure Storage and the Azure SDK

  • Search CodeGuru:
     



    Go Back   CodeGuru Forums > Visual C++ & C++ Programming > C++ (Non Visual C++ Issues)
    FAQ Members List Calendar Search Today's Posts Mark Forums Read

    C++ (Non Visual C++ Issues) Ask or answer C and C++ questions not related to Visual C++. This includes Console programming, Linux programming, or general ANSI C++.

    Reply
     
    Thread Tools Search this Thread Rate Thread Display Modes
      #1    
    Old November 3rd, 2009, 01:12 AM
    scathenC scathenC is offline
    Member
     
    Join Date: Nov 2004
    Posts: 103
    scathenC is on a distinguished road (20+)
    Some Design Suggestions

    Hi All,

    I have written an app that continuously processes large amounts of data in a specific way that requires optimum speed and thus all of the computers resources. The app also requires constant data input and gives constant data output. As complex processing is required at all stages I have built three machines for use as follows:

    (Machine 1.) - Convert raw realtime data into input data
    (Machine 2.) - Process the input data and send output data
    (Machine 3.) - Convert the output data to usable information

    Now I would like to know what people on these forums opinions are as to the fastest way Machine2 can retrieve and send data between the other machines.
    Reply With Quote
      #2    
    Old November 3rd, 2009, 02:52 AM
    nuzzle nuzzle is offline
    Member +
     
    Join Date: May 2009
    Posts: 580
    nuzzle has a spectacular aura about (125+)nuzzle has a spectacular aura about (125+)
    Re: Some Design Suggestions

    Quote:
    Originally Posted by scathenC View Post
    Now I would like to know what people on these forums opinions are as to the fastest way Machine2 can retrieve and send data between the other machines.
    Are the "machines" physical computers? Then you need fast communication hardware.

    I first suggested GPIB here but I realize there are faster ways.

    Last edited by nuzzle; November 3rd, 2009 at 07:28 AM.
    Reply With Quote
      #3    
    Old November 3rd, 2009, 05:12 AM
    JohnW@Wessex's Avatar
    JohnW@Wessex JohnW@Wessex is offline
    Senior Member
     
    Join Date: Jul 2002
    Location: Southampton. United Kingdom
    Posts: 1,954
    JohnW@Wessex is a glorious beacon of light (400+)JohnW@Wessex is a glorious beacon of light (400+)JohnW@Wessex is a glorious beacon of light (400+)JohnW@Wessex is a glorious beacon of light (400+)JohnW@Wessex is a glorious beacon of light (400+)JohnW@Wessex is a glorious beacon of light (400+)
    Re: Some Design Suggestions

    Would a Gigabit Ethernet connection be fast enough,
    piping the data through sockets?

    You could connect them through dedicated network cards with crossover cables to get the least delay.
    __________________
    "It doesn't matter how beautiful your theory is, it doesn't matter how smart you are. If it doesn't agree with experiment, it's wrong."
    Richard P. Feynman
    Reply With Quote
      #4    
    Old November 3rd, 2009, 06:20 PM
    scathenC scathenC is offline
    Member
     
    Join Date: Nov 2004
    Posts: 103
    scathenC is on a distinguished road (20+)
    Re: Some Design Suggestions

    Yeah my first choice at the moment would probably be UDP over Gigabit. Whilst I have been coding for a long time, networking isn't my specialty, and I was eager to see if anyone knew of any better methods. There is no specific requirement for speed, other then simply "as fast as I can do it". There is no need for flow control etc, just something as basic as it can get.

    Thanks for the replies guys.
    Reply With Quote
      #5    
    Old November 3rd, 2009, 10:07 PM
    originalfamousjohnsmith originalfamousjohnsmith is offline
    Member
     
    Join Date: Aug 2009
    Posts: 77
    originalfamousjohnsmith is an unknown quantity at this point (<10)
    Re: Some Design Suggestions

    Quote:
    Originally Posted by scathenC View Post
    Yeah my first choice at the moment would probably be UDP over Gigabit. Whilst I have been coding for a long time, networking isn't my specialty, and I was eager to see if anyone knew of any better methods. There is no specific requirement for speed, other then simply "as fast as I can do it". There is no need for flow control etc, just something as basic as it can get.

    Thanks for the replies guys.
    Well, I assume you want to know about code not hardware. Obviously for hardware the answer is whatever is rated fastest or whatever you have.

    There's no magic involved as far as design goes. You need separate processes on eachmachine running/accepting UDP using asynchronous IO. The hardware handles the work really and queues any network activity so it's not very hard at its core, but lockless multithreaded code can be difficult. It's more a matter of learning how your networking API and OS work and doing it than design, though.
    Reply With Quote
      #6    
    Old November 4th, 2009, 03:48 AM
    JohnW@Wessex's Avatar
    JohnW@Wessex JohnW@Wessex is offline
    Senior Member
     
    Join Date: Jul 2002
    Location: Southampton. United Kingdom
    Posts: 1,954
    JohnW@Wessex is a glorious beacon of light (400+)JohnW@Wessex is a glorious beacon of light (400+)JohnW@Wessex is a glorious beacon of light (400+)JohnW@Wessex is a glorious beacon of light (400+)JohnW@Wessex is a glorious beacon of light (400+)JohnW@Wessex is a glorious beacon of light (400+)
    Re: Some Design Suggestions

    Quote:
    Originally Posted by scathenC View Post
    Yeah my first choice at the moment would probably be UDP over Gigabit.
    You have to be aware that UDP does not guarantee the order of arrival or even delivery of the packet. This *may* not be a problem on a back-to-back or internal network. TCP would probably be fine and it will catch the occasional glitch in transmission. You can cut down delay times by setting the TCP_NODELAY option so that packets are sent immediately.
    __________________
    "It doesn't matter how beautiful your theory is, it doesn't matter how smart you are. If it doesn't agree with experiment, it's wrong."
    Richard P. Feynman
    Reply With Quote
    Reply

    Bookmarks
    Go Back   CodeGuru Forums > Visual C++ & C++ Programming > C++ (Non Visual C++ Issues)


    Thread Tools Search this Thread
    Search this Thread:

    Advanced Search
    Display Modes Rate This Thread
    Rate This Thread:

    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 Off
    Forum Jump


    All times are GMT -5. The time now is 01:14 AM.



    Acceptable Use Policy

    internet.comMediabistrojusttechjobs.comGraphics.com

    WebMediaBrands Corporate Info


    Advertise | Newsletters | Feedback | Submit News

    Legal Notices | Licensing | Permissions | Privacy Policy


    Powered by vBulletin® Version 3.7.3
    Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
    Copyright WebMediaBrands Inc. 2002-2009