perl driver patch

23 views
Skip to first unread message

Graham Barr

unread,
Sep 20, 2010, 6:34:20 PM9/20/10
to mongodb-dev
What is the preferred way to submit patches ?

A few days ago I submitted a pull request on github, but I am unsure who gets those as there has been no response.

The commit it at http://github.com/gbarr/mongo-perl-driver/tree/bson_to_sv

The patch allows perl level access to perl_mongo_bson_to_sv

I am currently writing an AnyEvent::MongoDB driver with a traditional AE callback API.
Exposing this function to perl allows me to reuse the work already done and not
have to duplicate.

Graham.

Kristina Chodorow

unread,
Sep 20, 2010, 6:50:41 PM9/20/10
to mongo...@googlegroups.com
Thanks for the commit, I've merged it in!

Sorry about that, Github only sends the pull request to the MongoDB user, so no one sees them.  The best way is to do a pull request, then CC a developer or open a bug (either at jira.mongodb.org or CPAN).

Also, nightsailer has been working on an AnyEvent driver, you might want to check that out, too: http://jira.mongodb.org/browse/PERL-83.




--
You received this message because you are subscribed to the Google Groups "mongodb-dev" group.
To post to this group, send email to mongo...@googlegroups.com.
To unsubscribe from this group, send email to mongodb-dev...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mongodb-dev?hl=en.


Graham Barr

unread,
Sep 20, 2010, 6:59:47 PM9/20/10
to mongo...@googlegroups.com
On Sep 20, 2010, at 17:50 , Kristina Chodorow wrote:

Thanks for the commit, I've merged it in!

Sorry about that, Github only sends the pull request to the MongoDB user, so no one sees them.  The best way is to do a pull request, then CC a developer or open a bug (either at jira.mongodb.org or CPAN).

github has made recent changes to the pull request form. it seems very difficult now to CC people of the pull. unless I am missing something.


Also, nightsailer has been working on an AnyEvent driver, you might want to check that out, too: http://jira.mongodb.org/browse/PERL-83.

I have talked with nightsailor. His main module is Any::Mongo and tries to follow the same API as MongoDB itself.

He did also take the AnyEvent::MongoDB namespace on CPAN, but has freed that and assigned co-maint to me so my module can use that space as mine uses a callback API similar to many other AE modules.

Graham.

Kristina Chodorow

unread,
Sep 20, 2010, 8:40:51 PM9/20/10
to mongo...@googlegroups.com
github has made recent changes to the pull request form. it seems very difficult now to CC people of the pull. unless I am missing something.

That's too bad, most people didn't even CC before they made it hard.  Well, just make sure someone with commit rights knows about it, we definitely don't mean to ignore patches!


He did also take the AnyEvent::MongoDB namespace on CPAN, but has freed that and assigned co-maint to me so my module can use that space as mine uses a callback API similar to many other AE modules.

 Cool, I'd love to try it out when you have it working!

nightsailer

unread,
Sep 21, 2010, 1:05:01 PM9/21/10
to mongodb-dev
Oh, cool.

I had to copy & paste most mongoDB XS into AnyMongo before this
patch ;-(

BTW, I've write extras bson_decode and bson_encode into BSON package,
do you want to merge?

SV*
bson_encode(SV *sv)
INIT:
buffer buf;
CODE:
CREATE_BUF(INITIAL_BUF_SIZE);
perl_mongo_sv_to_bson(&buf,sv,NO_PREP);
RETVAL = newSVpvn(buf.start, buf.pos-buf.start);
Safefree(buf.start);
OUTPUT:
RETVAL

SV *
bson_decode(char *bson)
INIT:
buffer buf;
CODE:
buf.start = bson;
buf.end = bson+strlen(bson);
buf.pos = bson;
RETVAL = perl_mongo_bson_to_sv(&buf);
OUTPUT:
RETVAL


AlSO see:

http://github.com/nightsailer/any-mongo/blob/master/AnyMongo.xs

I think it useful to write some BSON related stuff future, like Ruby
driver.

Good job, Graham!

I'm working on traditional AE callback API too, his work is helpful
to me ;-)
But, I still try to keep same or compatible API with MongoDB meantime,
with power of Coro::AnyEvent, we can write code clear,easy and
"normal",
help us port our old application to Coro/AE environment much quickly.


On 9月21日, 上午6时50分, Kristina Chodorow <krist...@10gen.com> wrote:
> Thanks for the commit, I've merged it in!
>
> Sorry about that, Github only sends the pull request to the MongoDB user, so
> no one sees them.  The best way is to do a pull request, then CC a developer
> or open a bug (either at jira.mongodb.org or CPAN).
>
> Also, nightsailer has been working on an AnyEvent driver, you might want to
> check that out, too:http://jira.mongodb.org/browse/PERL-83.
>
>
>
> On Mon, Sep 20, 2010 at 6:34 PM, Graham Barr <gmb...@gmail.com> wrote:
> > What is the preferred way to submit patches ?
>
> > A few days ago I submitted a pull request on github, but I am unsure who
> > gets those as there has been no response.
>
> > The commit it athttp://github.com/gbarr/mongo-perl-driver/tree/bson_to_sv
>
> > The patch allows perl level access to perl_mongo_bson_to_sv
>
> > I am currently writing an AnyEvent::MongoDB driver with a traditional AE
> > callback API.
> > Exposing this function to perl allows me to reuse the work already done and
> > not
> > have to duplicate.
>
> > Graham.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "mongodb-dev" group.
> > To post to this group, send email to mongo...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > mongodb-dev...@googlegroups.com<mongodb-dev%2Bunsubscribe@googlegr oups.com>
> > .

Graham Barr

unread,
Sep 21, 2010, 1:13:43 PM9/21/10
to mongo...@googlegroups.com

On Sep 20, 2010, at 19:40 , Kristina Chodorow wrote:

> github has made recent changes to the pull request form. it seems very difficult now to CC people of the pull. unless I am missing something.
>
> That's too bad, most people didn't even CC before they made it hard. Well, just make sure someone with commit rights knows about it, we definitely don't mean to ignore patches!

I wrote to github support and they replied with

We recently rolled out a fairly large overhaul of pull requests:

http://github.com/blog/712-pull-requests-2-0

Notifications are now sent to everyone with push access to the destination repository. We'll be adding support for targeted notifications in the future.

But your obviously have push access to the repository, so maybe there is a bug somewhere.

Graham.

Kristina Chodorow

unread,
Sep 21, 2010, 2:38:36 PM9/21/10
to mongo...@googlegroups.com
BTW, I've write extras bson_decode and bson_encode into BSON package,
do you want to merge?

Sure!  Want to send a pull request? :)

Also, making a separate BSON package would be useful (if anyone's interested in working on that).


But your obviously have push access to the repository, so maybe there is a bug somewhere.

Must be, the last pull request I got was a month ago.  I'll contact their support.



Graham.

Reply all
Reply to author
Forward
0 new messages