Coder Social home page Coder Social logo

Comments (35)

ducas avatar ducas commented on June 12, 2024 2

hi rob. are you just waiting on someone to validate this? do you have a nuget package around for the v2 branch? if not can you put up a prerelease build somewhere so we can test it easily?

from mongorepository.

RobThree avatar RobThree commented on June 12, 2024

I'm considering a separate branch / project for this; this way we can keep supporting the 1.x driver ("the 1.x series of the driver will continue to be developed") and the 2.x driver. Any thoughts on this are welcome. PR's too ;-)

from mongorepository.

Scratch-net avatar Scratch-net commented on June 12, 2024

Hi and thanks for not forgetting about us. I also hope to see async 2.0 mongodb driver version support soon.

from mongorepository.

fabslab avatar fabslab commented on June 12, 2024

The separate branch sounds good.

from mongorepository.

RobThree avatar RobThree commented on June 12, 2024

PR's are very welcome; I am currently very busy and notced that there are pretty much breaking changes...

from mongorepository.

fabslab avatar fabslab commented on June 12, 2024

The API is very different.. I've started a branch on my fork https://github.com/fsbdev/MongoRepository/tree/v2.x which I've updated partially for the new API, replacing implementations where I understand what to do in the new API (mostly the collection CRUD calls).
There are many other methods that I'm not sure yet how to implement with the new API, some related to indexes. For those I have simple added throw new NotImplementedException() in order to get things to compile in the meantime.
I also removed the .NET 3.5 and 4.0 projects from the solution in this branch since the 2.0 driver dropped support for them.
If anyone wants to add to my progress please feel welcome. This is just a first dive, I haven't performed any tests on the current change yet.

from mongorepository.

fabslab avatar fabslab commented on June 12, 2024

I've added support for EnsureIndex now (which uses the CreateIndex method underneath). https://github.com/fsbdev/MongoRepository
Still quite a bit to go but could be enough to start testing for some. Contributions welcome.

from mongorepository.

fabslab avatar fabslab commented on June 12, 2024

I should point out though that the 2.0 driver doesn't support LINQ as 1.0 did, they are rewriting the LINQ provider and will have support back in 2.1.

from mongorepository.

RobThree avatar RobThree commented on June 12, 2024

I should point out though that the 2.0 driver doesn't support LINQ as 1.0 did, they are rewriting the LINQ provider and will have support back in 2.1.

Yeah, I found that out too. Maybe it'd be wise to wait for 2.1. Not sure.

from mongorepository.

fabslab avatar fabslab commented on June 12, 2024

Yeah I probably will.

from mongorepository.

amatlock930 avatar amatlock930 commented on June 12, 2024

Is there any progress on supporting the latest mongo driver and async operations? I see there are some forks that seem to be working on this, but they don't seem to be active.

from mongorepository.

fabslab avatar fabslab commented on June 12, 2024

I was waiting for LINQ support to come back (2.1 last time I checked).

from mongorepository.

cccsdh avatar cccsdh commented on June 12, 2024

https://github.com/cccsdh/NLog.MongoDB20 - you could use this fork of the project...

from mongorepository.

vegar avatar vegar commented on June 12, 2024

Wouldn't it at least be an option to compile MongoRepository against the legacy driver that comes with the 2.0.* packages? That way it's possible to have MongoRepository co-exists with code that uses the new driver.

from mongorepository.

RobThree avatar RobThree commented on June 12, 2024

@vegar You could try to update the driver and run the unittests and let me know; I am currently very busy selling my house, moving and working so it may be a little while before I get around to it. Sorry.

from mongorepository.

vegar avatar vegar commented on June 12, 2024

I have a local branch that runs the tests ok, but I had to remove net3.5/4.0 support.

from mongorepository.

RobThree avatar RobThree commented on June 12, 2024

I could be mistaken but some methods (like GetTotalDataSize(), GetTotalStorageSize(), RequestStart() and RequestDone()) aren't supported anymore under 2.0.1 and GetServer() is obsoleted, isn't it?
We could use the 1.9.X for 3.5/4.0 support.

from mongorepository.

vegar avatar vegar commented on June 12, 2024

Yes, the methods mentioned are gone, but I didn't see any problems with GetServer().

I have made a pull request (#11) with my changes, so if you have some time in beween selling houses and getting some work done... ;-)

from mongorepository.

RobThree avatar RobThree commented on June 12, 2024

I appreciate the PR but I do have a few issues with it. Sorry.

  • There's no need to remove the GetTotalDataSize() and GetTotalStorageSize(); these are still available but via GetStats().DataSize and GetStats().StorageSize.
  • I'm not sure support for RequestStart() and RequestDone() is still there via alternative methods or if it has been dropped; in the latter case we should (I think) also drop the RequestStart() and RequestDone() methods. However, if there's still support via alternative methods we should at least try to make an effort to implement it without changing/breaking MongoRepository's public API.
  • I think simply dropping support for .Net 3.5/4.0 is, also, something that shouldn't be taken lightly; if there's a way to still support 3.5/4.0 we should make an effort. As I mentioned, we may still be able to provide support by using the 1.9.x driver for those platforms.

Not that I'm complaining, I'm grateful for the effort and PR, but I'd rather take a little more time than breaking people's projects when there's (possible) alternatives.

from mongorepository.

chris-kwng avatar chris-kwng commented on June 12, 2024

Hi Rob,

FYI:

Robert Stam (from MongoDB):

Yes, LINQ support is planned for version 2.1.

Me:

When will Version 2.1 come out?

Andy Kor (from MongoDB):

No date, but....

We are almost feature complete for 2.1. LINQ is in Code Review right now, GridFS is getting finished up. We'll push a release candidate first to get feedback.

Best regards,
Chris

from mongorepository.

RobThree avatar RobThree commented on June 12, 2024

Sweet!

from mongorepository.

chemitaxis avatar chemitaxis commented on June 12, 2024

Hi guys, I was using MongoRepository 1.6.4.0 and all was working fine. My Database Provider has migrate the databases to version 3.0, and all my querys is not working now. I have updated the driver to connect to 3.0, and MongoRepository is not working now (bad results)... I have read all about this, but I don't know if I can test or something to make these MongoRepositry works fine... Thanks!!!!

from mongorepository.

RobThree avatar RobThree commented on June 12, 2024

You could try 1.6.8 (maybe force driver version 1.10.1 using Install-Package mongocsharpdriver -Version 1.10.1). Other than that I'm afraid we're going to sit this one out; we rely too much on the underlying driver's functionality to be able to provide all features we currently do. You could also define "bad results"; I'm not sure how to interpret that. Do you get errors? Unexpected results (but results nonetheless) or...?

from mongorepository.

vegar avatar vegar commented on June 12, 2024

I guess the most important thing to clarify is if the csharp-driver/mongorepository creates a different query now then before, or if mongo 3.0 executes the query differently.

You can turn on full profiling on the mongo server to see what query is executed.

Upgrading the server to version 3.0 should not affect anything, though. In theory...

from mongorepository.

chris-kwng avatar chris-kwng commented on June 12, 2024

MongoDB .NET Driver Version 2.1.0-rc0 is out. Seen? Go, go, go! :-P

from mongorepository.

mellodev avatar mellodev commented on June 12, 2024

2.2.0-rc0 was released yesterday, which introduces sync versions of all async methods:

"The 2.0 and 2.1 versions of the .NET driver featured a new async-only API. Some users gave us feedback that they wanted a choice whether to use a sync or an async API. Version 2.2 introduces sync versions of every async method."

https://github.com/mongodb/mongo-csharp-driver/releases/tag/v2.2.0-rc0

from mongorepository.

chemitaxis avatar chemitaxis commented on June 12, 2024

Hi guys!! What is the real state of this project? Thanks!!

from mongorepository.

RobThree avatar RobThree commented on June 12, 2024

PR's are welcome; other than that the current branches show the state as it currently is.

I still aim to get this done rather sooner than later but I've been very busy and with Christmas etc. coming up I don't see much improvement for the short term. Sorry; but again: feel free to start work and submit a PR πŸ˜‰

from mongorepository.

RobThree avatar RobThree commented on June 12, 2024

I've started a V2 branch and started initial work on it. But I'm still getting used to the V2 C# driver and haven't implemented everything yet. I hope to get some work done during the holidays but don't hold your breath... πŸ˜›

from mongorepository.

RobThree avatar RobThree commented on June 12, 2024

I think I made some nice progress. The sync part of the Repository should be almost done; that would probably be a 2.0 release and for 2.1 we could focus on Async support and maybe optimizing / cleaning up the current code a bit.

from mongorepository.

chemitaxis avatar chemitaxis commented on June 12, 2024

Thank you very much!!! ;) very good job I will try to help you with some
tasks!!
El El jue, 17 dic 2015 a las 18:13, Rob Janssen [email protected]
escribiΓ³:

