Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Cross-Domain Sessions with Ruby on Rails
Search
Lukas Fittl
January 09, 2014
Programming
480
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
Transcript
15 slides
@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
More Decks by Lukas Fittl
See All by Lukas Fittl
How to Scale Postgres - Automation, Tuning & Sharding
lfittl
0
710
What's Missing for Postgres Monitoring
lfittl
0
320
A Map For Monitoring PostgreSQL
lfittl
2
430
Monitoring Postgres at Scale
lfittl
1
520
Monitoring PostgreSQL at Scale
lfittl
4
310
Postgres Performance for App Developers
lfittl
2
360
GraphQL ❤ PostgreSQL -- P.S. aka BeatQL
lfittl
1
670
Hacking PostgreSQL to Gain SQL Parsing Superpowers
lfittl
1
660
PostgreSQL at a Web Startup
lfittl
3
660
Other Decks in Programming
See All in Programming
조합이폭발하는디자인시스템이걸눈으로도테스트하라고요
giljongyu
0
750
Goコンパイラを作ってGoをもっと理解する / Build a Go compiler to better understand Go
ikura_hamu
0
130
Performance Optimization With LLMs
xleitix
0
260
Rails初心者がパスキーを実装してみて大変だったこと
ktombow
0
180
Crash Auto Pipelines
veronikapj
1
410
Next.js: The final boss of Web Performance
guaca
0
400
動画プレイヤーはなぜカクつくのか 〜Flutterのレンダリングとネイティブの境界を解剖する〜
naruogram
0
330
AIが生成したコードは読むべきか?抽象化設計とコードの品質保証 / abstraction-design-and-quality
minodriven
16
9.1k
Railsバージョンを4倍にした話
optim
0
1k
Distance field of Julia set
kinakomoti321
0
320
小さなアプリを作って公開するまで
onozaty
0
170
私なりのハーネスエンジニアリング ~独自の言語処理系の開発を通して~
seosoft
0
200
Featured
See All Featured
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
3.1k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.8k
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.6k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
350
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.9k
Documentation Writing (for coders)
carmenintech
77
5.6k
Evolving SEO for Evolving Search Engines
ryanjones
0
360
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
2
520
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.5k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
2
3.8k