I am trying to make a calendar/meeting program for my office. It needs to allow anyone to see their/another user's calendar, and it needs to find the earliest time that a group of people can all have a meeting. And then send them a popup message confirming they can make it, and finally creating that event. I am writing this in java because I am retarded and can't into haskell.
I have some questions on how I should setup the server.
1. Should I keep each persons calendar in a separate file? or keep all the events in one file and have a userid for each event?
2. How do you deal with updating when a program is already running?
3. How do you stop two people from writing to a file at the same time and knowing that you have the most recent file?
Thanks
Name:
Anonymous2011-02-15 23:35
Read SICP
Name:
Anonymous2011-02-16 0:13
Yikes. Multiple users sharing one file?
Best best: run a web server, store it there.
1. If you really have to share files, each user gets their own file. Each local program scans the directory for each user and can compare it with the individuals data.
2. As long as the program is 100% dependent on the user files, put the program itself in the shared directory too. Put it in the startup folder(assuming your a win fag) and the program automatically updates at each boot. Just override with each update.
3. See 1
Name:
Anonymous2011-02-16 0:21
>>3
so what would I do when I need to calculate the open times? put all the events in some type of file structure and sort there?
>>1 1. Should I keep each persons calendar in a separate file? or keep all the events in one file and have a userid for each event?
Multiple files might be easier. 2. How do you deal with updating when a program is already running?
What do you mean, read or write accessing? 3. How do you stop two people from writing to a file at the same time and knowing that you have the most recent file?
File lock, i dont know java so i dont know the function name.
Why reinvent the wheel??
Someone has something like this written already. Modify it to suit your unique needs if you have to.
Name:
Ron2011-02-17 15:59
>>8
Well if one person adds an event to their calendar, how will the other users know this? I would probably need to update the calendar files for each user, and then refresh the interface. Or maybe just update every 5 minutes or something