Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Cross-Domain Sessions with Ruby on Rails
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Lukas Fittl
January 09, 2014
Programming
470
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Cross-Domain Sessions with Ruby on Rails
So, how does one write a Rails 4 session store?
Lukas Fittl
January 09, 2014
More Decks by Lukas Fittl
See All by Lukas Fittl
How to Scale Postgres - Automation, Tuning & Sharding
lfittl
0
690
What's Missing for Postgres Monitoring
lfittl
0
300
A Map For Monitoring PostgreSQL
lfittl
2
420
Monitoring Postgres at Scale
lfittl
1
500
Monitoring PostgreSQL at Scale
lfittl
4
290
Postgres Performance for App Developers
lfittl
2
340
GraphQL ❤ PostgreSQL -- P.S. aka BeatQL
lfittl
1
660
Hacking PostgreSQL to Gain SQL Parsing Superpowers
lfittl
1
640
PostgreSQL at a Web Startup
lfittl
3
630
Other Decks in Programming
See All in Programming
テーブルをDELETEした
yuzneri
0
130
全PRの83%がAIレビューだけでマージできるようになった開発組織はその後どうなったか
athug
0
970
地域 SRE コミュニティ最前線 - ホンマでっかSRE勉強会
tk3fftk
0
290
Claude Opus 4.6以後の受託開発エンジニアの変化(Claude Code開発ノウハウ大公開スペシャルbyクラスメソッド)
iidatakuma
1
920
Claude Team Plan導入・ガイド
tk3fftk
0
250
Haskell/Servantを通してWebミドルウェアを捉え直す
pizzacat83
1
630
属人化した知識を、 AIが辿れる地図にする
pkshadeck
PRO
1
130
AWS CDK を「作」ってみた 〜フルスクラッチで見えた CDK の裏側〜 / aws-cdk-from-scratch
gotok365
3
2.7k
今さら聞けない .NET CLI
htkym
0
170
アルゴリズムは何を圧縮しているのか ─ Haskell から育った「圧縮代数」というメンタルモデル
naoya
16
3.7k
Google Apps Script で Ruby を動かす
kawahara
0
120
為什麼你並不需要ViewModel / No, you don't need a ViewModel
lovee
1
460
Featured
See All Featured
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
240
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
520
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
370
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
470
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
370
Docker and Python
trallard
47
4k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Why Our Code Smells
bkeepers
PRO
340
58k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
470
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
330
Reality Check: Gamification 10 Years Later
codingconduct
0
2.2k
Scaling GitHub
holman
464
140k
Transcript
@LukasFittl Cross-Domain Sessions So, how does one write a Rails
4 session store?
Biz + UX + Dev @LukasFittl
So, 7 years ago we started this company: commit 2086c55b13426c2834f7060ad3739eed68e891c2
Author: Esad Hajdarevic <
[email protected]
> Date: Sun Mar 25 22:47:30 2007 +0000 ! Initial tags+trunk creation git-svn-id: svn://svn.phoria.eu/soup/trunk@1 c0834aa2-9929-0410-9117-c50b2a7daf23
Its still around :) ! But it runs Rails 2.3.
100+ hours later we’re (almost) on Rails 4.
Soooo... Sessions.
www.soup.io = Login/Logout/etc
mysoup.io = Soup Admin, Create Posts, etc
How can we make that work?
First thought: <iframe>
Actually, thats pretty painful.
What we ended up doing: www.soup.io mysoup.io Memcached / Redis
SESSION_ID REMOTE_SESSION_ID
Getting a REMOTE_SESSION_ID: http://mysoup.io/ => http://soup.io/remote/generate?host=mysoup.io (requested with main session
cookie YYY) ! => http://mysoup.io/?sessid=ZZZ SetCookie: soup_session_id=ZZZ ! => http://mysoup.io/ ! remote_session_link_ZZZ => mysoup.io--YYY Memcached / Redis
Lets look at the code :)
@LukasFittl Thank you! pganalyze.com