February 4, 2013 by MongoDB Comments
This is a guest post by Bas van Oudenaarde, Technical Manager, VX Company
One of the primary roles of government is to care for the safety of its citizens. Depending on the country, there are different public alert and warning systems to notify civilians of general or local dangers. Historically, such systems have tended to be 'top-down' or hierarchical, but today bottom-up approaches are preferred as news tends to travel much faster through social media like Twitter or Facebook than outmoded means. VX Company builds such public alert and warning systems for governments, and has been evaluating how best to re-engineer its systems using MongoDB.
Recently VX Company developed a novel approach using MongoDB and its built-in geospatial, sharding, replication, and other features. In this prototype, which we defined as an interim project for students, we explored a ‘bottom-up’ approach using a mobile app interfacing with a distributed servers layer with MongoDB nodes.
The students got just six weeks to implement these new concepts with MongoDB: design, build, and test. By constraining the delivery deadline, both the students and MongoDB were put to the test.
In this new application, a civilian could sent out a message to their neighborhood to get help in case of an emergency situation. For purposes of this system, ...neighborhoodâ€œ (or ...cellâ€œ in our terminology) is determined by the type of emergency, so in the case of a robbery the neighborhood or cell might be 10 kilometers around the hotspot. Different emergency problems result in different sizes of cells. In each cell the government can respond to incidents, for example, by sending a fire truck or ambulance, or local neighbors can help or give more information, as appropriate. Alternatively, the government organization could broadcast warning of a problem to a cell. Whether at home or roaming, citizens can both send and receive notice of emergencies.
In order to implement the system we used MongoDB together with the following components:
Using this architecture provides a lightweight, highly scalable (cloud) solution.
MongoDB is a great fit for such a distributed system. MongoDB supports location-based queries, provides location positions (longitude, latitude) with a radius and allows for easy retrieval of all persisted messages in this range.
Other useful MongoDB features are sharding, replication, and JSON data interchange. Instead of storing all information centrally, sharding data lets organizations store data where it makes sense, and quickly respond to local content. In case of citizen roaming we actually have to deal with two locations, e.g., home and visit location. In addition, reliability of the data is critical in such a system. MongoDB ensures the reliability of data through support for out-of-the-box replication. Finally, MongoDB uses JSON for data exchange and hence fits naturally with mobile computing. Another important point is that MongoDB works well in cloud environments like Amazon Web Services, so that if the application proves successful we can easily and cost effectively scale it out.
As mentioned previously, the students had just six weeks to design, build, and test their MongoDB-based emergency alert and response solution. Despite the tight time constraints, the students successfully completed this project in time and with the requisite functionality.
For the project the SCRUM approach was used. In total we had three code sprints, with each sprint lasting two weeks.The first sprint was used to set up the key elements of the architecture and sketch the model. For the following two sprints, after each sprint the students delivered a working solution to the client to determine whether the product was ready or still needed adjustments. After six weeks the product was complete, consisting of a running model (which runs the predefined test cases), documentation, API information, installation manual and test setup.
These promising results confirmed for us that MongoDB could significantly expand new possibilities, while simultaneously making our lives easier. A lot of interesting mobility features are built into MongoDB and we plan to explore more concepts and build them into future releases of our civilians watch application. In particular, we would like to integrate common social media like Twitter and Facebook, both to generate interest and adoption of the application, but also to improve its utility.
VX Company, founded in 1988 and based in The Netherlands, is an IT service provider active in consultancy, projects and secondment in the field of Microsoft, Java, Oracle, OpenVMS, Unix and Linux. Almost 300 IT professionals work on the analysis, design, development, integration, testing and management of applications and computing infrastructures for many customers. Moreover VX Company is a specialist in the field of managed services and project management. The company is characterized by a culture in which the employee is the core of success. That's why Computable named VX Company ...Best ICT secondment company of the year,â€œ ...Best ICT employer,â€œ and one of ...the most powerful IT service providers in the Netherlands.â€œ Learn more at http://www.vxcompany.com.