Ticket #52 (closed enhancement: fixed)
Some form of IPC
| Reported by: | scott | Owned by: | scott |
|---|---|---|---|
| Priority: | major | Milestone: | awkpaste |
| Component: | awkbot | Version: | |
| Keywords: | Cc: |
Description
AWKBot needs some form of IPC. Particularly, it needs to be able to read from a TCP socket without blocking on each iteration, allowing updates from the outside world through any kind of intermediate medium.
Since this ticket is being filed after a solution has been created, I will discuss the solution:
- Create a portable TCP library
- Socket output goes to netcat (or telnet)
- netcat output to a temporary file
- Socket input comes from a temporary file
- Tail is used in order to be able to flush the file without losing data
- Socket output goes to netcat (or telnet)
- Create a bootstrap script which allocates a tempfile
- Start awkbot in a tail from a temporary file, letting it parse IRC protocol and events from the outside world in the AWK mainloop.
Benefits
- Ability to communicate with awkbot process from the outside world, in relay time
- Possible increased portability
- Generation of a portable socket library
Risks
- Limited
Additional
- This means AWK Bot will no longer be 100% GNU AWK, but not by much, since it is definitely a design becoming of the AWK programming language
Change History
Note: See
TracTickets for help on using
tickets.