MangoDB yakagadziridzwa uye ikozvino yachinja kuFerretDB

Munguva pfupi yapfuuras days nhau dzekutangwa kweprojekiti dzakaziviswa FerretDB, (yaimbova MangoDB), iyo inokutendera kuti utore DBMS yeMongoDB inotungamirwa negwaro nePostgreSQL usingaite chero shanduko kukodhi yako yekushandisa.

FerretDB inoshandiswa sevhavhavhavha inoturikira mafoni kuMongoDB kuita SQL mibvunzo kuPostgreSQL, ichikubvumidza kushandisa PostgreSQL seyo chaiyo yekuchengetedza.

FerretDB (yaimbova MangoDB) yakavambwa kuti ive de facto yakavhurika sosi kutsiva MongoDB. FerretDB ndeye yakavhurika sosi proxy inoshandura MongoDB waya protocol mibvunzo kuSQL, ichishandisa PostgreSQL seinjini yedatabase.

Iko kudiwa kwekutama kunogona kumuka nekuda kweshanduko yeMongoDB kuenda kune isiri-yemahara SSPL rezinesi, iyo yakavakirwa paAGPLv3 rezinesi, asi isiri yakavhurika sosi, sezvo iine chinodikanwa cherusarura chekupa pasi perezinesi reSSPL kwete kunyorera chete. yekodhi pachayo, asiwo mabviro emakodhi ezvese zvikamu zvinosanganisirwa mukupa gore sevhisi.

Vateereri vanotarisirwa kuFerretDB vashandisi vasingashandisi maficha epamusoro eMongoDB mumashandisirwo avo, asi vanoda kushandisa yakavhurika software stack.

Muchikamu chazvino chebudiriro, FerretDB ichiri kutsigira chete chikamu cheMongoDB maitiro izvo zvinonyanya kushandiswa mune zvakajairika application. Mune ramangwana, vanoronga kuwana rutsigiro rwakazara rwemutyairi weMongoDB uye nekupa kugona kushandisa FerretDB sekutsiva kwakajeka kweMongoDB.

Inofanira kuyeukwa kuti MongoDB inogara niche pakati pekukurumidza uye scalable masisitimu iyo inoshanda pane data mukiyi / kukosha fomati, uye yehukama DBMS, inoshanda uye yakanakira mukugadzira mibvunzo.

Vazhinji vashandisi veMongoDB havadi akawanda emhando yepamusoro iyo MongoDB inopa; zvisinei, ivo vanoda nyore kushandisa yakavhurika sosi dhatabhesi mhinduro. Ichiziva izvi, FerretDB iri pano kuti izadze iyo gap.

MongoDB inotsigira kuchengetedza magwaro mune JSON-yakafanana fomati, ine mutauro unochinjika wekuita mibvunzo, inogona kugadzira indexes yeakasiyana akachengetwa hunhu, inopa inoshanda mabhinari hombe kuchengetedza chinhu, tsigira kutema mabasa ekuchinja uye kuwedzera data kune dhatabhesi, inogona kushanda zvinoenderana neMepu / Kuderedza paradigm, inotsigira kudzokorora uye kuvakwa kwekukanganisa-kushivirira zvigadziriso.

Mukuburitswa kweFerretDB 0.1.0 zvinocherechedzwa kuti yakanyatsogadziridzwa nzira iyo PostgreSQL data inotorwa. Pakutanga, pachikumbiro chega chega cheMongoDB chinouya, SQL kuPostgreSQL mubvunzo wakagadzirwa, uchishandisa mabasa kushanda neiyo JSON fomati uye kusefa mhedzisiro padivi rePostgreSQL.

Nekuda kwekusiyana mune semantics yePostgreSQL uye MongoDB json mabasa, pakanga pane nyonganiso mukuzvibata pakuenzanisa nekuraira mhando dzakasiyana. Kuti ugadzirise dambudziko iri, sample yedata yakawandisa yaburitswa kubva kuPostgreSQL uye kusefa kwemhedzisiro kunoitwa padivi reFerretDB, izvo zvakaita kuti zvikwanise kudzokorora maitiro eMongoDB mumamiriro mazhinji.

Mutengo wekuwedzera kuenderana waive chirango chekuita, iyo mune ramangwana kuburitswa inotarisirwa kudzikiswa nekusarudzika kusefa padivi reFerretDB remibvunzo chete ine musiyano wehunhu.

Semuyenzaniso, mubvunzo "db.collection.find({_id: 'some-id-value'})" inogona kunyatsogadziriswa muPostgreSQL. Chinangwa chikuru chepurojekiti panguva ino yebudiriro ndeyekuwana kuenderana neMongoDB, uye kuita kuchiri kudzoserwa kumashure.

Pashanduko dzekushanda mushanduro itsva, pane tsigiro yevashandisi vese vakangwara, "$e" kuenzanisa opareta, pamwe ne "$elemMatch" uye "$bitsAllClear" vanoshanda.

Finalmente kune avo vanofarira kuziva zvakawanda nezvazvo, ivo vanofanirwa kuziva kuti iyo kodhi yakanyorwa muGo uye inogoverwa pasi peApache 2.0 rezinesi uye unogona kutarisa kodhi yayo mune inotevera link.


Izvo zviri muchinyorwa zvinoomerera pamisimboti yedu ye tsika dzekunyora. Kuti utaure chikanganiso tinya pano.

Iva wekutanga kutaura

Siya yako yekutaura

Your kero e havazobvumirwi ichibudiswa.

*

*

  1. Inotarisira data: AB Internet Networks 2008 SL
  2. Chinangwa cheiyo data: Kudzora SPAM, manejimendi manejimendi.
  3. Legitimation: Kubvuma kwako
  4. Kutaurirana kwedata
  5. Dhata yekuchengetedza: Dhatabhesi inobatwa neOccentus Networks (EU)
  6. Kodzero: Panguva ipi neipi iwe unogona kudzora, kupora uye kudzima ruzivo rwako