• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Client/Server guidance
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Client/Server guidance


  • Subject: Re: Client/Server guidance
  • From: Ondra Cada <email@hidden>
  • Date: Tue, 15 Oct 2002 14:28:20 +0200

On Tuesday, October 15, 2002, at 11:50 , Terry Smyth wrote:

I'm writing a Cocoa application which will normally run in a server environment (it's mostly a configuration front end to configure data required by another server process). I'd like to allow the user to run my app from his desktop Mac, rather from some noisy server room. I'm wondering what is the easiest way to achieve this separation of UI from underlying functionality.

My research is pointing me towards a client/server architecture, built around Distributed Objects, where a vended server object controls the data, and passes it to the clients for display and update. Does this sound like the right approach?

Yup.

Is there an easier way achieve what I want. (I recall that under Motif/X11, you can just set the DISPLAY variable to any other machine, then launch the app on the server, but with a remote UI. I don't suppose there is anything like this under Cocoa??)

There always used to be, whilst Cocoa was OpenStep -- the argument was -NSHost. Alas Apple seen fit to trash this great feature (along with a number of other ones), so oops :(((

Another trashed feature you need to be aware of is that the host: argument when connecting NSConnections no more works! You have to find the server yourself.

Assuming DO is the way forward, I have a couple of further questions.
I'd love to get my hands on some sample code, but could not find any in the usual places. Does anyone know where I could find some?

Seems to be some, though I haven't checked the contents:

28 /Developer/Examples> find . -name '*.[hm]' -print0 | xargs -0 fgrep -l NSConnection
./Foundation/Authenticator/Authenticator.h
./Foundation/Authenticator/Authenticator.m
./Foundation/Authenticator/Authenticator_main.m
./Foundation/MultiThreadedDO/MultiThreadedDO_main.m
29 /Developer/Examples>

Also, what is the recommended way to deal with Authorization/Authentication in a DO context. I'm familiar with the AuthTool sample, whereby the authorization API prompts the user for a password if required. What happens if the server part of my app requires some authorization (which would need to be entered at the client side)? Is there a mechanism to deal with this?

I am not aware of anything else than just using DO to communicate passwords etc. between client and server.
---
Ondra Cada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
References: 
 >Client/Server guidance (From: Terry Smyth <email@hidden>)

  • Prev by Date: Re: How to avoid a Windows interface on OS X?
  • Next by Date: Re: How to avoid a Windows interface on OS X?
  • Previous by thread: Client/Server guidance
  • Next by thread: NSTableColumn resize
  • Index(es):
    • Date
    • Thread