In this article I am going to describe a very high level overview of the architecture of Savant. The current version of the code does not implement this architecture yet. However, keeping the Savant roadmap in mind this is the best design I can think of.
In terms of the completeness the bottom two blocks of the building have been laid. The parser has been written in PLY, the Python implementation of Lex and Yacc. This allows Savant to respond to any query given to it in Context Free Language. The runtime is written in pure Python with no platform specific library dependencies. However it is possible to extend the environment with native system calls.
As it is seen in the diagram, the main purpose of this post is to discuss the server aspect of Savant. The current version of the code lacks this feature and runs as a command-line program. The original idea was to have the graphical front-end execute the Savant back-end on demand. That is, whenever the user typed in a command, the GUI would run Savant with the query, capture its output, process the results and notify the user. This way of launching Savant has two main drawbacks.
- There isn't any cross-platform way to launch external programs and capture their output.
- Launching native programs is impossible with RIA platforms like Flex or JavaFX, which limits implementation possibilities for the front-end.
In this revised architecture, I have designed Savant to run a service on your system and listen to requests on a predefined port on the localhost. This eliminates both of the drawbacks mentioned above. Communicating with server ports is a very standard practice and functions to do so is available on almost every programming language. Secondly, this opens up the gate for applications written in Flex, Silverlight, JavaFX, or Titanium. Not only will this allow the GUI to be developed on these platforms, any RIA platform can have heightened access to the operating system in a standard-compliant manner. As a developer, this is a very exciting prospect. The next logical step after this can only be making Savant modular so that it extensions to the parser can be done on the fly with only a few lines of code. RIA based front-end means more flexibility in terms of interacting with the user. If all of this can be implemented, Savant has the potential to be the Firefox for natural language shell movement. Stay tuned for updates.
No comments:
Post a Comment