how to design a scalable 'scheduler' app in erlang way
Oscar
ro4tub@REDACTED
Thu Aug 19 09:53:01 CEST 2010
hi all,
Here are the scheduler's requirements:
1. Scheduler should receive a lot of requests from other apps.
2. Scheduler should send the received requests to 'worker' apps.
3. Scheduler should determine when to send the received requests to
'worker' apps.
The strategy is:
a. A request depends on something, named *resource*.
b. When *resource* is idle, scheduler sends the request to one worker.
c. When *resource* is busy, scheduler stores the request.
4. Scheduler should be scalable, supporting about 1million tps.
I've implemented it in the shared-state way. TPS is about 100,000, and
'lock' consumes the most CPU time.
Now, I want to implement an erlang version, but have no idea about it.
Shall I store the resource status, pending request to ETS? Will ETS be
a bottleneck?
Thanks,
-Oscar
More information about the erlang-questions
mailing list