mgijsberti / synoptic

Automatically exported from code.google.com/p/synoptic
0 stars 0 forks source link

Add network daemon capabilities to Perfume #364

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Perfume currently performs single runs offline and produces static models. To 
make the (separately-hosted) frontend useful, Perfume should be able to run as 
a daemon. The idea is that this Perfume daemon waits for and receives API 
requests from the frontend, runs the Perfume algorithm (or some part of it), 
and responds with some resulting data such as a Perfume model encoded in a JSON 
object. For this issue, simply allow a client (the frontend) to send a log and 
regexes and to request the final Perfume model in JSON.

Work on this issue will likely best be done in a new package. Because Perfume 
can already output the final model in JSON format, this issue will primarily 
involve coding in new classes rather than changing existing ones. One exception 
is that this daemon mode should be added as a flag in PerfumeOptions. Also, the 
method that outputs JSON will need to be slightly modified so that the data can 
be sent on the network rather than simply written to a file.

Further discussion is necessary about which frameworks, protocols, etc. to use.

Original issue reported on code.google.com by tonyohm...@gmail.com on 20 Feb 2014 at 8:19

GoogleCodeExporter commented 9 years ago
Existing solution of wrapping the perfume binary within a simple web-based 
back-end works fine. I don't see a good reason to implement this more complex 
solution.

Original comment by bestchai on 25 Jan 2015 at 11:22

GoogleCodeExporter commented 9 years ago
The motivation behind a daemon is that it would allow us a lot more freedom in 
choosing frontend features. It may be useful to be stateful, keep 
recently-inferred models in memory, and then allow answering some questions 
we've considered in the frontend like these:

Which lines in the log file correspond to specific nodes/edges in the model?

Which invariants are related to specific nodes/edges in the model?

How does the model change as invariants are removed?

However, an easier albeit less efficient method may be to send the frontend a 
much larger JSON that captures most of the Perfume backend's state (rather than 
only sending what's necessary to display the final model), and add a "load" 
function to the backend.

Original comment by tonyohm...@gmail.com on 25 Jan 2015 at 11:49