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

                    Save data to MySQL database using ExtJS and PHP [closed]2019 Community Moderator ElectionHow can I prevent SQL injection in PHP?Which MySQL data type to use for storing boolean valuesPHP: Delete an element from an arrayHow do I connect to a MySQL Database in Python?Should I use the datetime or timestamp data type in MySQL?How to get a list of MySQL user accountsHow Do You Parse and Process HTML/XML in PHP?Reference — What does this symbol mean in PHP?How does PHP 'foreach' actually work?Why shouldn't I use mysql_* functions in PHP?

                    Compiling GNU Global with universal-ctags support Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Data science time! April 2019 and salary with experience The Ask Question Wizard is Live!Tags for Emacs: Relationship between etags, ebrowse, cscope, GNU Global and exuberant ctagsVim and Ctags tips and trickscscope or ctags why choose one over the other?scons and ctagsctags cannot open option file “.ctags”Adding tag scopes in universal-ctagsShould I use Universal-ctags?Universal ctags on WindowsHow do I install GNU Global with universal ctags support using Homebrew?Universal ctags with emacsHow to highlight ctags generated by Universal Ctags in Vim?

                    Add ONERROR event to image from jsp tldHow to add an image to a JPanel?Saving image from PHP URLHTML img scalingCheck if an image is loaded (no errors) with jQueryHow to force an <img> to take up width, even if the image is not loadedHow do I populate hidden form field with a value set in Spring ControllerStyling Raw elements Generated from JSP tagds with Jquery MobileLimit resizing of images with explicitly set width and height attributeserror TLD use in a jsp fileJsp tld files cannot be resolved