1 / 18

Mongo DB Driver for WP7

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

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Mongo DB Driver for WP7 Athens-Mongo DB-User-Group 3rd Meeting By Nick Tsapakis

  2. Intro • What is a Mongo DB driver • Why WP7 • Tools used • How we worked • Driver explained - Demo

  3. Tools used • Netcat • Wireshark • WP7 SDK – VS2010 – C# • Mongo DB

  4. Specification • Mongo DB wire protocol http://docs.mongodb.org/meta-driver/latest/legacy/mongodb-wire-protocol/

  5. 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

  6. 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)

  7. How we worked

  8. How we worked

  9. 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 !!!

  10. How we worked

  11. 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()

  12. 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

  13. Message Request structure

  14. Message Reply structure

  15. 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,

  16. 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

  17. Demo • Demo on WP7 SDK Emulator • Demo on a WP7 mobile device (Nokia Lumia)

  18. Epilogue • Comments – suggestions • Ideas

More Related