Re: Distributed Objects

2012-08-27 Thread Kirk
This may be true now. Historically there have been runloop-dependent functionalities that would not work correctly if started in applicationDidFinishLaunching: . To avoid hair-tearing I just always define an applicationDidBeginRunLoop: method that is invoked by a zero-delay perform launched f

Re: Distributed Objects

2012-08-27 Thread Kyle Sluder
On Mon, Aug 27, 2012, at 10:40 AM, Kirk wrote: > There isn't a run loop running yet at applicationDidFinishLaunching:. > > Defer your code with performSelector: afterDelay:0 While this is true, the very next thing after -applicationDidFinishLaunching: will be NSApplication calling [[NSRunLoop cur

Re: Distributed Objects

2012-08-27 Thread Kirk
There isn't a run loop running yet at applicationDidFinishLaunching:. Defer your code with performSelector: afterDelay:0 Kirk Kerekes (iPhone) ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comm

Re: Distributed Objects

2012-08-27 Thread Gerriet M. Denkmann
On 27 Aug 2012, at 23:40, Kyle Sluder wrote: > On Aug 27, 2012, at 9:35 AM, "Gerriet M. Denkmann" > wrote: > >> >> You are right. Now have: >> NSMachPort *sendPort = (NSMachPort *)[ NSMachPort port ]; >> but still the same. >> >> It seems that everything works as expected on 10.6.8 >

Re: Distributed Objects

2012-08-27 Thread Gerriet M. Denkmann
On 27 Aug 2012, at 23:40, Kyle Sluder wrote: > On Aug 27, 2012, at 9:35 AM, "Gerriet M. Denkmann" > wrote: > >> >> You are right. Now have: >> NSMachPort *sendPort = (NSMachPort *)[ NSMachPort port ]; >> but still the same. >> >> It seems that everything works as expected on 10.6.8 >

Re: Distributed Objects

2012-08-27 Thread Kyle Sluder
On Aug 27, 2012, at 9:35 AM, "Gerriet M. Denkmann" wrote: > > You are right. Now have: > NSMachPort *sendPort = (NSMachPort *)[ NSMachPort port ]; > but still the same. > > It seems that everything works as expected on 10.6.8 Hmm. You're not sandboxed, are you? If you are, are you gettin

Re: Distributed Objects

2012-08-27 Thread Gerriet M. Denkmann
On 27 Aug 2012, at 23:17, Kyle Sluder wrote: > On Aug 27, 2012, at 9:10 AM, "Gerriet M. Denkmann" > wrote: > >> >> On 27 Aug 2012, at 22:49, Kyle Sluder wrote: >> >>> On Aug 27, 2012, at 8:23 AM, "Gerriet M. Denkmann" >>> wrote: >>> "new" is documented as "Allocates a new ins

Re: Distributed Objects

2012-08-27 Thread Kyle Sluder
On Aug 27, 2012, at 9:10 AM, "Gerriet M. Denkmann" wrote: > > On 27 Aug 2012, at 22:49, Kyle Sluder wrote: > >> On Aug 27, 2012, at 8:23 AM, "Gerriet M. Denkmann" >> wrote: >> >>> >>> "new" is documented as "Allocates a new instance of the receiving class, >>> sends it an init message, an

Re: Distributed Objects

2012-08-27 Thread Gerriet M. Denkmann
On 27 Aug 2012, at 22:49, Kyle Sluder wrote: > On Aug 27, 2012, at 8:23 AM, "Gerriet M. Denkmann" > wrote: > >> >> "new" is documented as "Allocates a new instance of the receiving class, >> sends it an init message, and returns the initialized object." > > Except, you know, the part wher

Re: Distributed Objects

2012-08-27 Thread Kyle Sluder
On Aug 27, 2012, at 8:23 AM, "Gerriet M. Denkmann" wrote: > > "new" is documented as "Allocates a new instance of the receiving class, > sends it an init message, and returns the initialized object." Except, you know, the part where -[NSConnection init] is documented to do anything useful. W

Re: Distributed Objects

2012-08-27 Thread Gerriet M. Denkmann
On 27 Aug 2012, at 22:02, Kyle Sluder wrote: > On Mon, Aug 27, 2012, at 04:53 AM, Gerriet M. Denkmann wrote: >> When I set up my server like: >>NSConnection *theConnection = [[NSConnection alloc] init]; > > Also, the designated initializer for NSConnection is > -initWithReceivePort:sendPort

