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
460
1
Share
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
280
A Map For Monitoring PostgreSQL
lfittl
2
410
Monitoring Postgres at Scale
lfittl
1
490
Monitoring PostgreSQL at Scale
lfittl
4
280
Postgres Performance for App Developers
lfittl
2
330
GraphQL ❤ PostgreSQL -- P.S. aka BeatQL
lfittl
1
650
Hacking PostgreSQL to Gain SQL Parsing Superpowers
lfittl
1
630
PostgreSQL at a Web Startup
lfittl
3
620
Other Decks in Programming
See All in Programming
AlarmKitで明後日起きれるアラームアプリを作る
trickart
0
160
次世代リンターで探る、tsgo 時代における型認識カスタムルールの現実解
ytakahashii
3
1.2k
~ 秘伝のタレ化した『神スプシ』と戦う ~ 関数型パラダイムで壊れない仕組みへ
h0r15h0
1
140
AIエージェントと協働するCLI開発 — BunとOpenClawで学んだこと
yoshikouki
1
220
AI 時代のソフトウェア設計の学び方
masuda220
PRO
28
10k
AI時代だからこそ「Bloc」を採用する価値があるのかもしれない
takuroabe
0
250
oxlintはeslint/typescript-eslintを置き換えられるのか
shomafujita
2
270
誰も頼んでない機能を出荷した話
zekutax
0
140
気づいたらRubyで100作品 ー クリエイティブコーディングが生活の一部になるまで / 100 Ruby Sketches Later: How Creative Coding Became Part of My Life
chobishiba
2
430
新規プロダクトを高速で生み出すハーネスエンジニアリング
seanchas116
12
5.8k
TSKaigi2026-静的解析への投資がAI時代のコード品質を支える ── カスタムESLintルールの設計と運用
hayatokudou
6
1.2k
Hive Metastoreを通して学ぶIceberg REST Catalog ― 仕様から実装まで
okumin
0
290
Featured
See All Featured
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.5k
The agentic SEO stack - context over prompts
schlessera
0
790
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.1k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
160
Product Roadmaps are Hard
iamctodd
PRO
55
12k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
310
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
540
The SEO Collaboration Effect
kristinabergwall1
1
460
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
450
Between Models and Reality
mayunak
4
310
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
The Spectacular Lies of Maps
axbom
PRO
1
770
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