Hacker News new | past | comments | ask | show | jobs | submit login

In the example URL you gave, the content of the URL (base64): ({:project-id "505a125e44ae42e05a750c97", :object-instance "2", :object-type "0", :device-id "1234"} {:project-id "505a125e44ae42e05a750c97", :object-instance "1", :object-type "0", :device-id "1234"} {:project-id "505a125e44ae42e05a750c97", :object-instance "0", :object-type "0", :device-id "1234"})

seems like it would be better stored on the server in redis or something (or, at least if leaving it in the URL, a more compact deduplicated format might be worthwhile)




Yeah I'm still wondering if I should gzip to whole thing (I'm already base64 encoding anyway).

However the duplication overhead would only be really paying off with a large number of objects.

By the redis reference, I suppose you refer to a uniquely created key each time a user request a possible combination. Something like /short-url/abcd, where abcd would be a key matching {:project-id "505a125e44ae42e05a750c97"... ?

That's what I was thinking when talking about a shortening url scheme. It requires more work, but the final URL would indeed be more sexy.

Thank you for the input, I appreciate it!


Part of me wonders what would happen if someone where to Base64 encode something like

  ({:project-id {:conditions "true); DELETE FROM projects WHERE (true"}})


Nothing, it's not sql. It's a clojure map with all the necessary info to find the different components.

But nice reflex! ;-)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: