- [02:20] ivanfi (~ivanfi@62.159.77.164) joined #rest.
- [02:31] blongden (~blongden@nocarrier.co.uk) joined #rest.
- [03:04] Wombert (~Wombert@dslb-088-065-199-130.pools.arcor-ip.net) left irc: Quit: Wombert
- [03:44] Wombert (~Wombert@dslb-088-065-199-130.pools.arcor-ip.net) joined #rest.
- [03:51] Hakon|mbp (~hakon1@84.202.136.151) joined #rest.
- [04:14] Hakon|mbp (~hakon1@84.202.136.151) left irc: Remote host closed the connection
- [04:48] mr_yall (~mryall@host86-128-59-168.range86-128.btcentralplus.com) left irc: Ping timeout: 240 seconds
- [04:48] blongden (~blongden@nocarrier.co.uk) left #rest.
- [05:24] mikekelly (mikek@s3x0r.biz) left irc: Quit: Lost terminal
- [05:25] mikekelly (mikek@s3x0r.biz) joined #rest.
- [05:26] <mikekelly> yo!
- [05:26] <trygvis> hei!
- [05:28] <mikekelly> mamund: I think your questions to Erik were pretty fair, conversation sort of died
- [05:28] <mikekelly> technoweenie: so I'm looking at avoiding instance_eval in this templating dsl
- [05:29] <mikekelly> but it just ends up reading horrible
- [05:29] <mikekelly> https://gist.github.com/9abeb5ad16424566dae1
- [05:47] vmil86 (~vmil86@78.57.245.80) joined #rest.
- [06:05] grove (~grove@aggw006.cappelendamm.no) left irc: Quit: grove
- [06:33] <Wombert> oi
- [06:33] <mikekelly> oi oi
- [06:35] gchristensen (~gchristen@unaffiliated/grahamc) left irc: Ping timeout: 240 seconds
- [06:37] hoelzro (~hoelzro@208.70.82.85) joined #rest.
- [06:39] <technoweenie> mikekelly: yea its a matter of implicit vs explicit
- [06:39] <mikekelly> technoweenie: right - if I use instance_eval the problem is it makes it impossible to use your own object with, right ?
- [06:40] <technoweenie> yea, it modifies self and does unexpected things
- [06:40] <mikekelly> yeah I get it - it's just that is looks like ass if you do it any other way
- [06:40] <technoweenie> heh, ok
- [06:40] <technoweenie> do what you like
- [06:40] <technoweenie> people love rspec
- [06:40] <mikekelly> I thought all the cool kids like MiniTest now ?
- [06:41] <technoweenie> maybe
- [06:41] <mikekelly> :)
- [06:42] <mikekelly> technoweenie: do you think a templating langauge needs to give that kind of access to the scope ?
- [06:42] <mikekelly> I'm htinking it doesn't but I'm not sure if I'm just trying to conivnce myself instance_eval is 'ok'
- [06:43] <technoweenie> just make sure you have good docs i guess
- [06:43] <technoweenie> i've dealt with enough weird ass bugs in apis like that to never use them again
- [06:43] <mikekelly> did you look at the gist ?
- [06:44] <technoweenie> yea
- [06:44] <mikekelly> maybe I'm being OCD but it's not very readable to me :(
- [06:44] fu-manchu (~fumanchu@adsl-99-30-180-185.dsl.sfldmi.sbcglobal.net) joined #rest.
- [06:44] <technoweenie> i probably wouldnt use either tbh
- [06:44] <mikekelly> oh.
- [06:44] <technoweenie> they look the same to me
- [06:45] <technoweenie> some are longer because they specify the object in front?
- [06:45] <technoweenie> but you also use a long ass variable name
- [06:45] <mikekelly> dunno what else to use
- [06:46] <mikekelly> I can use objects for the obejcts_resource
- [06:46] <mikekelly> but I can't use object on the object_resource
- [06:46] <mikekelly> cos it conflicts..
- [06:46] <technoweenie> sounds like a pickle
- [06:46] <mikekelly> lol
- [06:47] <mikekelly> maybe I shoud just create a new programming langauge
- [06:47] <mikekelly> or try Python
- [06:47] bradley-holt (~bradley-h@65-183-135-35-dhcp.burlingtontelecom.net) joined #rest.
- [06:48] <technoweenie> python would have be more explicit
- [06:48] <technoweenie> wer
- [06:48] <technoweenie> python would have you be more explicit
- [06:48] <mikekelly> yeah I was just pretending to be a fickle turd
- [06:48] <mikekelly> I'm not, really
- [06:49] <technoweenie> hey follow your heart man
- [06:49] <mikekelly> lol
- [06:49] <technoweenie> dont let the feedback of one irc ass make you doubt yourself
- [06:49] <mikekelly> it's DHH too right ?
- [06:49] <mikekelly> he's like Ruby Jesus or whatver
- [06:49] <technoweenie> what is?
- [06:50] <mikekelly> the anti-instance_eval thing came from him too
- [06:50] <mikekelly> is that right ?
- [06:50] bigbluehat (~bigblueha@adsl-98-84-70-208.gsp.bellsouth.net) joined #rest.
- [06:50] <technoweenie> yea we share the same opinion on that
- [06:50] <mikekelly> heil Ruby Jesus
- [06:51] <mikekelly> ok thanks
- [06:52] <mikekelly> I guess i'll do the sensible thing and avoid instance_eval
- [06:52] <mikekelly> I guess I could just pass |hal| into the block
- [06:53] <mikekelly> yeah that's a good plan, I'll do that
- [06:53] <mikekelly> naming things..
- [06:54] <mikekelly> the only thing left to crack for me, since I've already covered cache invalidation
- [06:54] <Wombert> call it hal9000
- [06:54] <Wombert> I thought it was two things?
- [06:54] <Wombert> naming things, cache invalidation and off by one errors
- [06:54] <Wombert> :)
- [06:55] <mikekelly> OH SNAP
- [06:55] <technoweenie> mikekelly: anyways all i'm saying is its my opinion, and a lot of other rubyists use rspec and similar libraries
- [06:55] <technoweenie> so they may be more used to instance_eval
- [06:55] <mikekelly> technoweenie: yeah I'd rather cause as little friction as possible
- [06:56] <mikekelly> I think I basically agree with avoiding it, I just don't like the ugliness
- [06:56] <technoweenie> http://www.youtube.com/watch?v=Du_RTMmofWM
- [06:57] grove (~grove@193.201.9.46.customer.cdi.no) joined #rest.
- [06:57] <mikekelly> bwahaha
- [06:57] <mikekelly> I fucking love this guy
- [06:57] <mikekelly> everything he does is awesome
- [07:08] <hoelzro> hello fellow REST enthusiasts! I'm implementing a REST API, and I was wondering if it would be reasonable to return 304 Not Modified if a client PUTs a resource, but the contents of the PUT do not differ from the current representation on the server. Thoughts?
- [07:10] mikekelly shrugs
- [07:10] <Wombert> no, that'd be in violation of the HTTP specification
- [07:11] <Wombert> "If the client has performed a conditional GET request and access is allowed, but the document has not been modified, the server SHOULD respond with this status code. The 304 response MUST NOT contain a message-body, and thus is always terminated by the first empty line after the header fields."
- [07:11] <Wombert> it's for conditional requests only
- [07:11] <hoelzro> Wombert: I kind of intrepreted that as a sufficient, but not neccessary condition for 304
- [07:12] <hoelzro> if I shouldn't use 304, is there a way I should indicate to the client that "hey, the content you uploaded was already here"?
- [07:12] <Wombert> you could send a 409 Conflict if you want
- [07:13] <Wombert> or a 200 OK with a response body containing that information
- [07:13] <fu-manchu> if the contents of the PUT do not differ I'd say you finally reached the holy grail of idempotence which you wanted anyway, and 200 OK is the correct response
- [07:14] <hoelzro> fu-manchu: good point; I didn't consider that
- [07:24] gchristensen (~gchristen@unaffiliated/grahamc) joined #rest.
- [07:37] mamund shows up
- [07:39] <mamund> whoo-hoo! final proof on my "Hypermedia" book goes 'to the printer' today!
- [07:39] mamund does a happy dance
- [07:43] <mikekelly> congrats
- [07:49] Wombert high-fives mamund
- [07:50] <Wombert> oh, now that you're all here
- [07:50] <Wombert> someone asked me an interesting question the other day
- [07:50] <Wombert> how to do a CAPTCHA in a RESTful interface
- [07:50] <Wombert> I'm thinking: let the client hit the "image" URI, redirect him to a temporary URL with a CAPTCHA document (specced in the media type)
- [07:51] <Wombert> that contains a form that submits somewhere, which in turn redirects to the real image URI with some kind of key in the query string or so
- [07:51] <Wombert> that guy is already using HTTP auth for the service, so that won't work :)
- [07:51] <Wombert> anyone got a better idea?
- [08:02] DracoBlue (~Adium@dslb-088-075-066-254.pools.arcor-ip.net) joined #rest.
- [08:02] DracoBlue (~Adium@dslb-088-075-066-254.pools.arcor-ip.net) left #rest.
- [08:10] DracoBlue (~Adium@dslb-088-075-066-254.pools.arcor-ip.net) joined #rest.
- [08:10] DracoBlue (~Adium@dslb-088-075-066-254.pools.arcor-ip.net) left irc: Client Quit
- [08:12] <mamund> Wombert: umm...
- [08:12] <mamund> not too many takers on that thing, eh?
- [08:13] <mamund> honestly, i think you might be trying to push a rope up a hill<g>
- [08:15] <Wombert> :p
- [08:15] <Wombert> mamund: oh btw
- [08:15] <Wombert> mamund: HATEOAS is in itself a brilliant way to get around the read-after-write problem
- [08:16] <Wombert> a server could return Location: http://j12893zhiu12ejk.someservice.com/products/1234 after it's being created, to make sure subsequent reads always hit the correct shard, or at least a part of the system where the write is guaranteed to have been replicated to
- [08:17] <Wombert> and then every few hours or days, those "dynamic" hostnames could simply be "re-wired" to point to a load balancer again in order to make sure that there are no "hot-spots" on any domain
- [08:18] <Wombert> did I explain that well? :p
- [08:20] <whartung> o/ all
- [08:28] <mamund> whartung: yo!
- [08:47] ivanfi (~ivanfi@62.159.77.164) left #rest.
- [09:10] KevBurnsJr (~kevburnsj@c-76-126-10-63.hsd1.ca.comcast.net) left irc:
- [09:22] <trygvis> Wombert: that's a very good point
- [09:22] <trygvis> blog it!
- [09:22] <Wombert> trygvis: I guess I need to start blogging then :D
- [09:22] technoweenie (~technowee@host-86-220-9-69.midco.net) left irc: Remote host closed the connection
- [09:23] <Wombert> or, rather, I need to start blogging things other than funny cat videos :p
- [09:24] <Wombert> this might actually be doable with Varnish in an easy-ish way
- [09:24] <Wombert> obviously the idea is that you still don't hit the backend server directly
- [09:24] <Wombert> the hostname part is just supposed to help the load balancer determine where to hand the request
- [09:25] <Wombert> maybe it can be done completely dynamically and with a wildcard DNS entry
- [09:26] hoelzro (~hoelzro@208.70.82.85) left #rest.
- [09:27] <Wombert> basically you could pick a shared secret that is used to hash server names with a date or so, and all the load balancer would do is "brute-force" them for the current day
- [09:27] <Wombert> that only works for few servers though
- [09:38] KevBurnsJr (~KevBurnsJ@50.0.103.39) joined #rest.
- [09:40] <whartung> what are y'all babbling about?
- [09:45] <mikekelly> lol.
- [09:45] <mikekelly> rude.
- [09:54] Wombert (~Wombert@dslb-088-065-199-130.pools.arcor-ip.net) left irc: Quit: Wombert
- [10:00] apok (~apok@c-107-3-149-167.hsd1.ca.comcast.net) joined #rest.
- [10:12] bigbluehat (~bigblueha@adsl-98-84-70-208.gsp.bellsouth.net) left irc: Quit: Leaving.
- [10:54] gchristensen (~gchristen@unaffiliated/grahamc) left irc: Quit: Leaving...
- [10:55] gchristensen (~gchristen@unaffiliated/grahamc) joined #rest.
- [11:23] alexsdutton (~alex@comma.splice.org.uk) left irc: Ping timeout: 240 seconds
- [11:24] alexsdutton (~alex@comma.splice.org.uk) joined #rest.
- [11:34] alexsdutton (~alex@comma.splice.org.uk) left irc: Remote host closed the connection
- [11:34] alexsdutton (~alex@comma.splice.org.uk) joined #rest.
- [11:36] grove (~grove@193.201.9.46.customer.cdi.no) left irc: Quit: grove
- [11:36] bigbluehat (~bigblueha@adsl-98-84-70-208.gsp.bellsouth.net) joined #rest.
- [12:36] talios (~amrk@akl.smx.co.nz) joined #rest.
- [12:44] bradley-holt_ (~bradley-h@65-183-135-35-dhcp.burlingtontelecom.net) joined #rest.
- [12:47] bradley-holt (~bradley-h@65-183-135-35-dhcp.burlingtontelecom.net) left irc: Ping timeout: 248 seconds
- [12:47] bradley-holt_ -> bradley-holt
- [12:51] apok (~apok@c-107-3-149-167.hsd1.ca.comcast.net) left irc: Remote host closed the connection
- [12:51] apok (~apok@c-107-3-149-167.hsd1.ca.comcast.net) joined #rest.
- [13:12] bradley-holt (~bradley-h@65-183-135-35-dhcp.burlingtontelecom.net) left irc: Quit: bradley-holt
- [13:58] grove (~grove@193.201.9.46.customer.cdi.no) joined #rest.
- [14:12] Wombert (~Wombert@dslb-088-065-199-130.pools.arcor-ip.net) joined #rest.
- [14:20] bigbluehat (~bigblueha@adsl-98-84-70-208.gsp.bellsouth.net) left irc: Quit: Leaving.
- [14:20] grove (~grove@193.201.9.46.customer.cdi.no) left irc: Quit: grove
- [14:32] Wombert (~Wombert@dslb-088-065-199-130.pools.arcor-ip.net) left irc: Quit: Wombert
- [14:39] vmil86 (~vmil86@78.57.245.80) left irc: Remote host closed the connection
- [14:58] gchristensen (~gchristen@unaffiliated/grahamc) left irc: Quit: Leaving...
- [15:19] gchristensen (~gchristen@unaffiliated/grahamc) joined #rest.
- [15:28] mamund is gone now
- [15:32] SvenDowideit (~SvenDowid@203-206-171-38.perm.iinet.net.au) joined #rest.
- [15:42] sbanwart (~sbanwart@99-177-126-136.lightspeed.bcvloh.sbcglobal.net) joined #rest.
- [16:23] gchristensen (~gchristen@unaffiliated/grahamc) left irc: Read error: Connection reset by peer
- [16:56] gchristensen (~gchristen@unaffiliated/grahamc) joined #rest.
- [17:45] sgronblo (~sgronblo@tuxedo.abo.fi) joined #rest.
- [17:45] <sgronblo> Is being resource based an essential part of rest or is it just a recommendation?
- [17:57] KevBurnsJr (~KevBurnsJ@50.0.103.39) left irc:
- [18:05] <fu-manchu> as opposed to?
- [18:07] <talios> well URL/URI is "resource" so...
- [18:11] <sgronblo> as opposed to service-oriented urls where the action is in the url
- [18:11] <steveklabnik> esesntial
- [18:13] <sgronblo> I was just reading the page about google translate's "rest interface" and thought it sounded a bit funny
- [18:14] <sgronblo> "REST, or Representational State Transfer, in the Google Translate API is somewhat different from traditional REST. Instead of providing access to resources, the API provides access to a service. As a result, the API provides a single URI that acts as the service endpoint."
- [18:14] <sgronblo> Wsan't this exactly what you are trying to get away from by being restful
- [18:15] <sgronblo> Although "restful" seems to include so many different aspects and feels quite vague so it's hard to tell
- [18:15] <fu-manchu> !facepalm
- [18:15] <sgronblo> :)
- [18:16] <sgronblo> I'm sure it should be possible to make fun of that statement quite easily
- [18:17] <sgronblo> "An automobile, in the google world is slightly different from traditional automobiles. Instead of using an engine to power the automobile, it is being pulled by a horse. As a result you can whip the horse to go faster."
- [18:18] <sgronblo> I'm sure it's possible to do better though
- [18:18] <talios> sgronblo: actually - this raises a question on action url's, or state changes. we've just started using ;'s to signify an action against a resource, such as /customer/32 and /customer/32;cancel - feels wrong, spec says ; is reserved to specialise the segment, which feels ok in my mind, but still.
- [18:18] <sgronblo> Who are "we"?
- [18:19] <talios> we = smxemail.com - my work.
- [18:19] <sgronblo> shouldnt that just be put cancelled=true to /customer/32 ?
- [18:19] <steveklabnik> sgronblo: yes
- [18:19] <steveklabnik> well PATCH
- [18:19] <steveklabnik> ;)
- [18:20] <sgronblo> oh is patch if you dont wanna send the whole representation?
- [18:20] <steveklabnik> yes
- [18:20] <sgronblo> sweet
- [18:20] <sgronblo> I was just about to bring that up when you said yes
- [18:20] <steveklabnik> also not idempotent
- [18:20] <sgronblo> I've been wondering about that for a long time
- [18:20] <talios> sgronblo: probaby PATCH , but then - theres multiple side effects being incurred. theres no "cancelled" field on the resource. Having something that can be easily separated at the server side level ( i.e. class/mounts ) is handy
- [18:21] <talios> rather than the server going "oh, you posted cancell, so I should do XXX, but you also posted foobar, so I should also do YYY"
- [18:22] <sgronblo> but doesnt that mean that there should be a cancelled field?
- [18:23] <talios> originally I thought I should be posted specific media types, i.e. application/vnd+cancellationrequest - which would work really work, but that leads to media type explosions
- [18:23] <talios> s/posted/posting/
- [18:25] talios has a few ideas that could work well using HAL, which will be handy once we move over to that.
- [18:26] <sgronblo> hardware abstraction layer?
- [18:27] <talios> Hypertext Application Language - http://stateless.co/hal_specification.html
- [18:27] <sgronblo> so when is patch gonna be mainstream (ie used in rails :) ?
- [18:27] <talios> is that guaranteed to be passable thru firewalls and proxies as well
- [18:29] <sgronblo> steveklabnik: where does it say that thou shalt not useth a single service endpoint though?
- [18:33] <steveklabnik> sgronblo: im on the phone, one second.
- [18:35] <sgronblo> dont worry, i'm not going anywhere soon
- [18:35] <sgronblo> expect lunch in 1,5h :)
- [18:42] <sgronblo> already getting hungry though
- [18:43] <steveklabnik> kay
- [18:44] <steveklabnik> so
- [18:44] <steveklabnik> http://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm#sec_5_2_1_1
- [18:44] <steveklabnik> The key abstraction of information in REST is a resource.
- [18:45] <steveklabnik> doesnt get more authorative than that
- [18:45] <steveklabnik> for more about this idea, http://martinfowler.com/articles/richardsonMaturityModel.html
- [18:45] <steveklabnik> now, REST apis should actually have a single endpoint
- [18:45] <steveklabnik> actually
- [18:45] <steveklabnik> but through hypertext, drive the state of the application from there.
- [18:46] <steveklabnik> actions in URIs aren't good, http verbs are actions, URIs are nouns
- [18:47] <sgronblo> well ok that is good enough, thanks
- [18:48] <steveklabnik> :)
- [18:49] <sgronblo> enough material to try to a smartass on twitter about it
- [18:51] <steveklabnik> hahaha
- [18:53] sbanwart (~sbanwart@99-177-126-136.lightspeed.bcvloh.sbcglobal.net) left irc: Ping timeout: 260 seconds
- [18:53] <sgronblo> its so funny when everybody wants to get in on this hot RESTful action without really knowing what it's all about
- [18:54] apok (~apok@c-107-3-149-167.hsd1.ca.comcast.net) left irc: Ping timeout: 244 seconds
- [18:54] <steveklabnik> you don't need to tell us. ;)
- [18:54] <sgronblo> I don't claim to be an expert myself but I am at least aware of my ignorance.
- [18:54] <sgronblo> OMG OUR API IS RESTFUL IT HAS COOL LOOKING URLS!!!!!11
- [20:00] KevBurnsJr (~kevburnsj@c-76-126-10-63.hsd1.ca.comcast.net) joined #rest.
- [20:52] talios (~amrk@akl.smx.co.nz) left irc: Quit: Bye!
- [21:48] KevBurnsJr (~kevburnsj@c-76-126-10-63.hsd1.ca.comcast.net) left irc:
- [22:47] gchristensen (~gchristen@unaffiliated/grahamc) left irc: Quit: Leaving...
- [00:00] --- Tue Nov 22 2011