?
Solved

How to: PHP Session distributed management (i.e. cloud) with MySQL or NoSQL (Reddis, MongoDB)

Posted on 2014-11-15
6
Medium Priority
?
448 Views
Last Modified: 2016-02-10
Hi,

I'm wondering what are the best practices for setting up a PHP session distributed system (for Login Authentication and Authorization) using MySQL or perhaps NoSQL (maybe Reddis or MongoDB). Should I use Node.js with a NoSQL? If so, what are some good thorough books or online tutorials where I can learn more. I don't know much about NoSQL and I'm just learning Node.js but know Javascript.

I'm reading this whitepaper:
http://www.mysql.com/why-mysql/white-papers/unlocking-new-value-from-web-session-management/

and it gives some overview but I'm wondering how other professionals are tackling the issues too.

Can you give me some good books to read or links please? =)

I'll be using PHP Laravel for the backend framework so I have to learn how to implement all of this or at least get going in the right direction.

Thanks. Father God bless you<>< =)
0
Comment
Question by:Victor Kimura
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 40444795
How many servers are you trying to manage and controls logins on?
0
 

Author Comment

by:Victor Kimura
ID: 40444819
Maybe just two to start.
0
 
LVL 84

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 1332 total points
ID: 40444926
I'll ask a different way.  How many are you planning on having?  If you are not going to have more than two then there is little point in using a 'distributed' login method.

Do you have any 'regular' PHP login methods running?  That would be the place to start.  All my login methods use MySQL but they are only for one computer or site.  If I was going to do this, I would be looking at a method using MySQL where the current login could be verified from two different computers.  If you get that working, you can expand on that.
0
Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

 
LVL 111

Assisted Solution

by:Ray Paseur
Ray Paseur earned 668 total points
ID: 40444984
Have a look at built-in Laravel session management.
http://laravel.com/docs/4.2/session

My guess is that MemcacheD would give the best performance.
0
 

Author Comment

by:Victor Kimura
ID: 40445114
@Dave, Oh, I see. Yeah, I can see that working. I was reading on MySQL cluster and we want redundancy in case one server goes down. We have people filling out like different pages of a registration form for creating a legal doc stuff. And so I'm thinking there will be other fields that need to be managed with two different MySQL servers - maybe three servers situated in disparate geo locations for speed and when one or the other server goes down. I'd like to start with two to keep it simple. I am looking at cloud services like Amazon but really don't know much about it right now. Oh, perhaps just two VPS servers.

So I'm trying to find out what people think is the best strategy. I'm thinking using Node.js and MongoDB and then sync the MongoDB with the two MySQL servers. Not sure if that could work. Do I need MySQL cluster? Is it easier to manage with it? Not sure how everything really fits together though.

Hopefully, this clarifies what I'm trying to achieve or do. What do you fellas think?
0
 
LVL 84

Accepted Solution

by:
Dave Baldwin earned 1332 total points
ID: 40445130
sync the MongoDB with the two MySQL servers.
I'm sure that you can reasonably do that.  MongoDB and MySQL are like completely different animals.  You are also suggesting at least two different programming languages.  I'm not fond of that idea either.

And fail-over redundancy appears to be a difficult thing to do on the web with separate locations.

I suggest you start small with the obvious methods and build something  that works on a small scale.  Then you'll have something to refer to when you want to expand it.
0

Featured Post

Get MySQL database support online, now!

At Percona’s web store you can order your MySQL database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this blog post, we’ll look at how ClickHouse performs in a general analytical workload using the star schema benchmark test.
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question