| | 152 | |
| | 153 | == Interest == |
| | 154 | The interest for a library such as the Signal Network library was queried in the boost developers mailing list |
| | 155 | message [http://lists.boost.org/Archives/boost/2007/02/116869.php [boost] interest in a "signal flow" library?] |
| | 156 | |
| | 157 | The community reported interest ranging from very interested through conditionally interested |
| | 158 | (this would be interesting if...) to the opinion that using boost::Signals directly would |
| | 159 | be more dependable and readable. Some of the suggestions are summarized in the |
| | 160 | [http://dancinghacker.com/code/signet/ prototype documentation]. |
| | 161 | |
| | 162 | Also, there were several mentions of similar "home-brewed" libraries that were in ways similar to the proposed |
| | 163 | Signal Network library, indicating that including a well designed library of this type |
| | 164 | in Boost would be useful to the community. |
| | 165 | |
| | 166 | == Relationships with other libraries == |
| | 167 | |
| | 168 | The Signal Network library is based directly on Boost.Signals, and throughout the development I plan to maintain |
| | 169 | compatilibility with both the original Boost.Signals library by Doug Gregor and the thread_safe_signals version |
| | 170 | under implementation by Frank Mori Hess (which is geared to replace Boost.Signals). Most of the tests written |
| | 171 | for the current prototype version of the library work without problems with both base signal implementations. |
| | 172 | |
| | 173 | The library also makes use of Boost.Preprocessor, Boost.!TypeTraits, Boost.Utility |
| | 174 | (call traits and enable_if). Some parts of the library also use Boost.Threads (for components that are related to threading), |
| | 175 | and Boost.Asio combined with Boost.Serialization (for components that can transmit / receive serializable signals |
| | 176 | through Boost.Asio). |
| | 177 | |
| | 178 | A possible relationship / overlap with |
| | 179 | [http://home.comcast.net/~jturkanis/iostreams/libs/iostreams/doc/home.html Boost.Iostreams] was indicated by Jeff Garland. |
| | 180 | According to its website, Boost.Iostreams serves two main purposes: |
| | 181 | * To allow the easy creation of standard C++ stream and stream buffer classes for new data sources and sinks. |
| | 182 | * To provide a convenient interface for defining i/o filters and attaching them to standard streams and stream buffers. |
| | 183 | |
| | 184 | Hence, Boost.Iostreams has similar goals for streams as the Signal Network library has for signals. The difference is that |
| | 185 | signal networks offer more permanent channels of communication (connecting a signal to a slot makes a lasting |
| | 186 | connection - everything coming out of the signal will be received by the slot until the connection is destroyed), |
| | 187 | while streams offer more of a momentary transfer of information (stream << data makes no permanent connection). |
| | 188 | Boost.Iostreams does allow permanent insertion of filters into a stream, but this does not seem to be intended for more complicated |
| | 189 | network topologies. |
| | 190 | |
| | 191 | Also, [http://channel.sourceforge.net Channel] by Yigong Liu covers a lot of concepts that I hope |
| | 192 | to address in the Signal Network library. In particular, this library inspired |
| | 193 | designing components that would allow signal |
| | 194 | networks to be constructed accross multiple computers (using Boost.Asio and Boost.Serialization). |
| | 195 | |
| | 196 | == Google Summer of Code Scope == |
| | 197 | |
| | 198 | Even though a signal network library such as the one proposed above can grow in many directions, |
| | 199 | there is a core functionality requested by the community that can be completed |
| | 200 | as a part of Google Summer of Code. |
| | 201 | |
| | 202 | In particular, the operator-based connection syntax, the development of flow control components, |
| | 203 | the development of signal storage and threading components, and documentation of each are |
| | 204 | feasible for me to complete as a part of Google Summer of Code. |
| | 205 | |
| | 206 | == Download == |
| | 207 | |
| | 208 | Please see the [http://dancinghacker.com/code/signet/ prototype documentation]. |
| | 209 | |
| | 210 | == Acknowledgements == |
| | 211 | |
| | 212 | Thanks to the [http://ame.asu.edu Arts, Media and Engineering Program] at Arizona State Unversity |
| | 213 | for their support in developing and releasing the prototype Signal Network library code. |
| | 214 | |
| | 215 | Thanks to the Boost community for their valuable suggestions and feedback: |
| | 216 | * Tobias Schwinger indicated that the library could be used for pulling rather than pushing data. |
| | 217 | * James Jones suggested that a {{{||}}}-like operator could be used for branching. |
| | 218 | * Paolo Coletta suggested a "video_generator >>= ( effect1 && effect2 ) >>= image_sum" - like syntax that would allow |
| | 219 | parallel processing of signals (identified as the "join" pattern by Yigong Liu). |
| | 220 | * Yigong Liu suggested enhanced support for common network topologies, such as mesh. |
| | 221 | * Braddock Gaskill pointed out the relationship with the "pipes and filters" pattern, and suggested |
| | 222 | the possibility of using functions as filters. He also suggested the library would be more useful |
| | 223 | if different functions executed in parallel threads, or were queued to specific worker threads, |
| | 224 | if the library would provide functionality to control and schedule the execution of the invoked functions, |
| | 225 | or traverse the call graph. |
| | 226 | |
| | 227 | == Copyright == |
| | 228 | |
| | 229 | The Signal Network library is copyright Stjepan Rajko 2007. Use, modification and |
| | 230 | distribution is subject to the Boost Software License, Version |
| | 231 | 1.0. (See copy at |
| | 232 | http://www.boost.org/LICENSE_1_0.txt) |
| | 233 | |