This is the third publication about the concepts which were checked and implemented in the R&D Hackathon here at DevelopEx.

The key feature of this hackathon was a strict time limitation. Just 4 hours were given for checking a certain idea and making the prototype of a solution.

The main tasks were: to define main challenges and develop a ‘proof of concept’;

to choose the best solutions and complete their development to document our decision and execution process.

As we wrote previously, one team chose Low-cost Indoor Navigation.

Another team explored the possibility of Rendering a dynamic 3d-scene in Augmented Reality using a given 2d-marker.

This post covers “Location-based search in social networks context”. The idea for this was suggested as a way for somebody to friend people who are near them for a period of time.

It’s an interesting possibility because: The developed software prototype could be installed as sub-system for a social media (LinkedIn, Facebook, etc.).

We already know that Redis database works with geodata.

Application

Let’s imagine some conference occurs where there are several hundred participants. Most of them will have an application from the same social network (Facebook, Google+, or a conference app) on their phones or tablets.

The client-server software defines these people as near each other a long time. Then, each of these people receives the suggestion to friend the other participants.

As these people are in the same conference there is high probability they have similar interests and will agree to friend each other.

How to do it

N people have phones where the developed application is installed. Each application sends its coordinates to the server. It is defined that during some period M, N from these people are located in a distance X meters from each other. Each mobile application receives from the backend notifications to friend others (M-1) people.

Basic steps: For each user that is registered in a social network, add his account to a database

For each added account write current geolocation to the database

Define location for certain User-A

Find others users that are within N meters radius of User-A

Load info about others users from the social network’s API and suggest for User-A to add them as friends

Technologies

Redis Database

Decision: The Redis database is naturally suited for geolocation search on millions of users with speed. If numbers of users happen to rise significantly, Redis is well able to scale.

ASP.NET

Decision: ASP.NET was chosen because the team is familiar with the Microsoft solution including the Azure platform which is compatible with Redis.

Solution and Fixes

Our main goal was achieved. The app found people nearby within N meters. We didn’t go as far as to apply friending, but it provides a nice feature set to combine with a ready-made commercial application. For simplification, the team filled the coordinates of users statically. Then, one person moving was emulated. It was defined that 46 meters was the radius where the application would trigger invitations.

Several challenges we encountered and solved: The client library Redis used for .NET StackExchange. Redis does not contain methods for geodata treatment. It’s a new feature and not yet supported by the client. The team avoided it when used LUA scripts.

The team assumed getting current coordinates of User-A was a trivial tasks which modern mobiles or web-browsers could define quickly.

And of course, the perennial bugs when understanding and implementing a new API.

The teams got great experience brainstorming, interacting and making sacrifices in order to prove the core concept. We think these skills will be useful for each of us and for DevelopEx and it’s work on some interesting applications.

As always, feel free to contact us for a consultation!