[pylons-discuss] Re: Good gridview component for pyramid

2015-09-29 Thread Dmitry Komarov
At the pyramid freenode IRC I was advised to use js libraries for grid rendering on the client. But if you don't mind I would like to listen about server-side options too : ) -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe fro

Re: [pylons-discuss] Re: advice for sending events back to javascript from pyramid (redis, polling, asyc, etc)

2015-09-29 Thread Iain Duncan
Do any of you have any experience using cyclone for handling the redis-to-client side of things? iain On Tue, Sep 29, 2015 at 5:32 PM, Iain Duncan wrote: > Thanks everyone. To clarify for Jonathan, we're using RabbitMQ as our bus > for jobs between web services and worker processes, while I'm t

[pylons-discuss] Good gridview component for pyramid

2015-09-29 Thread Dmitry Komarov
Do you know any good server-side html grid generators for pyramid? Desired features: paging, sorting, column filters -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an ema

Re: [pylons-discuss] Re: advice for sending events back to javascript from pyramid (redis, polling, asyc, etc)

2015-09-29 Thread Iain Duncan
Thanks everyone. To clarify for Jonathan, we're using RabbitMQ as our bus for jobs between web services and worker processes, while I'm thinking Redis as a fast way to get messages back to client apps, mostly because the cost of a request checking Redis is so low. I could see our use of RabbitMQ fo

Re: [pylons-discuss] Re: advice for sending events back to javascript from pyramid (redis, polling, asyc, etc)

2015-09-29 Thread Jonathan Vanasco
I'm a firm believer in devising an upgradable proof-of-concept system. What drew us to this approach is that we could proof it out relatively quickly, and then just scale it out as needed in a rather performant manner -- making tradeoffs against dev time, dev-ops time, and performance. We ha

[pylons-discuss] Re: How to check in view code if it runs in development or production mode now?

2015-09-29 Thread Dmitry Komarov
Thanks to all! Your answers were inspiring, detailed and useful! -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com.

Re: [pylons-discuss] advice for sending events back to javascript from pyramid (redis, polling, asyc, etc)

2015-09-29 Thread Vincent Catalano
Iain, After reading your question again I should clarify that RabbitMQ would not be a solution for sending back a response in your case. RabbitMQ can be used in if you want to communicate between your Pyramid and Django app and services, it would not allow you to "push" responses from your server

Re: [pylons-discuss] advice for sending events back to javascript from pyramid (redis, polling, asyc, etc)

2015-09-29 Thread Vincent Catalano
Hey Iain, I think Jonathan's solution is pretty much spot on. As far as application messaging goes, I think you may be a bit confused, RabbitMQ is a messaging application that's written in Erlang. By default, RabbitMQ uses it's own message broker called AMQP, but you can swap it out for any number

Re: [pylons-discuss] advice for sending events back to javascript from pyramid (redis, polling, asyc, etc)

2015-09-29 Thread Iain Duncan
Hi Paul, yeah SSE looks good too, but there is zero IE support. :-/ Have you any real world experience of using HTTP Server-Side-Events on IE with polyfills? iain On Tue, Sep 29, 2015 at 3:13 PM, Paul Everitt wrote: > > As an alternative to polling to get the Redis state, you could consider >

Re: [pylons-discuss] Re: advice for sending events back to javascript from pyramid (redis, polling, asyc, etc)

2015-09-29 Thread Iain Duncan
Thanks Jonathan, your solution is what I was leaning to for proof-of-concept, good to know it's somewhat performant too. I don't know enough about fast response time situations to really know the pros and cons of short-polling, long-polling, and websockets. Did you also look into erlang at all? I

Re: [pylons-discuss] advice for sending events back to javascript from pyramid (redis, polling, asyc, etc)

2015-09-29 Thread Paul Everitt
As an alternative to polling to get the Redis state, you could consider HTTP server-side-events. —Paul > On Sep 29, 2015, at 5:41 PM, Jonathan Vanasco wrote: > > we have a similar situation. `pyramid` is the main web application. when a > user uploads a file, it is handed off to `celery` v

[pylons-discuss] Re: advice for sending events back to javascript from pyramid (redis, polling, asyc, etc)

2015-09-29 Thread Jonathan Vanasco
we have a similar situation. `pyramid` is the main web application. when a user uploads a file, it is handed off to `celery` via `redis`, which handles all the image resizing and uploading onto S3. the solution we went with: • short polling on a configurable delay. We default to 2500ms, and h

Re: [pylons-discuss] advice for sending events back to javascript from pyramid (redis, polling, asyc, etc)

2015-09-29 Thread Iain Duncan
Thanks Vincent, so the answer component can be a pyramid app doing long polling off the redis store? Do you think there is any need for getting to gevent for such a thing? (it will def be a separate python package from the upload app anyway) On Tue, Sep 29, 2015 at 1:15 PM, Vincent Catalano < vinc

Re: [pylons-discuss] advice for sending events back to javascript from pyramid (redis, polling, asyc, etc)

2015-09-29 Thread Vincent Catalano
Hello Iain, It looks like you are going in the right direction. Unfortunately, since you are supporting IE9 you are a bit limited with what you can work with. Although there are some workarounds and poly-fills for web sockets in IE9, I definitely think that long polling is the way to go. As far as

[pylons-discuss] advice for sending events back to javascript from pyramid (redis, polling, asyc, etc)

2015-09-29 Thread Iain Duncan
Hoping for some advice from veterans here. We're cooking up a system that does the following: - client angular app uploads a document (not a very frequent operation) to pyramid app - pyramid app receives it, and dispatches it to a worker over rabbitmq where many version are generated a

[pylons-discuss] Re: Sending mail and exception reports

2015-09-29 Thread Jonathan Vanasco
We use pyramid_mailer and enjoy it. We're a bit heavily invested into it though, because of some custom & approved patches + transaction support. In terms of exception reporting -- we do exception logging into SQL via a custom tween. It's super simple code. Logging into an immediate mail send

[pylons-discuss] Re: How to check in view code if it runs in development or production mode now?

2015-09-29 Thread Jonathan Vanasco
If you don't want to deal with examining the request each time, you can populate the templating environment with a variable or even a function/package that has the tests using event subscribers. def BeforeRender_event(event): request = event.get("request") or threadlocal.get_current_request(

Re: [pylons-discuss] How to check in view code if it runs in development or production mode now?

2015-09-29 Thread tomster
i too avoid running test code or checks for test code in production. instead i switch on startup (i.e. in __init__.py:configure) here i check for flags in the setting and then register (scan) or ignore certain files or folders (i.e. to mock external authentication in development etc.) this means

Re: [pylons-discuss] How to check in view code if it runs in development or production mode now?

2015-09-29 Thread Mike Orr
On Mon, Sep 28, 2015 at 8:28 PM, Dmitry Komarov wrote: > I want kind of #ifdef in my web service code, condition which checks if this > code runs in production or in development mode at the time of check. > What's the best and simpliest way? I'm using settings like 'appname.devel', 'appname.devel

[pylons-discuss] How to check in view code if it runs in development or production mode now?

2015-09-29 Thread Dmitry Komarov
I want kind of #ifdef in my web service code, condition which checks if this code runs in production or in development mode at the time of check. What's the best and simpliest way? How can I get config name from `pserve config_name.ini` command in my view code? -- You received this message be