Re: Distributed Objects

2012-08-27 Thread Kyle Sluder
On Mon, Aug 27, 2012, at 04:53 AM, Gerriet M. Denkmann wrote: > When I set up my server like: > NSConnection *theConnection = [[NSConnection alloc] init]; Also, the designated initializer for NSConnection is -initWithReceivePort:sendPort:. I have no idea what behavior -init has. --Kyle Sluder

Re: Distributed Objects

2012-08-27 Thread Gerriet M. Denkmann
On 27 Aug 2012, at 21:47, Kyle Sluder wrote: > On Mon, Aug 27, 2012, at 04:53 AM, Gerriet M. Denkmann wrote: >> The documentation says: >> >> " In the main thread of an application based on the Application Kit, the >> run loop is already running, so there is nothing more to do to vend an >> obj

Re: Distributed Objects

2012-08-27 Thread Kyle Sluder
On Mon, Aug 27, 2012, at 04:53 AM, Gerriet M. Denkmann wrote: > The documentation says: > > " In the main thread of an application based on the Application Kit, the > run loop is already running, so there is nothing more to do to vend an > object. In a secondary thread or an application that does

Re: Distributed Objects

2012-08-27 Thread Gerriet M. Denkmann
On 27 Aug 2012, at 21:31, Gary L. Wade wrote: > On Aug 27, 2012, at 4:53 AM, "Gerriet M. Denkmann" > wrote: > >> In the main thread of an application based on the Application Kit… > > In other words, do you call NSApplicationMain in your function main on your > server app? If not, then in a

Re: Distributed Objects

2012-08-27 Thread Gary L. Wade
On Aug 27, 2012, at 4:53 AM, "Gerriet M. Denkmann" wrote: > In the main thread of an application based on the Application Kit… In other words, do you call NSApplicationMain in your function main on your server app? If not, then in a simplistic answer, your app is not based on AppKit. -- Gary L

Re: Distributed Objects communication with a launchd "on-demand" daemon

2009-12-17 Thread Jens Alfke
On Dec 17, 2009, at 8:50 AM, Kyle Sluder wrote: > Instead, define some on-the-wire serialization format (plists work in the > simple case) and use that to communicate. #include_plug_for_my_library Seriously, you don't want to reinvent t

Re: Distributed Objects communication with a launchd "on-demand" daemon

2009-12-17 Thread Kyle Sluder
On Dec 16, 2009, at 8:05 PM, Frank Rizzo wrote: I am trying to create a launchd daemon that is started "on-demand" by a client call to a TCP port number and then communicate with the client via Distributed Objects. Experience is telling me to advise you not to use DO. Instead, define

Re: Distributed Objects communication with a launchd "on-demand" daemon

2009-12-17 Thread Jens Alfke
On Dec 16, 2009, at 8:05 PM, Frank Rizzo wrote: > I am trying to create a launchd daemon that is started "on-demand" by a > client call to a TCP port number and then communicate with the client via > Distributed Objects. I would advise against this. IMHO it only makes sense to use DO if both sid

Re: Distributed Objects in Foundation Tool [SOLVED]

2009-09-06 Thread Luke Evans
OK, it turns out that my first lemma didn't hold. My connection object was not a good one (having an incorrect remote port). This (thankfully) had nothing to do with run loops or other flora and fauna. On 2009-09-06, at 5:28 PM, Luke Evans wrote: Mmm... I can see a run loop running on the

Re: Distributed Objects in Foundation Tool [adjunct]

2009-09-06 Thread Luke Evans
Mmm... I can see a run loop running on the stack of the main thread of my frozen app when it is trying to obtain the proxy. So, I'm guessing that I don't have to do anything special to get the right run loop apparatus on the thread - it looks like the call to - [NSConnection rootProxy] knows h

RE: Distributed Objects via Bonjour?

2009-05-08 Thread Kirk Kerekes
Good DO demo code is rather scarce, and the best-practices are highly dependent on the target OS. For one example showing about every permutation imaginable, and a little-recognized simplified Bonjour strategy, try: The demo

Re: Distributed Objects question

