My instinct is that if you wanted to do this in Swift, then the right way would be to model a stream as a variable in the same way as files. Swift would be responsible for hooking up applications to different streams... You can't do this in current Swift, I'm guessing it would need major extensions<br>
<br>- Tim<br><br><div class="gmail_quote">On Tue, May 1, 2012 at 12:48 PM, Michael Wilde <span dir="ltr"><<a href="mailto:wilde@mcs.anl.gov" target="_blank">wilde@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Ketan,<br>
<br>
I'll try to reply to this and Ben's followup some time next week. Im very interested in the streams paradigm.<br>
<br>
Note that we have at least one example of a Swift script running in an infinite loop: its the Swift remote function call server in the SwiftR package (Swift for the R language). I think that uses an infinite iterate loop that exits when it gets an exit command from the FIFO its reading. We talked about adding simple socket interfaces via builtin functions.<br>
<br>
The streams question is of string interest for the future.<br>
<br>
- Mike<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
----- Original Message -----<br>
> From: "Ketan Maheshwari" <<a href="mailto:ketancmaheshwari@gmail.com">ketancmaheshwari@gmail.com</a>><br>
> To: "Swift Devel" <<a href="mailto:swift-devel@ci.uchicago.edu">swift-devel@ci.uchicago.edu</a>><br>
> Sent: Monday, April 30, 2012 1:39:54 PM<br>
> Subject: [Swift-devel] Streams<br>
> Hi,<br>
><br>
><br>
> I am working on a DOE powergrid related project here at Cornell.<br>
><br>
><br>
> An aim of the project is to compute power grid state estimation and<br>
> react in time-critical fashion.<br>
><br>
><br>
> The application at a very high level, is a distributed<br>
> producer/consumer system where multiple producers produce data streams<br>
> consumed by multiple consumers in a publish-subscribe model of data<br>
> flow.<br>
><br>
><br>
> The producers (phasor measurement units) produce streams continuously<br>
> and consumers(State Estimators) can subscribe to the producers. There<br>
> can be multiple consumers consuming from a single producer for<br>
> performance and consistency purposes.<br>
><br>
><br>
> Can Swift support this model of computation? In particular, I am<br>
> wondering how to go about the following aspects with Swift:<br>
><br>
><br>
> 1. Describe application which could run in an 'infinite' loop.<br>
> 2. Mappers to streams. I think these streams should be some kind of<br>
> named buffers. A memory to memory stream model is what I vaguely view<br>
> this as.<br>
><br>
><br>
> The streams are binary encoded ones in big-endian format and could be<br>
> parsed (by consumers) as id'd tuples each containing 5-6 fixed width<br>
> field of timestamp, voltage, current, delta etc. data.<br>
><br>
><br>
> There are other requirements of the application and plenty of low<br>
> level nitty gritty but I think Swift could handle all of'em. I am just<br>
> unsure of the above two at the moment.<br>
><br>
><br>
> We are in discussion with WSU collaborators to deliver some of the<br>
> 'real' parts of the application. However, in the meantime we do have<br>
> toy components to test and play with.<br>
><br>
><br>
> Any input is greatly appreciated.<br>
><br>
><br>
> Regards,<br>
> --<br>
> Ketan<br>
><br>
><br>
><br>
</div></div><div class="im HOEnZb">> _______________________________________________<br>
> Swift-devel mailing list<br>
> <a href="mailto:Swift-devel@ci.uchicago.edu">Swift-devel@ci.uchicago.edu</a><br>
> <a href="https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-devel" target="_blank">https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-devel</a><br>
<br>
</div><span class="HOEnZb"><font color="#888888">--<br>
Michael Wilde<br>
Computation Institute, University of Chicago<br>
Mathematics and Computer Science Division<br>
Argonne National Laboratory<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
_______________________________________________<br>
Swift-devel mailing list<br>
<a href="mailto:Swift-devel@ci.uchicago.edu">Swift-devel@ci.uchicago.edu</a><br>
<a href="https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-devel" target="_blank">https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-devel</a><br>
</div></div></blockquote></div><br>