1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 3.2//EN">
4 <TITLE> [IRCServices Coding] get_nickinfo like functions suggestion
6 <LINK REL=
"Index" HREF=
"index.html" >
7 <LINK REL=
"made" HREF=
"mailto:ircservices-coding%40ircservices.za.net?Subject=%5BIRCServices%20Coding%5D%20get_nickinfo%20like%20functions%20suggestion&In-Reply-To=">
8 <META NAME=
"robots" CONTENT=
"index,nofollow">
9 <META http-equiv=
"Content-Type" content=
"text/html; charset=us-ascii">
10 <LINK REL=
"Previous" HREF=
"002091.html">
11 <LINK REL=
"Next" HREF=
"002089.html">
13 <BODY BGCOLOR=
"#ffffff">
14 <H1>[IRCServices Coding] get_nickinfo like functions suggestion
</H1>
16 <A HREF=
"mailto:ircservices-coding%40ircservices.za.net?Subject=%5BIRCServices%20Coding%5D%20get_nickinfo%20like%20functions%20suggestion&In-Reply-To="
17 TITLE=
"[IRCServices Coding] get_nickinfo like functions suggestion">griever at t2n.org
19 <I>Tue Jun
24 14:
59:
10 PDT
2003</I>
21 <LI>Previous message:
<A HREF=
"002091.html">[IRCServices Coding] Building ircservices
5.0.20 on OpenBSD
24 <LI>Next message:
<A HREF=
"002089.html">[IRCServices Coding] get_nickinfo like functions suggestion
26 <LI> <B>Messages sorted by:
</B>
27 <a href=
"date.html#2088">[ date ]
</a>
28 <a href=
"thread.html#2088">[ thread ]
</a>
29 <a href=
"subject.html#2088">[ subject ]
</a>
30 <a href=
"author.html#2088">[ author ]
</a>
36 After discussing mysql module design it occurred to me that it would make
38 caching database module for mysql much easier if the get_ functions had
42 I figure that if we create functions like get_readonly_nickinfo, it would
44 for more efficient caching of data. The reasoning behind this is that
46 which modify a nick/channel/nickgroup need to have a more updated version
48 data in order to figure out whether it can be modified the way it wants to.
50 On the other hand, many functions that only read from these pieces of data
51 would not have to have the most recent version and could use the cached
53 since it would cause little harm to simply display out-of-date information
56 If we cached all pieces of data (including read-write), then it would
58 that either the data in the database would be locked for too long and no
60 program could ever modify it, or if we didn't lock the entries in the
62 we would end up overwriting any changes another program made once we
66 So basically I propose creating database functions using names like
68 or get_readonly_chaninfo, which would be used by commands such as INFO,
70 AKICK LIST, AKILL LIST, and for determining access etc. The regular
72 functions would retain the same functionality for backwards compatibility
76 These new get_readonly_* (or if you want, get_cache_*) would be implemented
78 that cache nick information in memory. In modules where either a)
80 read from database on get_* or b) all information is always in memory, they
82 synonyms for the regular get_* functions (i.e. in version4, they would be
85 The info returned by these functions would generally not be modified (save
87 that aren't saved to database such as the locked field) and wouldn't be
89 put_* functions. Also, it would be a bad idea to use the info returned from
91 readonly/cache functions to conditionally modify other data (example, you
93 use these functions to check someone's access so that they could change
95 since another program could recently have removed them from the access list
97 us knowing it. It would be safe however to check someone's access to join
99 use INVITE UNBAN OP etc, because that doesn't involve changing the
102 If I seem to be spouting gibberish, by all means ask me to clarify.
109 <LI>Previous message:
<A HREF=
"002091.html">[IRCServices Coding] Building ircservices
5.0.20 on OpenBSD
112 <LI>Next message:
<A HREF=
"002089.html">[IRCServices Coding] get_nickinfo like functions suggestion
114 <LI> <B>Messages sorted by:
</B>
115 <a href=
"date.html#2088">[ date ]
</a>
116 <a href=
"thread.html#2088">[ thread ]
</a>
117 <a href=
"subject.html#2088">[ subject ]
</a>
118 <a href=
"author.html#2088">[ author ]
</a>