2009-02-10 Thread Allyn Bauer
Thanks for the response Ken. Do you have any online resources that outline details regarding a communication protocol? Neither of the books I have discuss it, and I'm having trouble finding a good online resource. I usually work best with example code, so if that is all that is available, I'd reall

Re: Distributed Objects question

2009-02-09 Thread Ken Thomases
On Feb 9, 2009, at 4:33 PM, Allyn Bauer wrote: Hey all, I've got a fairly simple server <-> client app in development. The clients need to be able to communicate with the server and the server needs to be able to communicate with the clients. So far I've got the clients getting a NSMutableArray

Re: Distributed Objects

2009-01-22 Thread I. Savant
On Jan 21, 2009, at 11:21 PM, Michael Ash wrote: I'm sure we're all dying to know, are there actually two people with that exact same name and e-mail address, or what? Well ... sort of. http://en.wikipedia.org/wiki/Two-Face -- I.S. ___ Coc

Re: Distributed Objects

2009-01-21 Thread Michael Ash
On Wed, Jan 21, 2009 at 6:30 PM, David Blanton wrote: > On Jan 21, 2009, at 3:15 PM, David Blanton wrote: > >> Are distributed objects analogous to OCX in Windows? > > Of couse they are you idiot! > > In fact, since the Objective-c runtime is what supports distributed objects > and since Objective

Re: Distributed Objects

2009-01-21 Thread David Blanton
Of couse they are you idiot! In fact, since the Objective-c runtime is what supports distributed objects and since Objective-c runtime was around before OCX it is actually true that OCX is analogous to distributed objects! Voila! Another smash for NeXT / Apple against Windows! On Jan 21,

Re: Distributed Objects with Garbage Collection (on PPC)

2008-12-15 Thread Tony Parker
Hi John, The bug you're referring to (a problem with NSSocketPort and GC) should be fixed in 10.5.5. Thanks, - Tony Parker Cocoa Frameworks On Dec 13, 2008, at 12:46 PM, John Pannell wrote: Hi Bridger- I had precisely the same issue some months ago, and wrote to this list. I did get a

Re: Distributed Objects with Garbage Collection (on PPC)

