Wearable computing is undeniably a hot topic currently, what with all the major mobile players (Apple, Google and Microsoft) having entered the market. There is also a plethora of smaller players such as Timex, Nike, Pebble, etc.
Cheap, ubiquitous wearable computers – along with Internet-of-things – may be the next big wave in technology. As they say, “possibilities are endless…”.
As this blog is dedicated to F# and functional programming, here is a starter barebones Android Wear project for Xamarin – written entirely in F# : https://github.com/fwaris/WearableStarter
Please go through the repository documentation (“read.me” file). It will give you an overview of the Android Wear app deployment process. There you will also find a list of potential ‘gotchas’ to avoid and tips on debugging and troubleshooting.
There are two issues:
2) Rich and mobile web development is becoming more like client-server development but the client side and the server side are two different worlds; lacking is a way of developing in a cohesive way for both.
Fortunately there is F# and WebSharper!
Recently I rolled up the sleeves and jumped in with both feet to build a mobile web application in WebSharper and JQuery mobile – as a learning exercise.
Sample application is online here: http://mins.apphb.com (needs an HTML5 capable browser). The full source code is here: http://ahmobe.codeplex.com
This post is about maximizing the number of concurrent connections to a single server using F# Async and Async IO. A perfect use case is for ‘push notification’ type services which exist for all the major smartphone platforms (iPhone, Android, Windows Phone).
Note: This post is about 33000 concurrent push notification clients. However in a separate test I achieved 5000 concurrent connections to a single server under load. Each client connection continually sent requests to the server with random data and no “think time” between subsequent requests. Here again I ran out of client resources to scale up. The server could handle more as it was mostly IO bound (AppFabric cache calls and SQL Server Async IO queries)
The previous post talks about an F# Windows Phone game. Here is the same game ported to the Windows Phone.
Brian Beckman over at c9 has implemented a reactive version of the classic Viterbi algorithm using System.IObserver. It seems that Viterbi is natrually suited to this type of an implementation because it deals with events (observations) over time so this is a very cool innovation.
I took Brian’s implementation and ported it to F# and parallelized the main computational part along the way. The parallelized part relies on the Task Parallel Library (TPL) under the covers and uses the F# PowerPack TPL wrapper.
System.Xml.Linq provides a nice, functional way of querying XML however with F# operator overloading we can create a nice mini DSL to have even cleaner code for XML querying.
With this DSL we can mimic XPath and XQuery quite closely.
In the previous post I explained, at a very high level, that monads are really about function composition with side activities.
In this post, I will use an example based on F#’s Async monad to demonstrate practical uses of monads.
Imagine that there are 3 asynchronous web service calls that we want to sequence together before doing something else. The calls have data dependencies where the data from the previous call is required by the next. The calls are asynchronous so the calling thread starts the request and then continues on. The thread will not block waiting for a response as is the case with regular synchronous calls. However the next service call cannot start unless the previous one is done, which requires special handling.