Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

How to write a JAVA wrapper that insert a live stream data in mongoDB?

I'm dealing here with a live stream data and at the moment I'm reading the data with nodeJS and growing-file directly from a .csv file. I'm very new to JAVA and I need to figure out who to insert the incoming data directly in mongoDB and to create an event on each new record.

user-image
Question added by George Dimitrov , Unix System Administrator , ADVANCED.IO
Date Posted: 2013/10/27
Majid Hameed
by Majid Hameed , Senior Java Developer , Check24 Vergleichsportal GmbH

I can think of2 approaches here

1. Use MongoDB GridFS (i.e. com.mongodb.gridfs.GridFS)

2. Convert your (binary data) stream into textual (serialize) format for example Base64 and store it in a mongodb collection.

 

By the way for nodejs mongodb already have excellent drivers and there are some orms for nodejs as well.

Why are you writing a wrapper in Java?

 

 

More Questions Like This