Writing data from different clients to separate files simultaneouslyLarge number of simulteneous connections in thriftExample for boost shared_mutex (multiple reads/one write)?Design a transmitter class in C++: buffer data from server & send to clientWriting Java server to handle multiple simultaneous clientsHow to select and send data to a specific winsock clienthow can I have a linked list that multiple clients can read write to?Apache Thrift reusing connection in different threadMultiThreading in connecting multiple clients to single server in windows in C++Sending a char array to a thread using CreateThread in C++ in Visual StudioHow to distribute received data from a connected client to other connected clients while making use of mulithreading?

Are Captain Marvel's powers affected by Thanos' actions in Infinity War

Invalid date error by date command

Pre-mixing cryogenic fuels and using only one fuel tank

What is the highest possible scrabble score for placing a single tile

What happens if you are holding an Iron Flask with a demon inside and walk into an Antimagic Field?

What happens to a creature that changes size inside of Otiluke's Resilient Sphere?

Why does a simple loop result in ASYNC_NETWORK_IO waits?

How much character growth crosses the line into breaking the character

How should I respond when I lied about my education and the company finds out through background check?

Biological Blimps: Propulsion

Does an advisor owe his/her student anything? Will an advisor keep a PhD student only out of pity?

The IT department bottlenecks progress. How should I handle this?

Is there a way to get `mathscr' with lower case letters in pdfLaTeX?

What is the evidence for the "tyranny of the majority problem" in a direct democracy context?

Using substitution ciphers to generate new alphabets in a novel

How to explain what's wrong with this application of the chain rule?

Store Credit Card Information in Password Manager?

Mixing PEX brands

Quoting Keynes in a lecture

Unexpected behavior of the procedure `Area` on the object 'Polygon'

Temporarily disable WLAN internet access for children, but allow it for adults

Multiplicative persistence

Can a College of Swords bard use a Blade Flourish option on an opportunity attack provoked by their own Dissonant Whispers spell?

Why would a new[] expression ever invoke a destructor?



Writing data from different clients to separate files simultaneously


Large number of simulteneous connections in thriftExample for boost shared_mutex (multiple reads/one write)?Design a transmitter class in C++: buffer data from server & send to clientWriting Java server to handle multiple simultaneous clientsHow to select and send data to a specific winsock clienthow can I have a linked list that multiple clients can read write to?Apache Thrift reusing connection in different threadMultiThreading in connecting multiple clients to single server in windows in C++Sending a char array to a thread using CreateThread in C++ in Visual StudioHow to distribute received data from a connected client to other connected clients while making use of mulithreading?













0















I'm right now I have a Thrift TSimpleServer that is going to accept connection from multiple clients at once. Once those clients connect they will be sending data that is to be stored in a respective file on the server. Now I'm pretty new to thrift so I'm not sure how the TSimpleServer handles multiple connections(haven't tested that yet) anyways I'm not even sure how to go about saving the received data in separate files simultaneously. I assume a separate thread is created to handle each client connections but how do give each thread a file path to use?










share|improve this question




























    0















    I'm right now I have a Thrift TSimpleServer that is going to accept connection from multiple clients at once. Once those clients connect they will be sending data that is to be stored in a respective file on the server. Now I'm pretty new to thrift so I'm not sure how the TSimpleServer handles multiple connections(haven't tested that yet) anyways I'm not even sure how to go about saving the received data in separate files simultaneously. I assume a separate thread is created to handle each client connections but how do give each thread a file path to use?










    share|improve this question


























      0












      0








      0








      I'm right now I have a Thrift TSimpleServer that is going to accept connection from multiple clients at once. Once those clients connect they will be sending data that is to be stored in a respective file on the server. Now I'm pretty new to thrift so I'm not sure how the TSimpleServer handles multiple connections(haven't tested that yet) anyways I'm not even sure how to go about saving the received data in separate files simultaneously. I assume a separate thread is created to handle each client connections but how do give each thread a file path to use?










      share|improve this question
















      I'm right now I have a Thrift TSimpleServer that is going to accept connection from multiple clients at once. Once those clients connect they will be sending data that is to be stored in a respective file on the server. Now I'm pretty new to thrift so I'm not sure how the TSimpleServer handles multiple connections(haven't tested that yet) anyways I'm not even sure how to go about saving the received data in separate files simultaneously. I assume a separate thread is created to handle each client connections but how do give each thread a file path to use?







      c++ multithreading client thrift






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 7 at 6:12









      Cœur

      19k9114155




      19k9114155










      asked Apr 8 '13 at 14:30









      user1704863user1704863

      1401315




      1401315






















          1 Answer
          1






          active

          oldest

          votes


















          0














          TSimpleServer handles simply :-) one connection at a time. You may want to use TThreadedServer or TThreadPoolServer which are able to process requests in parallel.



          How you do give each thread a file depends on your exact use case. For example, you could consider deriving an own version of a thread factory and register this one with the thread Manager. Although the following blog post does not exactly cover your scenario, you should get the idea from the code at the end of the text:



          http://mikecvet.wordpress.com/2010/05/13/apache-thrift-tutorial-the-sequel/






          share|improve this answer






















            Your Answer






            StackExchange.ifUsing("editor", function ()
            StackExchange.using("externalEditor", function ()
            StackExchange.using("snippets", function ()
            StackExchange.snippets.init();
            );
            );
            , "code-snippets");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "1"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f15881794%2fwriting-data-from-different-clients-to-separate-files-simultaneously%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            TSimpleServer handles simply :-) one connection at a time. You may want to use TThreadedServer or TThreadPoolServer which are able to process requests in parallel.



            How you do give each thread a file depends on your exact use case. For example, you could consider deriving an own version of a thread factory and register this one with the thread Manager. Although the following blog post does not exactly cover your scenario, you should get the idea from the code at the end of the text:



            http://mikecvet.wordpress.com/2010/05/13/apache-thrift-tutorial-the-sequel/






            share|improve this answer



























              0














              TSimpleServer handles simply :-) one connection at a time. You may want to use TThreadedServer or TThreadPoolServer which are able to process requests in parallel.



              How you do give each thread a file depends on your exact use case. For example, you could consider deriving an own version of a thread factory and register this one with the thread Manager. Although the following blog post does not exactly cover your scenario, you should get the idea from the code at the end of the text:



              http://mikecvet.wordpress.com/2010/05/13/apache-thrift-tutorial-the-sequel/






              share|improve this answer

























                0












                0








                0







                TSimpleServer handles simply :-) one connection at a time. You may want to use TThreadedServer or TThreadPoolServer which are able to process requests in parallel.



                How you do give each thread a file depends on your exact use case. For example, you could consider deriving an own version of a thread factory and register this one with the thread Manager. Although the following blog post does not exactly cover your scenario, you should get the idea from the code at the end of the text:



                http://mikecvet.wordpress.com/2010/05/13/apache-thrift-tutorial-the-sequel/






                share|improve this answer













                TSimpleServer handles simply :-) one connection at a time. You may want to use TThreadedServer or TThreadPoolServer which are able to process requests in parallel.



                How you do give each thread a file depends on your exact use case. For example, you could consider deriving an own version of a thread factory and register this one with the thread Manager. Although the following blog post does not exactly cover your scenario, you should get the idea from the code at the end of the text:



                http://mikecvet.wordpress.com/2010/05/13/apache-thrift-tutorial-the-sequel/







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Apr 17 '13 at 22:51









                JensGJensG

                9,68633141




                9,68633141





























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f15881794%2fwriting-data-from-different-clients-to-separate-files-simultaneously%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    1928 у кіно

                    Захаров Федір Захарович

                    Ель Греко