[LRUG] Ruby on Rail 4.2 networking breakfast (Graeme McCubbin) (Andrew White)

James Ladd ladd.james at gmail.com
Mon Jul 7 15:40:12 PDT 2014


>>Why are you trying to make things complicated by calling back via HTTP
into your app?
Fascinating. One mans simple is another mans complicated.

Backgound processing libraries introduce another level of abstraction and
indirection.
You have to write another adaptor to call the logic, we already have that,
its called a controller.

There is a need to go back over the wire, which I outlined. However,
depending on the
OS it won't actually make it over physical wire.

>>  env = Rack::MockRequest.env_for('/')
>>  status, headers, body = PagesController.action(:index).call(env)

This doesn't test the stack of the app the way a client does.
And this represents an overhead just like calling a 3rd party library like
Sidekq. So now we can
discuss which offers more consistency and less overhead.

If I use a controller to call a method on my object and that same method is
called via Sidekq
then I have two tests to write, one for it being called by the controller
and one for it being
called by Sidekq. Using a http request is saving code and tests and the
overhead is not proven
to be higher than Sidekq or some other background processing library.

Please don't get me wrong, I appreciate you taking the time to answer my
query.

- James.

On Tue, Jul 8, 2014 at 7:02 AM, <chat-request at lists.lrug.org> wrote:

> Send Chat mailing list submissions to
>         chat at lists.lrug.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         http://lists.lrug.org/listinfo.cgi/chat-lrug.org
> or, via email, send a message with subject or body 'help' to
>         chat-request at lists.lrug.org
>
> You can reach the person managing the list at
>         chat-owner at lists.lrug.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Chat digest..."
>
>
> Today's Topics:
>
>    1. Re: Ruby on Rail 4.2 networking breakfast (Graeme McCubbin)
>       (Andrew White)
>    2. [JOBS] Lead Developer at Picfair (Benji Lanyado)
>    3. Re: [JOBS] Lead Developer at Picfair (Najaf Ali)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sun, 6 Jul 2014 23:00:45 +0100
> From: Andrew White <andrew.white at unboxedconsulting.com>
> To: "chat at lists.lrug.org" <chat at lists.lrug.org>
> Subject: Re: [LRUG] Ruby on Rail 4.2 networking breakfast (Graeme
>         McCubbin)
> Message-ID:
>         <3C0AC133-5331-45DC-9CDF-4FE8552E841A at unboxedconsulting.com>
> Content-Type: text/plain; charset=us-ascii
>
>
> On 6 Jul 2014, at 22:26, James Ladd <ladd.james at gmail.com> wrote:
>
> > Simply we want to test our app which receives a http request through
> rails and in response to that request it can fire off background events
> also via http to the same application.
>
> Why are you trying to make things complicated by calling back via HTTP
> into your app? Even if for some strange reason a background processing
> library like Sidekiq or Resque doesn't do what you need there's no need to
> go back over the wire - just call the Rack endpoint directly. For example
> you can call a controller action like this:
>
>   env = Rack::MockRequest.env_for('/')
>   status, headers, body = PagesController.action(:index).call(env)
>
> Though I wouldn't recommend this as a real solution - you should
> refactoring your code so you can call it directly without the request
> overhead.
>
> > and even a nil doesn't understand reverse in the SQL layer.
>
> I'm not sure exactly what you're saying here - please expand on what you
> mean.
>
>
> Andrew White
> Rails Core Team Member
>
>
>
> ------------------------------
>
> Message: 2
> Date: Mon, 7 Jul 2014 11:19:56 +0100
> From: Benji Lanyado <benjilanyado at gmail.com>
> To: London Ruby LRUG <chat at lists.lrug.org>
> Subject: [LRUG] [JOBS] Lead Developer at Picfair
> Message-ID:
>         <CAHK1NnSbYy-h469b1z0AwkAODZCcc1C7EAg2aF2Pm=
> EECtC0dA at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hello LRUGgers
>
> Picfair <https://www.picfair.com/> is looking for a Ruby developer.
>
> *What?*
>
> Picfair is a recently-funded
> <
> http://techcrunch.com/2014/06/08/picfair-raises-520k-to-take-on-getty-with-an-image-marketplace/
> >
> (investors
> include Alexis Ohanian, Reddit founder) image licensing marketplace,
> connecting photographers directly to buyers. I'm sorry to do this, but the
> analogy works: it's AirBnB for images. We are gunning for Shutterstock and
> Getty - they constrict supply and take the vast majority of royalties in a
> $6bn market. We do neither, and want to take that market from them.
>
> Picfair is very young, but already has 50,000 ridiculously good
> <
> https://www.picfair.com/posts/best-of-2013-picfair-picks-images-of-the-future
> >
> images
> uploaded by 4,000 photographers in 60 different countries. We've made them
> thousands of pounds already, have had images licensed from website
> backgrounds to newspaper front pages. We've barely even started. The next
> few years are going to be incredibly exciting.
>
> *Who*
>
> I'm Benji, the founder of the company: a recovering journalist (NYT,
> Guardian - I still dabble, when I feel like kicking Tech City
> <
> http://www.theguardian.com/commentisfree/2014/jun/30/tech-city-subsidise-code-schools-year-of-code
> >)
> who learnt how to code
> <
> http://www.fastcolabs.com/3013699/open-company/how-this-journalist-turned-coder-built-his-startup-for-6000
> >
> in
> order to build the site. Yes - *gasp* - a CEO who codes.
>
> So far, Team Picfair are four: a brilliant and disconcertingly young junior
> designer/developer <https://www.behance.net/jcklydesign>; an equally
> brilliant and disconcertingly young Growth Marketer
> <https://twitter.com/MissEm_ma>; an Editorial Manager
> <https://www.picfair.com/users/salxhart>with the eye of a Guggenheim
> curator; and me. We work in a very fun shared workplace in Shoreditch
> <https://twitter.com/benjilanyado/status/476673719059099648>, alongside 10
> other startups.
>
> The phenomenal Rik Lomas <https://twitter.com/riklomas> has been looking
> after Picfair's product for the last few months, and is now off to launch
> something new (watch this space, you'll love it), so, we're looking for a
> ....
>
> *Lead Developer*
>
> Picfair currently has a single aim: do whatever it takes to get sh*t loads
> of good images onto the site, building up to a benchmark when the company's
> focus can swing to the other side of the market, launching an all-pronged
> attack on the industry incumbents.
>
> Picfair's Lead Developer will oversee and build a variety of things that
> will get it there. The challenges are big - we want to be managing millions
> of images, uploaded from thousands of locations, very soon. We are looking
> for someone who is as skilled at writing code as they are at organisation:
> Picfair is a Get Sh*t Done company.
>
> - 5 years min RoR experience
> - Excellent code/deployment planning and management skills
> - Very good Javascript (Backbone/jQuery), good front end skills, and good
> design/UX instinct
> - Experience in scaling web apps & DBs from quite big to REALLY BIG.
> - Someone who is passionate about what they do.
> - Competitive salary & EMI scheme
>
> If you're interested, please send over your CV and Github. Looking forward
> to hearing from you.
>
> Benji Lanyado
> Founder, Picfair.com
> benjlabs.com
> Guardian <http://www.guardian.co.uk/profile/benjilanyado> | NYT
> <http://query.nytimes.com/gst/search.html?query=%20BENJI%20LANYADO> |
> Starting
> up <http://benjilanyado.wordpress.com/2013/04/29/starting-up-an-intro/> |
> RedditEdit <http://redditedit.com/>
> Twitter <https://twitter.com/#!/benjilanyado>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://lists.lrug.org/pipermail/chat-lrug.org/attachments/20140707/768d43c4/attachment.html
> >
>
> ------------------------------
>
> Message: 3
> Date: Mon, 7 Jul 2014 11:28:03 +0100
> From: Najaf Ali <ali at happybearsoftware.com>
> To: Benji Lanyado <benjilanyado at gmail.com>
> Cc: London Ruby LRUG <chat at lists.lrug.org>
> Subject: Re: [LRUG] [JOBS] Lead Developer at Picfair
> Message-ID:
>         <
> CAPByDDE30m4wGUvLnZ4FVMUqV3YMC4gEDH6dM_jqiHkzS4WqiA at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Benji asked me to come on board last year when Picfair wasn't anywhere near
> as successful as it is now. If I were more amenable to FTE I'd be kicking
> myself. It's *very* rare that you find a startup founder that has anything
> like a hope in hell of succeeding, but I wouldn't bet against Benji. If you
> want to do the whole startup CTO thing and actually build something people
> with use, apply!
>
>
>
>
> On Mon, Jul 7, 2014 at 11:19 AM, Benji Lanyado <benjilanyado at gmail.com>
> wrote:
>
> > Hello LRUGgers
> >
> > Picfair <https://www.picfair.com/> is looking for a Ruby developer.
> >
> > *What?*
> >
> > Picfair is a recently-funded
> > <
> http://techcrunch.com/2014/06/08/picfair-raises-520k-to-take-on-getty-with-an-image-marketplace/>
> (investors
> > include Alexis Ohanian, Reddit founder) image licensing marketplace,
> > connecting photographers directly to buyers. I'm sorry to do this, but
> the
> > analogy works: it's AirBnB for images. We are gunning for Shutterstock
> and
> > Getty - they constrict supply and take the vast majority of royalties in
> a
> > $6bn market. We do neither, and want to take that market from them.
> >
> > Picfair is very young, but already has 50,000 ridiculously good
> > <
> https://www.picfair.com/posts/best-of-2013-picfair-picks-images-of-the-future>
> images
> > uploaded by 4,000 photographers in 60 different countries. We've made
> them
> > thousands of pounds already, have had images licensed from website
> > backgrounds to newspaper front pages. We've barely even started. The next
> > few years are going to be incredibly exciting.
> >
> > *Who*
> >
> >  I'm Benji, the founder of the company: a recovering journalist (NYT,
> > Guardian - I still dabble, when I feel like kicking Tech City
> > <
> http://www.theguardian.com/commentisfree/2014/jun/30/tech-city-subsidise-code-schools-year-of-code
> >)
> > who learnt how to code
> > <
> http://www.fastcolabs.com/3013699/open-company/how-this-journalist-turned-coder-built-his-startup-for-6000>
> in
> > order to build the site. Yes - *gasp* - a CEO who codes.
> >
> > So far, Team Picfair are four: a brilliant and disconcertingly
> > young junior designer/developer <https://www.behance.net/jcklydesign>;
> an
> > equally brilliant and disconcertingly young Growth Marketer
> > <https://twitter.com/MissEm_ma>; an Editorial Manager
> > <https://www.picfair.com/users/salxhart>with the eye of a Guggenheim
> > curator; and me. We work in a very fun shared workplace in Shoreditch
> > <https://twitter.com/benjilanyado/status/476673719059099648>, alongside
> > 10 other startups.
> >
> > The phenomenal Rik Lomas <https://twitter.com/riklomas> has been looking
> > after Picfair's product for the last few months, and is now off to launch
> > something new (watch this space, you'll love it), so, we're looking for a
> > ....
> >
> > *Lead Developer*
> >
> >  Picfair currently has a single aim: do whatever it takes to get sh*t
> > loads of good images onto the site, building up to a benchmark when the
> > company's focus can swing to the other side of the market, launching an
> > all-pronged attack on the industry incumbents.
> >
> > Picfair's Lead Developer will oversee and build a variety of things that
> > will get it there. The challenges are big - we want to be managing
> millions
> > of images, uploaded from thousands of locations, very soon. We are
> looking
> > for someone who is as skilled at writing code as they are at
> organisation:
> > Picfair is a Get Sh*t Done company.
> >
> > - 5 years min RoR experience
> > - Excellent code/deployment planning and management skills
> > - Very good Javascript (Backbone/jQuery), good front end skills, and good
> > design/UX instinct
> > - Experience in scaling web apps & DBs from quite big to REALLY BIG.
> > - Someone who is passionate about what they do.
> > - Competitive salary & EMI scheme
> >
> > If you're interested, please send over your CV and Github. Looking
> forward
> > to hearing from you.
> >
> > Benji Lanyado
> > Founder, Picfair.com
> > benjlabs.com
> > Guardian <http://www.guardian.co.uk/profile/benjilanyado> | NYT
> > <http://query.nytimes.com/gst/search.html?query=%20BENJI%20LANYADO> |
> Starting
> > up <http://benjilanyado.wordpress.com/2013/04/29/starting-up-an-intro/>
> |
> > RedditEdit <http://redditedit.com/>
> > Twitter <https://twitter.com/#!/benjilanyado>
> >
> >
> > _______________________________________________
> > Chat mailing list
> > Chat at lists.lrug.org
> > Archives: http://lists.lrug.org/pipermail/chat-lrug.org
> > Manage your subscription:
> http://lists.lrug.org/options.cgi/chat-lrug.org
> > List info: http://lists.lrug.org/listinfo.cgi/chat-lrug.org
> >
> >
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://lists.lrug.org/pipermail/chat-lrug.org/attachments/20140707/6e1a6b08/attachment-0001.htm
> >
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> Chat mailing list
> Chat at lists.lrug.org
> Archives: http://lists.lrug.org/pipermail/chat-lrug.org
> Manage your subscription: http://lists.lrug.org/options.cgi/chat-lrug.org
> List info: http://lists.lrug.org/listinfo.cgi/chat-lrug.org
>
>
> ------------------------------
>
> End of Chat Digest, Vol 102, Issue 6
> ************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lrug.org/pipermail/chat-lrug.org/attachments/20140708/820da70e/attachment.html>


More information about the Chat mailing list