Re: How should I implement multi-threaded clients and multi-threaded connections in C++?

2012-12-04 Thread Ben Craig
Jens, > > Here is what I think you are suggesting: > > service SlowRunner { ... } > > service SlowStopper { ... } > > I don't think that two different services are really necessary. In fact, I > would not even recommend it for your particular case. Yep, you're right. Two services don't make m

[jira] [Updated] (THRIFT-1772) Serialization does not check types of embedded structures.

2012-12-04 Thread Avi Flamholz (JIRA)
[ https://issues.apache.org/jira/browse/THRIFT-1772?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Avi Flamholz updated THRIFT-1772: - Patch Info: Patch Available I have a patch file. Not sure how to upload it. It adds an assert to

Re: How should I implement multi-threaded clients and multi-threaded connections in C++?

2012-12-04 Thread Jens Geyer
Hi Ben, Here is what I think you are suggesting: service SlowRunner { ... } service SlowStopper { ... } I don't think that two different services are really necessary. In fact, I would not even recommend it for your particular case. One of the commands would be "doSlowOperation" and anoth

[jira] [Commented] (THRIFT-1772) Serialization does not check types of embedded structures.

2012-12-04 Thread Avi Flamholz (JIRA)
[ https://issues.apache.org/jira/browse/THRIFT-1772?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13510165#comment-13510165 ] Avi Flamholz commented on THRIFT-1772: -- Henrique -- I have a working and tested pat

Re: How should I implement multi-threaded clients and multi-threaded connections in C++?

2012-12-04 Thread Ben Craig
Thanks for the reply Jens. Here is what I think you are suggesting: service SlowRunner { i32 createOperation(), void slowOperation(1: i32 instanceID), } service SlowStopper { void stopEverything(1: i32 instanceID), } So with my interface, a client would call SlowClient::slowOperation() in

[jira] [Created] (THRIFT-1775) Java ignores default value(s) for unions

2012-12-04 Thread Jens Geyer (JIRA)
Jens Geyer created THRIFT-1775: -- Summary: Java ignores default value(s) for unions Key: THRIFT-1775 URL: https://issues.apache.org/jira/browse/THRIFT-1775 Project: Thrift Issue Type: Bug

[jira] [Updated] (THRIFT-1769) unions can't have required fields (C++)

2012-12-04 Thread Jens Geyer (JIRA)
[ https://issues.apache.org/jira/browse/THRIFT-1769?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jens Geyer updated THRIFT-1769: --- Patch Info: (was: Patch Available) Patch may need revision -> postponed. > union

[jira] [Updated] (THRIFT-1767) unions can't have required fields (Delphi)

2012-12-04 Thread Jens Geyer (JIRA)
[ https://issues.apache.org/jira/browse/THRIFT-1767?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jens Geyer updated THRIFT-1767: --- Attachment: (was: THRIFT-1767_unions_cant_have_required_fields.patch) > unions can't have re

[jira] [Updated] (THRIFT-1767) unions can't have required fields (Delphi)

2012-12-04 Thread Jens Geyer (JIRA)
[ https://issues.apache.org/jira/browse/THRIFT-1767?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jens Geyer updated THRIFT-1767: --- Attachment: THRIFT-1767_unions_cant_have_required_fields_Delphi - rev2.patch Revised patch: * Impor

[jira] [Updated] (THRIFT-1768) unions can't have required fields (Compiler)

2012-12-04 Thread Jens Geyer (JIRA)
[ https://issues.apache.org/jira/browse/THRIFT-1768?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jens Geyer updated THRIFT-1768: --- Attachment: THRIFT-1768_unions_cant_have_required_fields_Compiler - rev1.patch Revised patch: * wa

[jira] [Updated] (THRIFT-1768) unions can't have required fields (Compiler)

2012-12-04 Thread Jens Geyer (JIRA)
[ https://issues.apache.org/jira/browse/THRIFT-1768?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jens Geyer updated THRIFT-1768: --- Attachment: (was: THRIFT-1768_unions_cant_have_required_fields_Compiler.patch) > unions can

Re: How should I implement multi-threaded clients and multi-threaded connections in C++?

2012-12-04 Thread Jens Geyer
Hi Ben, just as an idea what I would be trying: 1. extract the implementation of slowOperation() and stopEverything() from the service into a dedicated class and make that one threadsafe. 2. if you need only one instance of this implementation class, make it a singleton or even a static cla

[jira] [Comment Edited] (THRIFT-1767) unions can't have required fields (Delphi)

2012-12-04 Thread Jens Geyer (JIRA)
[ https://issues.apache.org/jira/browse/THRIFT-1767?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13509975#comment-13509975 ] Jens Geyer edited comment on THRIFT-1767 at 12/4/12 9:27 PM: -

How should I implement multi-threaded clients and multi-threaded connections in C++?

2012-12-04 Thread Ben Craig
Suppose I have a .thrift spec similar to the following: service Slow { void slowOperation(), void stopEverything(), } When my application launches, my code will establish a connection with the server, and hold on to that connection for the lifetime of the app. When a user launches a dialog

[jira] [Commented] (THRIFT-1772) Serialization does not check types of embedded structures.

2012-12-04 Thread Henrique Mendonca (JIRA)
[ https://issues.apache.org/jira/browse/THRIFT-1772?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13509987#comment-13509987 ] Henrique Mendonca commented on THRIFT-1772: --- Thanks Avi, Although it might redu

[jira] [Commented] (THRIFT-1767) unions can't have required fields (Delphi)

2012-12-04 Thread Jens Geyer (JIRA)
[ https://issues.apache.org/jira/browse/THRIFT-1767?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13509975#comment-13509975 ] Jens Geyer commented on THRIFT-1767: I'm not so sure. {code} Union { 1 : i32 one,

[jira] [Commented] (THRIFT-1481) Unix domain sockets in C++ do not support the abstract namespace

2012-12-04 Thread Vlad Troyanker (JIRA)
[ https://issues.apache.org/jira/browse/THRIFT-1481?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13509947#comment-13509947 ] Vlad Troyanker commented on THRIFT-1481: +1 This is important to interoperate w

[jira] [Commented] (THRIFT-1481) Unix domain sockets in C++ do not support the abstract namespace

2012-12-04 Thread Ben Craig (JIRA)
[ https://issues.apache.org/jira/browse/THRIFT-1481?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13509818#comment-13509818 ] Ben Craig commented on THRIFT-1481: --- I should be able to provide a .patch for this once

[jira] [Commented] (THRIFT-1767) unions can't have required fields (Delphi)

2012-12-04 Thread Kenjiro Fukumitsu (JIRA)
[ https://issues.apache.org/jira/browse/THRIFT-1767?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13509816#comment-13509816 ] Kenjiro Fukumitsu commented on THRIFT-1767: --- I think default value for union's

[jira] [Updated] (THRIFT-1767) unions can't have required fields (Delphi)

2012-12-04 Thread Kenjiro Fukumitsu (JIRA)
[ https://issues.apache.org/jira/browse/THRIFT-1767?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Kenjiro Fukumitsu updated THRIFT-1767: -- Attachment: THRIFT-1767_union_clear_value_experimental.patch > unions can't have r

[jira] [Comment Edited] (THRIFT-1767) unions can't have required fields (Delphi)

2012-12-04 Thread Kenjiro Fukumitsu (JIRA)
[ https://issues.apache.org/jira/browse/THRIFT-1767?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13509799#comment-13509799 ] Kenjiro Fukumitsu edited comment on THRIFT-1767 at 12/4/12 3:30 PM: ---

[jira] [Commented] (THRIFT-1767) unions can't have required fields (Delphi)

2012-12-04 Thread Kenjiro Fukumitsu (JIRA)
[ https://issues.apache.org/jira/browse/THRIFT-1767?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13509799#comment-13509799 ] Kenjiro Fukumitsu commented on THRIFT-1767: --- I think it is nicer if union's pro

[jira] [Updated] (THRIFT-1750) Make compiler build cleanly under visual studio 10

2012-12-04 Thread Ben Craig (JIRA)
[ https://issues.apache.org/jira/browse/THRIFT-1750?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ben Craig updated THRIFT-1750: -- Attachment: (was: compiler_cleanup.patch) > Make compiler build cleanly under visual studio 10

[jira] [Updated] (THRIFT-1750) Make compiler build cleanly under visual studio 10

2012-12-04 Thread Ben Craig (JIRA)
[ https://issues.apache.org/jira/browse/THRIFT-1750?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ben Craig updated THRIFT-1750: -- Attachment: compiler_cleanup.patch Putting a newline at the end of platform.h that was accidentally om

[jira] [Updated] (THRIFT-1753) Multiple C++ Windows, OSX, and iOS portability issues

2012-12-04 Thread Ben Craig (JIRA)
[ https://issues.apache.org/jira/browse/THRIFT-1753?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ben Craig updated THRIFT-1753: -- Attachment: cleaner_port4.patch Same as last patch, but now starting the TFileTransport flush thread,

[jira] [Commented] (THRIFT-1768) unions can't have required fields (Compiler)

2012-12-04 Thread Kenjiro Fukumitsu (JIRA)
[ https://issues.apache.org/jira/browse/THRIFT-1768?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13509770#comment-13509770 ] Kenjiro Fukumitsu commented on THRIFT-1768: --- I think at the entrance of union's