2008-12-13 Thread John Pannell
Hi Bridger- I had precisely the same issue some months ago, and wrote to this list. I did get a response off-list from an Apple engineer that mentioned that this was a known problem and there was no workaround at present. Not sure if things have changed since then (although perhaps they

Re: Distributed Objects with Garbage Collection (on PPC)

2008-12-13 Thread Bill Bumgarner
On Dec 13, 2008, at 11:26 AM, Bridger Maxwell wrote: Everything seems to work on Intel, it is on PPC that we have the problems. When we first make the connection to the server, we can message the remote object just fine. It is when we try to message the distant object at later times that we

Re: Distributed objects and core data

2008-12-05 Thread Steve Steinitz
Hi Jason, On 5/12/08, Jason Cox <[EMAIL PROTECTED]> wrote: Is it possible to use distributed objects with core data on a server app to get a multi client application working? I've gathered together a set of DO sample apps toward a similar idea. My plan is for the machines to share a core d

Re: Distributed Objects invocation dispatch not thread safe??

2008-11-15 Thread Dave Cox
I have since written and tested a 'peer' program in addition to the client/server pair I previously described. I run serveral instances of this peer program. Each peer is a server in the sense that it vends an object as the root of an NSConnection and runs several threads to accept remote cal

Re: Distributed Objects Performance

2008-11-14 Thread Seth Willits
On Nov 14, 2008, at 2:40 AM, Jean-Daniel Dupas wrote: I would be curious to know how you reached 50MB/sec on a LAN that has a theorical limit of 12.5MB/sec. That's a good question, now that I think about it. :-p Apparently I *am* plugged into the gigabit switch... Either way, any self-res

Re: Distributed Objects Performance

2008-11-14 Thread Jean-Daniel Dupas
Le 14 nov. 08 à 10:47, Seth Willits a écrit : On Nov 13, 2008, at 11:33 PM, Bridger Maxwell wrote: How often? 60 times per second often? Once per second often? Every minute, often? You'll need to calculate the amount of data you're expecting to transfer, worst case. I would say about

Re: Distributed Objects Performance

2008-11-14 Thread Seth Willits
On Nov 13, 2008, at 11:33 PM, Bridger Maxwell wrote: How often? 60 times per second often? Once per second often? Every minute, often? You'll need to calculate the amount of data you're expecting to transfer, worst case. I would say about every five seconds often, max. My gut instinct

Re: Distributed Objects Performance

2008-11-13 Thread Bridger Maxwell
> > > How often? 60 times per second often? Once per second often? Every minute, > often? > > You'll need to calculate the amount of data you're expecting to transfer, > worst case. > I would say about every five seconds often, max. The problem is, once I have a worst case scenario calculated (whi

Re: Distributed Objects Performance

2008-11-13 Thread Seth Willits
On Nov 13, 2008, at 9:26 PM, Bridger Maxwell wrote: However, values would be changed quite often. How often? 60 times per second often? Once per second often? Every minute, often? You'll need to calculate the amount of data you're expecting to transfer, worst case. -- Seth Willits

Re: Distributed Objects Performance

2008-11-13 Thread Seth Willits
On Nov 13, 2008, at 9:26 PM, Bridger Maxwell wrote: However, values would be changed quite often. How often? 60 times per second often? Once per second often? Every minute, often? You'll need to calculate the amount of data you're expecting to transfer, worst case. -- Seth Willits

Re: Distributed Objects Performance

2008-11-13 Thread Kyle Sluder
On Fri, Nov 14, 2008 at 12:26 AM, Bridger Maxwell <[EMAIL PROTECTED]> wrote: > So, do you think distributed objects is the right solution? Is there a > rule of thumb on network traffic size or maximum number of clients > distributed objects can support? You really need to sit down with the numbers

Re: Distributed objects NSURL is always encoded as proxy? is this a bug?

2008-09-13 Thread Marc Van Olmen
Thanks for the thought Ken. It was causing an invocation. That's why I tested for Proxy didn't look at the class, in the debugger, because gdb couldn't resolve the class, when i was trying it. cheers, marc On Sep 13, 2008, at 5:27 PM, Ken Thomases wrote: On Sep 13, 2008, at 11:12 AM, Marc V

Re: Distributed objects NSURL is always encoded as proxy? is this a bug?

2008-09-13 Thread Ken Thomases
On Sep 13, 2008, at 11:12 AM, Marc Van Olmen wrote: It is always a proxy object... I'm wondering if there is some kind of exception with NSURL? Have you checked with a debugger what the real class (the isa pointer) of the object is? Just because it's a proxy doesn't mean it's an NSDistan

Re: Distributed Objects, NSFileHandle and file transfer

2008-08-06 Thread Ken Thomases
On Aug 6, 2008, at 4:07 AM, Gert Andreas wrote: Using NSData and sending a file at once doesn't work as you need to allocate too much memory for large files. So i made an attempt using distributed objects and vending the NSFileHandle from to file on the client side to the server. - (void)se

Re: Distributed Objects "connection went invalid while waiting for a reply"

2008-08-01 Thread Hamish Allan
On Fri, Aug 1, 2008 at 1:02 AM, Chris Suter <[EMAIL PROTECTED]> wrote: > The reason you're seeing the error is because as soon as you receive the > response in your client, you're printing it and terminating the application > but the server is expecting a response (even though the method has a voi

Re: Distributed Objects "connection went invalid while waiting for a reply"

2008-07-31 Thread Chris Suter
Hi Hamish, On Thu, Jul 31, 2008 at 10:16 PM, Hamish Allan <[EMAIL PROTECTED]> wrote: > On Tue, Jul 29, 2008 at 3:33 AM, Chris Suter <[EMAIL PROTECTED]> wrote: > > > It sounds to me like you've got some kind of timing issue and that the > delay > > that you're adding is merely hiding the true caus

Re: Distributed Objects "connection went invalid while waiting for a reply"

2008-07-31 Thread Hamish Allan
Hi Chris, On Tue, Jul 29, 2008 at 3:33 AM, Chris Suter <[EMAIL PROTECTED]> wrote: > It sounds to me like you've got some kind of timing issue and that the delay > that you're adding is merely hiding the true cause of the problem. Are you > able to post a simple test case that displays the problem

Re: Distributed Objects "connection went invalid while waiting for a reply"

2008-07-28 Thread Chris Suter
Hi Hamish, On Tue, Jul 29, 2008 at 7:35 AM, Hamish Allan <[EMAIL PROTECTED]> wrote: > For anyone searching the archives for "connection went invalid while > waiting for a reply": > > I never found out why this message was appearing, but I found a workaround. > > Instead of calling [client callbac

Re: Distributed Objects "connection went invalid while waiting for a reply"

2008-07-28 Thread Hamish Allan
For anyone searching the archives for "connection went invalid while waiting for a reply": I never found out why this message was appearing, but I found a workaround. Instead of calling [client callbackWithArgument:arg], call [client performSelector:@selector(callbackWithArgument:) withObject:arg

Re: Distributed Objects "connection went invalid while waiting for a reply"

2008-07-09 Thread Hamish Allan
Hi Ken, Thanks for your reply. I already had NSZombieEnabled, so no help there, but the Object Allocations Instrument highlighted that -[NSConnection invalidate] was being called; a breakpoint on that revealed the following trace for thread 2: #0 0x91b1f916 in -[NSConnection invalidate] #1

Re: Distributed Objects "connection went invalid while waiting for a reply"

2008-07-09 Thread Hamish Allan
On Wed, Jul 9, 2008 at 10:14 AM, Mike Bellerby <[EMAIL PROTECTED]> wrote: > I use DOs on 10.3, 10.4 and 10.5. They work correctly on all versions. From > your description I'm not entirely sure what you are trying to do. Could you > post a code example and I try to help. Thanks, Mike. Will do -- I

Re: Distributed Objects "connection went invalid while waiting for a reply"

2008-07-09 Thread Ken Thomases
On Jul 9, 2008, at 10:53 AM, Brad Gibbs wrote: Is Distributed Objects still the preferred method for communicating among computers on a local network? It's been hinted that DO may be deprecated in the not-so-distant future. I've seen and heard comments from Apple that Distributed Objects

Re: Distributed Objects "connection went invalid while waiting for a reply"

2008-07-09 Thread Brad Gibbs
Is Distributed Objects still the preferred method for communicating among computers on a local network? It's been hinted that DO may be deprecated in the not-so-distant future. When I asked about DO recently, I was pushed in the direction of Jens Alfke's Blip. Thanks. On Jul 9, 2008,

Re: Distributed Objects "connection went invalid while waiting for a reply"

2008-07-09 Thread Mike Bellerby
I use DOs on 10.3, 10.4 and 10.5. They work correctly on all versions. From your description I'm not entirely sure what you are trying to do. Could you post a code example and I try to help. Cheers Mike On 9 Jul 2008, at 01:11, Hamish Allan wrote: I'm seeing "connection went invalid while

Re: Distributed Objects "connection went invalid while waiting for a reply"

2008-07-09 Thread Ken Thomases
On Jul 8, 2008, at 7:11 PM, Hamish Allan wrote: I'm seeing "connection went invalid while waiting for a reply" in a DO callback. The client passes self in a call to the server; some time later, the server calls a method on that client (proxy), the program hangs for a second or so, the "connectio

Re: Distributed Objects/NSConnection dying under 10.4

2008-05-27 Thread Mark Munz
The Server app only has a single thread. I tried calling enableMultipleThreads just in case (fingers were crossed), but that didn't appear to change the results. The connection still just dies. Mark Munz On 5/27/08, Donald Lamar Davis II <[EMAIL PROTECTED]> wrote: > Are you running a multi-thread

Re: Distributed Objects NSPortTimeoutException

2008-03-17 Thread Tony Parker
Hello, If you just cut & paste the code from 'main' in the chatterd server, I would double-check that your connection and root object are being retained properly in your AppController. For example, make sure 'monitor', 'connection', 'chatterServer', and 'receivePort' are not autoreleased

Re: Distributed Objects NSPortTimeoutException

2008-03-17 Thread Mac QA
On Mon, Mar 17, 2008 at 8:15 AM, John Pannell <[EMAIL PROTECTED]> wrote: > I was on Leopard and using garbage collection. Unfortunately this problem is occurring on Tiger. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin

Re: Distributed Objects NSPortTimeoutException

2008-03-17 Thread John Pannell
Hi there- This may or may not apply to your situation, but I had an incident a few weeks ago in which I could not get DO to work with communication between machines using NSSocketPorts. I was on Leopard and using garbage collection. When I posted to the list, I received a response from