[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[dev-serveez] Avoiding code fork/duplication of serveez cfg code
From: |
Andreas Rottmann |
Subject: |
[dev-serveez] Avoiding code fork/duplication of serveez cfg code |
Date: |
26 Nov 2002 18:35:47 +0100 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
Hi!
As I already stated in a previous mail, I write a P2P load
distribution "grid" based on Serveez. The system supports different
*service* types, similiar as serveez supports different *server*
types.
Now I've come to the point where i want implement the configuration of
the services. I think I can use quite some parts of the Serveez's code
nearly unmodified (but can't use the original functions). The pieces
of code I've looked at so far are:
* svz_server_configure(), svz_config_free(): This would be usable as
is, if it didn't take a svz_servertype_t argument, but a instead a
stucture only containing the config-relevant members of
svz_servertype_t (prototype_{start|size}, items).
* the guile stuff regarding configuration (optionhash funcs): Haven't
had a deep look at that, but it seems pretty generic, too.
Well, I could now go forth and simply paste the good stuff into my
code, adapting it where I see the need. However, this would be mostly
code duplication, with all problems that are entangled with that.
Another option would be to re-write the config stuff of serveez for
greater generality, abstracting it, so it's not tied up so closely with
the servertype code. What i have in mind is an interface like that:
svz_config_t *svz_config_instantiate(svz_config_prototype_t *);
void svz_config_change(svz_config_t *, svz_config_modifier_t *);
...
That could then be used by the servertype code (probably retaining at
least a good deal of API compatibilty).
Before I start hacking serveez, I wanted to hear some comments (/me
goes to put flamethrower-resistant clothes on ;-)).
Regards, Andy
PS: As fort the guile stuff - I'll bring that up later, so be warned ;-)
--
Andreas Rottmann | address@hidden | address@hidden |
address@hidden
http://www.8ung.at/rotty | GnuPG Key: http://www.8ung.at/rotty/gpg.asc
Fingerprint | DFB4 4EB4 78A4 5EEE 6219 F228 F92F CFC5 01FD 5B62
- [dev-serveez] Avoiding code fork/duplication of serveez cfg code,
Andreas Rottmann <=
- Re: [dev-serveez] Avoiding code fork/duplication of serveez cfg code, Thien-Thi Nguyen, 2002/11/26
- Re: [dev-serveez] Avoiding code fork/duplication of serveez cfg code, Andreas Rottmann, 2002/11/26
- Re: [dev-serveez] Avoiding code fork/duplication of serveez cfg code, Thien-Thi Nguyen, 2002/11/26
- Re: [dev-serveez] Avoiding code fork/duplication of serveez cfg code, Andreas Rottmann, 2002/11/27
- Re: [dev-serveez] Avoiding code fork/duplication of serveez cfg code, Thien-Thi Nguyen, 2002/11/28
- Re: [dev-serveez] Avoiding code fork/duplication of serveez cfg code, Andreas Rottmann, 2002/11/28
- Re: [dev-serveez] Avoiding code fork/duplication of serveez cfg code, Thien-Thi Nguyen, 2002/11/28
Re: [dev-serveez] Avoiding code fork/duplication of serveez cfg code, stefan, 2002/11/26