Mongodb configuration in zone

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

balasourav
Posts: 22
Joined: 25 Jul 2017, 07:44

Mongodb configuration in zone

Postby balasourav » 25 Jul 2017, 07:47

I want to connect mongodb in smartfox. How to configure mongodb in zone like us mysql. What can do for this ?
User avatar
Lapo
Site Admin
Posts: 23009
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Mongodb configuration in zone

Postby Lapo » 25 Jul 2017, 08:09

Hi,
as you already know, MongoDB is not a relational database so it works differently from MySQL, Postgres, MSSQL etc...

The high level database API provided by SmartFoxServer work with relational databases only, but for NoSQL engines such as MongoDB you will need to work directly with Mongo's API.

To answer your question more specifically you will not need to configure the database in the SFS zone, instead you need to download the MongoDB drivers from their website:
https://mongodb.github.io/mongo-java-driver/
and deploy under SFS2X/extensions/__lib__/

Then you can import Mongo's classes in your Extension code and talk to the database via its API.

Hope it helps
Lapo
--
gotoAndPlay()
...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 69 guests