Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
I'm just answering because I'm in an extremely boring lecture. But here are the two first results when I googled "writing a deamon os x":
  1. Technical Note TN2083 titled "Daemons and Agents"
  2. System Startup Programming Topics
And as a bonus I give you a link to the manpage for launchd

By the way, if you're already too lazy to use google, at least give us more information (operating system & version, language and anything else you think might be important) and what you want to use it for - launchd is available for OS X 10.4 and above, so if you wan't to run your app on older systems, you'll need to find a different solution (think it was called startup items?).
 
Hi

Thanks !! Since I am coming from Microsoft background things are little bit hard to capture the things.


I am using Mac OS version of 10.6.5 and what I am trying to achieve is, I want to run a service (Daemon) which should listen for some message from my client based on the message it has to act (Async). The Daemon has to start it self when ever system boots up.

I am planning to use Distributed Objects to pass the data between Client and Server.

Can you please guide me?

Thanks
Siva
 
First, you should read the documentation I linked to (especially the technote). It will probably answer a lot of your questions. I don't think anyone will give you a step for step guide, since it would take a lot of time. The apple docs are really good (at least I think so) and if anything is unclear, post your question and I'm sure there will be a lot of people willing to help you.
Some more links:
All About launchd Items (and How To Make One Yourself)
launchd examples
Tutorial: Backups with launchd.
 
There's the web services core which provides a C API for accessing web services if I'm not mistaken. You might want to look at WSDL2ObjC which will create Objective-C code from a WSDL file.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.