Results 1 to 3 of 3

Thread: Program implementation / File Transfer Questions (yes, i have read the faq :) )/ Ruby

  1. #1
    EmmanuelOga is offline Registered User
    Join Date
    Jul 2006
    Posts
    6

    Program implementation / File Transfer Questions (yes, i have read the faq :) )/ Ruby

    I have read the faq about filetransfers but got a couple of questions more:

    My program is going to play mp3 in the only machine that have speakers in my lan (i'll call it server). I'm going to use this interface to transfer a buffer of a mp3file from my clients:

    module Q4MusicClient
    {
    sequence<byte> ByteSeq;

    interface Mp3Client
    {
    nonmutating ByteSeq GetBuffer(int pos, int size);
    }
    }

    Every clients know what to transfer, so in my "sever" application i call that method on every client until the buffer size is zero, and then i move to the next client.

    The only two server methods for now are:

    module Q4MusicServer
    {
    interface Mp3Server
    {
    // Add a client to ask for mp3
    idempotent void RegisterClient(Q4MusicClient::Mp3Client* c);

    // Remove the client from the queue
    idempotent void UnregisterClient(Q4MusicClient::Mp3Client* c);
    };
    };

    The two definitions are stored on different ice files, so in all i have four .cpp files and 4 .h files.

    QUESTIONS:

    1)Is the selection of the protocol going to afect the order in wich the packets come to the "server" ? That is: if i made two calls to Client::GetBuffer(...), is there any problem in using UDP for the conection?

    I want to use UDP because i'm in a LAN and i think it will be much more effecient and less bandwidth hungry, i'm right? Or should i use TCP instead for this kind of applications?

    2) I'm thinking of reading the mp3 files from the clients in chunks of 2048 bytes each call. Is it efficient enough? is there and optimal value i can choose to make better use of my class C 100mbps ethernet lan?

    I'm very impressed with the quality of ICE, even whitout understanding all the implications of the system, being that i haven't had much experience in programming distributed system. One thing i can tell you: Having made research in a lot of other network toolkits and solutions, yours is the easiest to use and at the same time the most powerfull. And is very impressive too the feedback you can get from the direct developers of the product!!! So i wanted to thank you in in advance and congratulate you for your good job

    One more question: how are you doing with the ruby language maping?

    Thank you!
    Last edited by EmmanuelOga; 08-01-2006 at 09:33 AM.
    Emmanuel Oga
    Q4 Technologies Argentina (www.q4tech.com)
    Q4Social Network (Internal lan messenger/file transfer app)

  2. #2
    bernard's Avatar
    bernard is offline ZeroC Staff
    Name: Bernard Normier
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Palm Beach Gardens, FL
    Posts
    1,294
    Hi Emmanuel,

    I recommend to use just plain TCP; you can't use UDP for invocations with return values. See "30.14 Datagram Invocations" in the manual.

    And as for your interface / message size, MP3 files are typically not that big, so why make it complicated? I'd use:
    Code:
    nonmutating ByteSeq getSong();
    The default Ice max buffer size (1MB) should be plenty for typical MP3-encoded files.

    Cheers,
    Bernard
    Bernard Normier
    ZeroC, Inc.

  3. #3
    bernard's Avatar
    bernard is offline ZeroC Staff
    Name: Bernard Normier
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Palm Beach Gardens, FL
    Posts
    1,294
    Ok, many MP3 files are actually larger than 1MB . It depends on many factors, such as bit-rate, and overall length of the performance.

    If RAM usage is not a concern-- and file size remains reasonable, say less than 10 or 20 MB -- I'd still keep the simple API and set the Ice max memory size accordingly.

    Cheers,
    Bernard
    Bernard Normier
    ZeroC, Inc.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. transfer file with Ice
    By zhongshiz in forum Help Center
    Replies: 4
    Last Post: 10-23-2007, 09:00 PM
  2. Cannot read config file using Java ClassLoader
    By Djaunl in forum Help Center
    Replies: 4
    Last Post: 05-18-2007, 03:45 PM
  3. Any Example that do file transfer out there
    By alexm in forum Help Center
    Replies: 2
    Last Post: 04-06-2006, 05:31 PM
  4. Questions on the service implementation in Ice 1.3
    By stephan in forum Help Center
    Replies: 7
    Last Post: 03-09-2004, 04:21 PM

Posting Permissions

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