Saturday, March 31, 2018


Driver-Rider Real-Time Monitoring
Introduction:
Problem Statement: When parents offer to engage in carpool for their kids in daily commutes, the location information of the assets is generally unknown for the duration of the ride. Map based mobile device applications may enable driver –rider location sharing but their real time notifications to stationary observers are extremely expensive to both the device  on the moving vehicle as well as the handheld on the stationary observer. This document attempts to provide an efficient solution to elastic scaling of observers and rides that is not only performing but also convenient without requiring anything more than a browser interface for the publisher and the subscriber.


Differentiation:
Google Maps and Uber/Lyft applications enable location sharing but they heat up the mobile device when turned on.  Moreover, neither application allows an observer to include more than just the ride from a particular participant.
Design:
Without the use of native mobile applications, a browser based application that can query local mobile operating system’s location sharing primitives is sufficient to publish data to cloud based service.
A message queue broker from the cloud handles the exchange of messages required for sharing the location information between publisher and elastic  group of observers. A global cloud database keeps track of all the information regarding rides and observers.
Architecture:
All cloud based technologies are sufficient for this purpose. And web interface for browser display can be based on server side page displays.
Performance:
The use of cloud based technologies such as queue service, cloud database and such others are sufficient to improve performance. Standalone superfast erlang based applications are not required.
Security:
Access control is based on row level security in the database enabling granular control of all necessary assets.
Testing:
All server side code regardless of the tier involved can be unit-tested and integration tested with selenium web-browser based tests.
Conclusion:
Publisher-subscriber application of location sharing mobile units can be applied to a variety of domains.

#codingexercise

Given a triangular structure of members, find the minimum sum path from top to bottom:

Solution: Since each level has to be represented once, pick the minimum of each level to add to the desired sum

otherwise the exhaustive case is :

int GetMinSumPathTopToBottom(int[,] A, int rows, int cols, int i, int j)

    if (i == rows) {return 0;}
    Debug.Assert( 0 <= i && i < rows && 0 <= j && j < cols);
    var locals = new List<int>();
    sums += A[i,j];
    for (int k = 0; k < cols; k++)
    {     
        locals.Add(GetMinSumPathTopToBottom(A, rows, cols, i+1, k));
    }
    sums += locals.min();
    return sums;
}

No comments:

Post a Comment