How does FerretDB work?

In recent weeks, I have come across FerretDB on multiple occasions, and I thought why not just get a closer look on the topic. I took a particular interest in it (FerretDB) as it is a MongoDB implementation, on top of my favourite database PostgreSQL.

While I do have high-level thoughts on how I would go about building MongoDB on top of Postgres, I wanted to confirm, validate, and learn how the FerretDB team has been doing it.

FerretDB (previously MangoDB) was founded to become the de-facto open-source substitute to MongoDB. FerretDB is an open-source proxy, converting the MongoDB 5.0+ wire protocol queries to SQL – using PostgreSQL as a database engine.

At a high level, FerretDB is a proxy, which implements MongoDB Wire Protocol that MongoDB clients speak. After establishing the connection with MongoDB clients, it translates any query sent by MongoDB clients to the SQL queries Postgres understands.

In the recent release(0.5.0) of FerretDB, it is also possible to use it as a library rather than as a proxy. FerretDB as a library helps in reducing one network hop, which leads to better performance. It is only possible for applications that are built in Go since FerretDB is implemented in Go.

Below are some of the tweets from people on this article. If you find this article useful please share and tag me @shekhargulati

Continue reading “How does FerretDB work?”

Developing Single Page Web Applications using Java 8, Spark, MongoDB, and AngularJS

In this post you will learn how to use a micro framework called Spark to build a RESTful backend. The RESTful backend is consumed by a single page web application using AngularJS and MongoDB for data storage. I’ll also show you how to run Java 8 on OpenShift. Read the full blog here https://www.openshift.com/blogs/developing-single-page-web-applications-using-java-8-spark-mongodb-and-angularjs

Day 27: Restify–Build Correct REST Web Services in Node.js

Today for my 30 day challenge, I decided to learn a Node.js module called restify.The restify module makes it very easy to write correct RESTful APIs in Node.js and provides out-of-the-box support for features like versioning, error handling, CORS, and content negotiation. It borrows heavily from Express (intentionally) as that is more or less the de facto API for writing web applications on top of node.js. In this blog post, we will develop a RESTful API for storing jobs. We will store the data in MongoDB. Read full blog here https://www.openshift.com/blogs/day-27-restify-build-correct-rest-web-services-in-nodejs

Day 25: Tornado–Combining Tornado, MongoDB, and AngularJS to Build an App

Today for my 30 day challenge, I decided to take a break from JavaScript and learn a web framework called Tornado. I decided to learn Tornado so that I can write web applications in Python. I only know Flask framework so I thought Tornado would be a good addition to my Python web development skills. The application that we will write in this blog post will use Tornado for the REST backend, MongoDB as the database , AngularJS as the client side JavaScript MV* framework, and OpenShift as deployment platform. Read the full blog here https://www.openshift.com/blogs/day-25-tornado-combining-tornado-mongodb-and-angularjs-to-build-an-app

Day 22: Developing Single Page Applications with Spring, MongoDB, and AngularJS

Today for my 30 day challenge, I decided to develop a single page web application using the Spring frameworkMongoDB, and AngularJS. I have a good understanding of Spring and MongoDB but I have never used AngularJS with the Spring framework. So, in today’s blog post we will develop a social bookmarking application like the one we developed with EmberJS a few days ago. I have already covered AngularJS basics on day 2 so please refer to my blog for more information. This blog will cover the latest version of the Spring framework i.e. 3.2.5.RELEASE and will use no XML approach(not even web.xml). We will configure everything using Spring annotation support. The Spring MVC(along with Spring framework) will be used to create the RESTful backend. AngularJS will be used as the client side MVC framework to develop the frond-end of the application. Read full blog here https://www.openshift.com/blogs/day-22-developing-single-page-applications-with-spring-mongodb-and-angularjs

Day 15: Meteor–Building a Web App From Scratch in Meteor

So far in this series we have looked at BowerAngularJSGruntJS, and PhoneGap JavaScript technologies. Today for my 30 day challenge, I decided to go back to JavaScript and learn a framework called Meteor. Although Meteor has a very good documentation, but it misses a beginner tutorial. I learn better from tutorials as they help me get started with a technology quickly. In this blog, we will learn how to build an epoll application using Meteor framework. Read the full blog here https://www.openshift.com/blogs/day-15-meteor-building-a-web-app-from-scratch-in-meteor

DevFest Austria 2013 Talk : Thinking Beyond RDBMS — Building Polyglot Persistence Java Applications

Couple of weeks back I gave a talk at DevFest Austria event on how to use different nosql datastores with OpenShift.  You can view the video here.

Building Single Page Web Applications with Backbone.js, JaxRS, MongoDB, and OpenShift

Backbone.js is a mature, popular, and lightweight javascript library which aims to bring structure to your client-side code. The goal of backbone.js is to bring MVC, a software architecture pattern, to client side development.Actually, backbone.js is an MV framework where view is also responsible for controller logic as well. In this blog, we will build a simple social bookmarking application.

In brief, MVC is a programming design pattern for separating the different concerns of your application. The M corresponds to Model and is used to define domain object. The V corresponds to View and is responsible for display logic. Finally, the C corresponds to Controller and is responsible for user interactions and interactions between Views and Models.

You can find source code of the application here https://github.com/shekhargulati/getbookmarks. Backbone.js is used by Linkedin, Foursquare, Wunderkit, Groupon, etc to build complex applications. You can view the full list here.

Read full blog at https://www.openshift.com/blogs/building-single-page-web-applications-with-backbonejs-jaxrs-mongodb-and-openshift

How To Build Location-Aware Web Applications using HTML5 and MongoDB

We all use location aware applications in our day-to-day life. Applications like Foursquare, Facebook places, etc help us share our location (or places we visit) with our friends and family. Applications such as Google Local help us find out which businesses are near our current location. So, if we need a good coffee shop recommendation, we can ask Google Local to find us all the coffee shops near our location. This not only helps the customer, but also helps businesses reach the right audience and sell their products more effectively. It is a win-win situation for both consumers and businesses.

To build such an application , you need the geolocation of the user. According to Wikipedia, “Geolocation is the identification of the real-world geographic location of an object”. Until now, there was no standard way to find the location of a user in a web application. We could use an open source library like Google Gears to get the geo location of a user but this library is not under development anymore and should only be used with older browsers, which do not support W3C GeoLocation API. The W3C GeoLocation API is a specification that provides standard scripted access to geographical information associated with the hosting device. Geo Location support is not officially part of HTML 5 specification but people use it interchangeably and most commonly you will hear about GeoLocation APIs with respect to HTML5. This API provides an abstraction layer on top of how geolocation information of a user is gathered. All modern browsers support the GeoLocation API. The below table is taken from http://caniuse.com/#feat=geolocation.

Read full blog at https://www.openshift.com/blogs/how-to-build-location-aware-web-applications-using-html5-and-mongodb