Mongo DB Driver for WP7 - PowerPoint PPT Presentation

Mongo db driver for wp7
1 / 18

  • Uploaded on
  • Presentation posted in: General

Mongo DB Driver for WP7. Athens-Mongo DB-User-Group 3 rd Meeting By Nick Tsapakis. Intro. What is a Mongo DB driver Why WP7 Tools used How we worked Driver explained - Demo. Tools used. Netcat Wireshark WP7 SDK – VS2010 – C# Mongo DB. Specification. Mongo DB wire protocol

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.

Download Presentation

Mongo DB Driver for WP7

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript

Mongo db driver for wp7

Mongo DB Driver for WP7

Athens-Mongo DB-User-Group

3rd Meeting

By Nick Tsapakis



  • What is a Mongo DB driver

  • Why WP7

  • Tools used

  • How we worked

  • Driver explained - Demo

Tools used

Tools used

  • Netcat

  • Wireshark

  • WP7 SDK – VS2010 – C#

  • Mongo DB



  • Mongo DB wire protocol

How we worked

How we worked

  • Netcat used for sending data to socket without using a program

  • Data for sending placed in a file

  • Command used for sending data:

    nc127.0.0.1 27017 < data_file.txt

How we worked1

How we worked

  • Wireshark used for capturing commands – responses

  • Verifying that captured messages follow Mongo DB wire protocol specification

  • Sending commands we want to implement in driver (select, insert, delete)

How we worked2

How we worked

How we worked3

How we worked

How we worked4

How we worked

  • Visual Studio 2010 with WP7 SDK – Free (run apps on emulator)

  • Need registering the phone device as developer device – Not Free

  • Pay approx. 100 dollars for 1 year

  • I am telling you all !!!

How we worked5

How we worked

Driver details

Driver details

  • Driver consists of 2 classes

  • MongodbDriver.cs is actual Driver class

  • SocketClient.cs is a tcpcomms class used only by MongodbDriver.cs

  • MongodbDriver Methods available

    Find() , insert() , remove()

Messages request reply

Messages Request – Reply

  • There will be no response sent for any other message except OP_QUERY and OP_GET_MORE messages

  • You can determine if a message was successful with a getLastError command

  • The database will respond to an OP_QUERY message with an OP_REPLY message

  • There is no response to an OP_DELETE message

  • There is no response to an OP_INSERT message

Message request structure

Message Request structure

Message reply structure

Message Reply structure

How to use driver

How to use Driver

  • Add as reference the 2 classes

  • Create MongodbDriver instance

    MongodbDriver mongo = new MongodbDriver(server, port, database, collection);

  • Call a method

    response = mongo.find(arguments);

    Arguments is a sting with following format (eg.) -> name:magic,pass:mypass,

What is supported

What is supported

  • 3 methods supported for select, insert, delete

  • Only AND among input parameters on the 3 methods

  • Only string, Object ID types supported

  • No getLastErrorcommand supported

  • One OP_REPLY message supported

  • Tested on WP7 phone

Mongo db driver for wp7


  • Demo on WP7 SDK Emulator

  • Demo on a WP7 mobile device (Nokia Lumia)



  • Comments – suggestions

  • Ideas

  • Login