Responder review


#1

The Venerable Kennith Reitz has hacked together a http micro framework called responder. Would be curious to hear your takeaways, also a HN thread with a couple of sanic mentions here if anyone wants to hop in on the discussion.


#2

My sincere opinion would not bring any good, so I’d better keep it to myself :sweat_smile:

ITOH, it’s yet another web framework. If it doesn’t end up half-dead as vibora, then it’s a good start … Nevertheless, I really would like to see a community effort towards one specific framework (or at least a couple), instead of this “fractured” effort … Just my two cents.


#3

hahaha true! The guy has an impressive workload who knows where this ends up on the totem pole of requests3/pipenv/arrow/etc.

I liked the batteries included handling of background tasks, something I’m kind of working with right now in sanic (which isn’t hard but does feel like its a wheel that should have already been made). Would also be interested to see how he does his test client, know thats something we’ve been thinking of working on.


#4

Yeah, well, if I were him, I would open up a YouTube channel about programming or be sponsored by one tech giant (if that’s not the case already; I know a few developers in this position already). But ok, that’s just speculation.


For background tasks in Sanic, well, I’m keen to say that you could create a pool on a startup listener using aiomultiprocess, bind to your app instance and use it as you like.


And for the HTTP client, well … I’m very comfortable to use aiohttp own client when required (and if required). I’m just not comfortable in having it as a dependency of Sanic itself, since it could be part of a separate module to deal specifically with testing.


#5

Perhaps it’s just my personal “old school” preference, But I just run celery on another server and offload work to that. it’s simple and just works. Granted… not a sanic solution, but one nonetheless.


#6

celery is probably what I’m looking for honestly, loop.run_in_executor and loop.create_task for the most part works great but I wanted a better story around error handling and the ability to track these background tasks. Celery comes with that state store and ui but it also seems like an antiquated solution in this new asyncio world.


#7

Yes @abuckenheimer, it is a bit “antiquated”… :pensive: But sometimes you just need to stick with what works. I have a setup where I take requests in, push off the task to celery (on another server) and send back a message that bubbles up through websockets. Yes, a bit overkill perhaps, but it keeps my resources freely available for taking in requests.


#8

Only semi-related, but I switched from arrow to pendulum last year. My life has improved since then!


#9

I always wondered if such a switch would worth something, because I never got any complaint against arrow. What do you found better in pendulum, if you don’t mind?


#10

I love pandas Timestamps / DateOffsets / TimeDelta but I get that dragging pandas into a project just for datetime handling is a bit much, pendulumn looks like a solid alternative


#11

@vltr cross-timezone date math, mostly. Also date parsing is a bit better imho.


#12

Interesting. I see a lot of date math in my projects, using arrow. I’ll try and see what pendulum can do for me and if I’ll get better results :wink: