IKANGAI Solutions. e.u.

Mobile Business Solutions

T F G+ E

Posts Tagged ‘PhD’

Tweetflow Language Design

May 22nd, 2013 by Martin No Comments

I took a small dive into the language design pond, after I stumbled over a paper by Linda McIver and Damian Conway that discusses Seven Deadly Sins of Introductory Programming Language Design. After years programming, I almost forgot how difficult it is to learn a programming language; let alone designing one :-) .

In his blog post Andrej Bauer also explains a few (bad) programming language design decisions that have survived from the ancient past, i.e., the Seventies:

If this were the year 1972 we would talk about efficiency first and forget about the programmers, because 37 years ago hardware and processing time were the scarcest resources. Today we live in different times when the most expensive resource is development time. In 1972 it was a good design decision to implement arrays in C so that they did not carry with them information about their lengths (save a couple of bytes on each array), it was a good decision not to check for out-of-bounds errors in array indexing (save a couple of CPU cycles), and it was a good decision not to have garbage collection (it didn’t work well anyhow).

In my struggle to come up with a human understandable (and therefore human readable) syntax for Tweetflows, I noticed a few things that I tried and that are probably not a good design decision as well. All are based on decisions that come from taking the language environment a little too much into account. With Tweetflows, I intend to create a minimalistic syntax with as little as possible language elements. The reason for this is threefold:

  • Tweetflows should be used on mobile devices with a small screen and limited typing capabilities
  • Tweetflows should work over different media (Tweets, text messages, Push Notifications)
  • Tweetflows, Tweetflow commands respectively, should resemble natural language as close as possible

In Tweetflow commands, I’m using command state modifiers (e.g., SR, SF), the address operator @, the dot . and verb modifiers like did. I noticed – when I tested the language with Amazon Mechanical Turk Workers – that the state modifier is difficult to understand for people. The rationale behind this modifier was inspired by the use of RT to denote a Re-Tweet on Twitter. Re-Tweets inform the reader that the corresponding Tweet originated elsewhere and was simply repeated. Thus, RT includes meta information about the Tweet. In the case of Tweetflows, I need meta information for being able to scan for Tweetflow commands in the timeline of the Twitter user. Apparently, this adds some confusion, because some Tweetflow command modifiers add meta information twice. For example, the syntax

SF @ikangai didProofread.Blogentry http://www.ikangai.com//blog

contains SF AND did to denote that the Tweetflow command has been executed. A more intuitive solution is as follows:

@ikangai didProofread.Blogentry http://www.ikangai.com/blog

However, this adds complexity for the Tweetflow parser and creates a new language construct without the state modifier. A potential direction is to look into a new direction and attach the state modifier directly to the verb of the command syntax:

@martin do.Proofread.Blogentry http://www.ikangai.com/blog

The corresponding answer is then:

@ikangai did.Proofread.Blogentry http://www.ikangai.com/blog

Notice that natural language is not free of ambiguities concerning the verb DO. DO can denote the general ability to do something (I do this) or an inquiry to do something (Can you do this?). In natural language the difference is made clear by the structure of the sentence in which DO occurs. With Tweetflows it is a bit different, because the structure remains constant and the semantic difference may not be that obvious.

The bottom line is that I will have to make additional experiments with Tweetflows and learn how people react to the syntax. Based on my experience so far, I’m thinking that I’ll have to remove the command state modifier from the syntax (as shown in the example below):

proofread.Blogentry http://www.ikangai.com/blog
@ikangai can.proofread.Blogentry http://www.ikangai.com/blog
@martin do.proofread.Blogentry http://www.ikangai.com/blog
@ikangai did.proofread.Blogentry http://www.ikangai.com/blog

If you understand the Tweetflow, feel free to post your interpretation in the comments.

your ikangai science team

Tweetflows and JSON

May 21st, 2013 by Martin No Comments

We’ve been working on the Tweetflow notation for a while now and after we’ve integrated Tweetflows into Push Notfications, we came up with the idea to represent Tweetflows (more specifically: the Tweetflow service requests) in the JSON format. Each command is a triple and consists of the command (the verb), the object and the data where the object comes from. The latter is typically represented by an URL that points to the actual object (we call this COD notation – Command Object Data). This approach lets us easily encode sequences of Tweetflow commands in JSON. The example below shows a generic download and install description for an app:

{“tweetflow”:
[
{"command": "download",
"object": "app",
"data": "url"}
,
{"command": "install",
"object": "app"},
"data": null}
]
}