I think I made some nice progress
c901f60.
The sync part of the Repository should be almost done; that would probably
be a 2.0 release and for 2.1 we could focus on Async support and maybe
optimizing / cleaning up the current code a bit.

β€”
Reply to this email directly or view it on GitHub
#4 (comment)
.

from mongorepository.

RobThree avatar RobThree commented on June 12, 2024

I think I have implemented the 2.0 version for the most part (the sync part that is). But I haven't tested anything yet and the (poor) current unittests (although all green) really deserve to be dropped entirely and rewritten to a decent test-suite.

I kept 2.0 (let's call it 'alpha' for the time being) mostly backward compatible. Most notable changes are:

MongoRepository

  • Dropped: RequestStart() and RequestDone() methods
  • Collection property was of type MongoCollection<T>, now IMongoCollection<T>

MongoRepositoryManager

  • Dropped: EnsureIndexes(IMongoIndexKeys keys, IMongoIndexOptions options) overload
  • GetIndexes() method was of type GetIndexesResult, now List<BsonDocument>

Particularly the GetIndexes() method I would like to have another look at to maybe wrap it in a GetIndexesResult class from the MongoRepository namespace, as I've done with CollectionStatsResult and ValidateCollectionResult classes (which, by the way, are now a copy from the mongo-csharp-driver and will probably need to be re-implemented/re-written for licensing issues..?).

So there's still work left to be done; in order of importance:

  • Unittests, testing, testing, testing!
  • Try to 'fix' the GetIndexes() method on the MongoRepositoryManager to again return a GetIndexesResult for (better) backward compatibility
  • Before we go 2.0 I'd like to seriously consider issue #19; the 1.0 > 2.0 switch would be the perfect time to do this.
  • Go over code to look for improvements (particularly in the performance department)
  • Make sure we don't get into trouble (licensing-wise) with the CollectionStatsResult, ValidateCollectionResult and possibly (to be implemented/created) GetIndexesResult classes (see above)
  • Async support (2.1)

I have rewritten the V2 branch pretty much from the wrist without deep knowledge of the new driver and am quite sure there's lots of room for improvement. Also, I havent tested many things (yet), particularly in the MongoRepositoryManager department.

Anyone and everyone who wants to give the V2 branch a whirl to see how it performs, what works, what is broken etc. is very welcome! Simply clone, compile and reference the V2 in your (toy)project.

We are still very much in alpha, DO NOT use in production or for anything serious other than for testing purposes!

from mongorepository.

RobThree avatar RobThree commented on June 12, 2024

Aside from PR #8 I'm curious if there's any feedback on the progress so far. I'd like to begin finalizing and work towards a 2.0 release.

from mongorepository.

ukurt avatar ukurt commented on June 12, 2024

hello,

Is there any progress about IMongoCollection version ? We will go to production but we are waiting for your new API :)

from mongorepository.

RobThree avatar RobThree commented on June 12, 2024

Is there any progress about IMongoCollection version ? We will go to production but we are waiting for your new API :)

I think I was pretty clear here and here, as is the help wanted tag. So maybe you shouldn't wait but help out πŸ˜‰

from mongorepository.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.