PennMUSH Community

Ticket #7313 (new suggested feature)

Opened 2 years ago

Last modified 2 years ago

info_slave redo

Reported by: raevnos Assigned to: raevnos
Priority: minor Milestone:
Keywords: Cc:
Visibility: Public

Description

info_slave does one lookup at a time. So, if you have someone with an ISP with broken DNS that takes a while to do a reverse lookup, anyone else connecting at that time is left hanging until it times out.

I'm thinking about having info_slave fork off a child for each lookup instead, within some sane limit. The code's about 95% done in my head, along with some refactoring and general cleanup of it and the ident code.

Alternatively: Use threads for DNS lookups. (Penn's use of signals conflicts with the old linuxthreads pthreads implementation; I'm not sure if that's the case with its replacement...)

Change History

(follow-up: ↓ 2 ) 05/02/07 00:05:06 changed by intrevis

If the threads are running in info_slave though, it shouldn't matter what Penn does with signals, right?

(in reply to: ↑ 1 ) 05/03/07 17:25:23 changed by raevnos

Replying to intrevis:

If the threads are running in info_slave though, it shouldn't matter what Penn does with signals, right?

No, I was thinking of doing the lookups in Pennmush threads and not have a totally separate process for it.

05/16/07 23:04:14 changed by raevnos

info_slave communication is now done with datagrams, and it'll fork off up to 5 concurrent child processes to handle that many lookups at once. Just using datagrams instead of streams cleaned up a lot of code. Some other cleanup crept in. New files: hdrs/lookup.h, hdrs/wait.h, src/info_master.c, src/wait.c

Right now, you need socketpair() to use info_slave, but I'm about 99.9% sure it's present on every system you can use info_slave on anyways (IE, not Windows).

Next idea: Optionally use a local socket with a filesystem entry (Unlike the ones returned by socketpair()). If multiple games use the same socket file, run only one instance of info_slave serving them all.