From: Torbjorn T. <to...@no...> - 2004-11-03 23:35:33
|
ch...@uc... wrote: >i've written a piece of software (a server that runs on top of http) >as erlang code embedded in a yaws file, and it works pretty well >except for occasional timeouts. i profiled the code, and noticed that >it was spending 80 percent of its time reading a fairly simple >disk-based index into memory. this is obviously inefficient (but i was >prototyping). > >my question is how exactly to load the index into memory at yaws >startup, and how then from index.yaws to query it. looking at the yaws >startup options, i see this: > >-r mod -- call mod:start/0 at startup > > Yes. >if this is the correct way to go about it, what exactly do i do at >yaws startup, how do i talk to this other process from yaws, and what >exactly do i load from disk in order to get this other process going? >as i said, these are newbie questions. any help would be greatly >appreciated. > > > Check out ets, dets and mnesia to decide what is suitable in your case. Cheers, Tobbe |