Main /
WhatMoCsWhat is a Model of Computation?A model of computation (MoC) specifies a collect of rules that "govern concurrent execution of the components and the communication between components" for components in a design. "The rules that constitute a model of computation fall into three categories."
From "System Design, Modeling, and Simulation using Ptolemy II" Web service characteristicsWeb services generally desire high throughput and low latency. Scalability is an additional concern for the web server. These properties are generally achieved by using asynchronous, non-blocking communication. The notion of a callback is central to web programming.
Predictability for Internet of Things applicationsInternet of Things applications connect physical devices in the real world. Therefore, predictability is paramount. Throughput and latency must be in an acceptable range, but once they are, even higher throughput and even lower latency do not necessarily create any benefit for the application. Instead, the application may value properties such as causality and meeting real-time deadlines. Current platforms offer little support for timestamping. Javascript timers provide approximate time interval, offering a lower time bound, but do not provide an upper time bound or guarantee ordering. (For example, in node.js, a 101s callback might occur before a 101s callback since a separate thread is allocated to each time interval. With jitter, the order can be arbitrary.) Vert.x even attempts to redefine "real-time": "Vert.x provides a complete server side SockJS implementation. It's perfectly acceptable for a platform to support only untimed MoCs. Many applications do not need timed MoCs. However, is unacceptable to proclaim to support a timed MoC and fall short, or to redefine the problem implying that timing guarantees are never needed. Accessor MoC demoWhat does it look like for an application to run under different MoCs? Imagine you are developing an application that provides a data stream, where you would like to insert and activate internet-obtained data at certain points. You would like to control the timing of the inserted data, and ensure the length of the stream is unchanged. However, you have no control over the format of the data obtained - it may be of arbitrary length. In other words, you might be a Norwegian band named Ylvis trying to insert animal sound clips into your latest Youtube sensation music video "The Fox: (What Does the Fox Say?)". Three models in the Ptolemy repository illustrate the impact of using different models of computation.
They can be found in the Ptolemy repository at:
The sound clips for this model are attached here: |