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
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
290
A Map For Monitoring PostgreSQL
lfittl
2
410
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
650
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
そのテスト、説明できますか?~LWテスト戦略FW~のご紹介
nakahara
0
190
dRuby over BLE
makicamel
2
410
自作OSでスライド発表する
uyuki234
1
3.6k
TAKTでAI駆動開発の品質を設計する
j5ik2o
7
1.7k
ローカルLLMでどこまでコードが書けるか -縮小版 / How much code can be written on a local LLM Shortened
kishida
2
170
Haskell/Servantを通してWebミドルウェアを捉え直す
pizzacat83
0
400
Contextとはなにか
chiroruxx
1
390
吝嗇家のためのAI活用 / AI development for miser - ChatGPT + Issue Driven Development
tooppoo
0
180
関数型プログラミングのメリットって何だろう?
wanko_it
0
140
Webフレームワークの ベンチマークについて
yusukebe
0
200
エンジニアと一緒にテストコードの設計と実装を改善した話
mototakatsu
0
250
任せる範囲はこう広がった / How the Scope of AI Delegation Has Expanded
nrslib
1
240
Featured
See All Featured
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
490
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
260
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
240
Test your architecture with Archunit
thirion
1
2.3k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
410
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
150
Measuring & Analyzing Core Web Vitals
bluesmoon
9
880
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
310
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
460
Abbi's Birthday
coloredviolet
3
8.5k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
410
A Tale of Four Properties
chriscoyier
163
24k
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