An alternative (maybe even better) way to represent Tweetflows is YAML. We will also look into this direction.

Your ikangai science team

Testing a Mobile Process Syntax

May 17th, 2013 by Martin No Comments

In our last post, we introduced an alternative syntax for describing mobile processes. Now, we are facing the challenge of getting feedback from users. We are contemplating two directions. The first one is to create a Amazon Mechanical Turk Task and ask Turkers what they think about the syntax. We have done this in the past with the basic Tweetflow syntax and we got results really quick. The second one is to built an actual editor and include it in our app qlauncher. The second alternative is to implement an editor (which is a lot of work) and to test it directly in the app. This approach has the main challenge how to include test cases and how to motivate people to use the syntax. We are looking into games where users can “play” with the syntax. This needs obviously a game to play with and we haven’t found the right game to play :-) . Maybe, people could CREATE a simple game with this syntax.

We have tinkered with the syntax and modified it a bit to distinguish context from the rest:

|A|—■———————|
|B|———■—————|
|C|—————■———|
|<—{geo=vienna}—>|

This gives us the possibility to attach different context for different parts of the process and to modify each process according the context:

|A|—■———————|—■———————|
|B|———■—————|———■—————|
|C|—————■———|—————————|
|<—{geo=vienna}—>|<—{geo=rome}—>

Our idea is based on previous work where we introduced the concept of context channels. We plan to extend this work towards social tuple spaces that work well with Tweetflows and hopefully will us help to come up with the final design for the mobile process language description.

your ikangai science team

Mobile Business Processes

April 2nd, 2013 by Martin No Comments

Everybody goes mobile. According to reports from various sources like this one, we will witness mobile Internet use surpassing Desktop Internet use in 2015.
This development has tremendous impact for businesses. When people use the mobile Internet, they will expect the same on their workplace. Why? Imagine entering a workplace like the one shown below:

It is certainly charming to go back in history when going to work. But who wants to work like we did in the past with old technology, when having access to modern (mobile) technology?
As a consequence, companies will have to change their software infrastructure to satisfy the requirements of the mobile Internet. First and foremost, business processes must be adapted to support mobile devices. That is, the software that drives business processes must be able to communicate with mobile devices. Since mobile devices are not online all the time, business process communication needs to be decoupled in space and time. Secondly, the process communication language needs to be lightweight and both, human- and machine-readable. This means, that the effort for parsing incoming requests from the business process must be minimal and close to natural language. One reason is that requests must be sent over different communication channels like short messaging or push notifications which are both read by persons.
The third reason is that the effort to integrate software services with persons must be minimal: it is certainly not desirable to have a person translating a business process request manually into a (XML) representation and to invoke a software service.
Finally, business organizations will undergo structural changes and it is very likely that businesses will become organized more like social networks with hub and spokes rather than hierarchies with the CEO being the sole authority.
We are currently developing the software infrastructure and the communication language that satisfies this kind of requirements. The language is already in use in one of our mobile Apps and is called Tweetflows. It is a lightweight coordination language that is both, machine- and human readable. We use a social network infrastructure (Twitter) to decouple the process communication in space and time and simultaneously embed the business process in a social network.
However, based on that what we saw in Austrian companies, the support for mobile business processes is not very advanced: there are some companies that use apps for their salespeople, but these apps are limited in terms of mobile business process support. For example, there is no hook for social network integration and the communication mechanism is typically based on eMail.
We believe that there is going to be a lot of work in the future and we will certainly see interesting developments in this area.

your ikangai science team

Time and Tweetflows

December 19th, 2012 by Martin No Comments

Time is a fascinating thing. It seems very easy to grasp as a concept for everybody, but when you ask a physicist, things become surprisingly complicated. In computer science, time is often ignored (with the exception of real time systems) when programmers implement software. When events need synchronization of some sort, programmers resort to constructs that use abstractions. For example, if you want to synchronize two distributed processes, you could use logical constructs like semaphores to do this. This is actually much easier than trying to accomplish the same with time based synchronization. Time based synchronization requires that distributed processes have their local clocks in synchronized: only then (and with some clock synchronization algorithms) it is possible to achieve time based synchronization.
Generally speaking, abstracting from time is a good idea and helps programs to be clean, understandable and efficient.
With Tweetflows, I came across an interesting issue concerning time: complex Tweetflows consisting of several commands that are connected with each other need to be published in the reverse order on the timeline of the users. The reason is that on the timeline of the user the newest entry is always on top, because the timeline represents events that go into the past. Computer scientists refer to this kind of structure as a stack, or LIFO queue.
This has the nice side effect that I’m able to integrate dependencies between Tweetflow commands very easily: each Tweetflow command has a unique URL (like Tweets) after it was published. For example the URL

https://twitter.com/ikangai/status/280707058456735744

refers to the Tweetflow command

SR download.qlauncher http://itunes.apple.com/app/id381663352?mt=8/#123456

Thus, after a Tweetflow command is published, we can use its URL in subsequent Tweetflow commands. However, this only works, if Tweetflow commands are published in the reverse order on the timeline of the user. Let me illustrate this with a simple example. We want to ask a user to do three things. First the user should download an App. Then, the user should take a screenshot of the App and upload the screenshot to a web site. Translated into a Tweetflow (without the reference to other Tweetflow commands) this looks like this:

SR download.qlauncher http://itunes.apple.com/app/id381663352?mt=8
SR make.screenshot qlauncher
SR upload.screenshot http://www.ikangai.com

When you publish this in the order of the steps (download app, make screenshot, upload picture) on the timeline of a user the result would look like this:

SR upload.screenshot http://www.ikangai.com
SR make.screenshot qlauncher
SR download.qlauncher http://itunes.apple.com/app/id381663352?mt=8

Thus, we need to publish this in the reverse order to make it understandable for people and to have a meaningful structure. Now, if we include the references the to next Tweetflow command (remember: Tweetflow commands are published in the reverse order and therefore can be referenced) we get this:

SR download.qlauncher http://itunes.apple.com/app/id381663352?mt=8/#.281297742746251264
SR make.screenshot qlauncher #.281297672684584960
SR upload.screenshot http://www.ikangai.com

The number after the hashmark is the reference to the next Tweetflow command and is the control structure of the Tweetflow commands. The reference depends on how the social network handles its data: with Twitter the reference number is part of the URL that points to the Tweet:

https://twitter.com/ikangai/status/281297786471841792

As always in computer science, completing one thing is never enough :-) . Now that we have managed the publication of Tweetflows we still need to look at the execution of Tweetflows and the effects on the timelines of users with respect dynamic changes in Tweetflows, constructs like splits or joins and the management of conditional execution of Tweetflow commands.

your ikangai science team

Programming in the Social Network

November 30th, 2012 by Martin No Comments

The title of this blog entry echos the well known paper by Frank DeRemer and Hans Kron: Programming in the Large (PitL). Just as in PitL, Programming in the Social Network (PitSN) discusses the issue of programming complex, distributed systems. There are some conceptual differences, but as we will explain soon, there are striking similarities between PitSN and PitL. Actually, the similarities are quite fascinating, because it shows how much of the concepts that we use today were actually invested 40 or more years ago. Let me start with the following quote from PitL:

Names. The universe of discourse of MIL 75 (=the proposed programing language in PitL) consists of names: the names of resources originating in the separate modules,the names of the modules themselves, and the names of systems of modules.

It might be obvious now, but naming is a “tricky business”, especially, when you have resources that are distributed all over the planet. Now, if you replace “modules” with social network entities or persons and systems with groups or cliques you get a pretty good description of a social network. Social networks are also the underpinning for my PhD thesis: they provide for the structure that executes social workflows which are described with Tweetflows.

External scope. An MIL 75 program addresses the question of who knows whom within a collection of modules. It defines the scopes of definitions of names across module and subsystem boundaries. It has nothing to say about the scopes of definitions within modules, these being defined by block structure and/or other constructs in the LPS.

Again, there is a striking resemblance to social networks as we know them now. In social networks, persons know each other and the social network describes these ties. “Internals” of persons are normally out of the scope of the social network due to privacy reasons.

No types. Similarly, MIL 75 does not provide any ways of specifing the type of an object or defining language extensions. Rather it is used to specification for transmitting relevant information from one module to another. Such paths may be defined for any named entity that has its defined and applied occurences distributed over different LPS modules.

Just like pitl, my work with Tweetflows does not include a typing system and have paths (i.e., social ties) to transport messages between nodes.

There is even more in the PitL paper, like including formal definitions which can be modified and used in the context of Tweetflows. I’ll discuss this in a later blog entry. In the meantime, “stay tuned” for more on the integration of Tweetflows into qLauncher. This is progressing quite well and I’m expecting the completion of the work within the next couple of days.

your ikangai science team