Higher level abstraction on select() 
Author Message
 Higher level abstraction on select()

Hello all, I've developed a python module (in Python) to make somewhat
higher abstraction over select.select(). The package is called
"selecting". The package is somewhat similar to asyncore, but has many
advantages over it:

- It's made in OO fashion, so that one may use _both_ select managers
_and_ threads (asyncore uses globals, making it impossible to have many
select managers);

- Event queues, which allow you to schedule events that should happen
sometime in the future (nicely synced with select())

- Channel interfaces. It's possible to make many different channels as
long as they have a fd to select() on; with this, you can implement, for
example, inter-thread locking with pipes.

- Some support for TKinter (mostly untested)

- Simpler buffering scheme, which makes it unnecessary to use unblocking
fd's, and might even give some speed

- No exception handling (I found exception packing of asyncore to be a
real nuisance)

- Clearer (?) division of responsibility: the API of channel handlers,
etc.  (asyncore puts part of message handling into the socket wrapper)

The package is available for inspecting at
http://www.*-*-*.com/ ~atehwa-u/selecting-0.8/   and
http://www.*-*-*.com/ ~atehwa-u/selecting-0.8.tar.gz

The package is quite well tested and has been used to build ircd-style
daemons, but more testing and comments are always welcome. Especially I'd
like to see the following to be included in the package in the future:

- Good connectivity to TKinter. This would make TKinter one channel in a
select manager, not a special select manager that registers channels to
TKinter. The current solution is bad because it means slightly different
API for TKSelectManager from SelectManager and because TKinter's fd
handling API is insufficient for handling all situations.

- More channel types to provide, for example, Linda for a couple of
threads via selecting.

- Protocol modules for to use as ready channel handlers.

- Buffered channels with many queues with different throughput priority.

But especially, I'd like everybody to try the package out and tell me
what they think of it. I think the module should be included in the
standard Python distribution, if there's not already something better
than asyncore.

Panu Kalliokoski



Sun, 16 Nov 2003 18:02:32 GMT  
 Higher level abstraction on select()

Quote:
> http://sange.fi/~atehwa-u/selecting-0.8.tar.gz

I'm eager to try it, but the file above is not there.

--

http://pobox.com/~jdf



Mon, 17 Nov 2003 03:05:29 GMT  
 Higher level abstraction on select()

Quote:


>> http://sange.fi/~atehwa-u/selecting-0.8.tar.gz
> I'm eager to try it, but the file above is not there.

Hm? Interesting. Works all right for me. Of course, it could be that you
tried just at the moment when I rebuilt the .tar.gz. Does the directory
(http://sange.fi/~atehwa-u/selecting-0.8/) work?

Panu Kalliokoski



Mon, 17 Nov 2003 17:22:42 GMT  
 Higher level abstraction on select()

Quote:


> >> http://sange.fi/~atehwa-u/selecting-0.8.tar.gz
> > I'm eager to try it, but the file above is not there.

> Hm? Interesting. Works all right for me. Of course, it could be that you
> tried just at the moment when I rebuilt the .tar.gz. Does the directory
> (http://sange.fi/~atehwa-u/selecting-0.8/) work?

No.  However, the tar files are there now.  I have just downloads
0.85, assuming that to be more recent.

--

http://pobox.com/~jdf



Fri, 21 Nov 2003 01:01:01 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. High Level ASM and Low Level ASM

2. Abstraction facilities and source-level optimizations

3. Information on Verilog levels of abstraction required !!!

4. expert programmers know how to choose the level of abstraction

5. select four highest scores from list

6. select four highest numbers from a list

7. USENIX Very High Level Languages Symp.- PRE-REG DEADLINE 10/12

8. Symposium on Very High Level Languages

9. High Level Assembler question

10. FYI: IBM High Level Assembler parser available

11. High Level Assembler Option

 

 
Powered by phpBB® Forum Software