Solved

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

Posted on 2014-11-15
6
378 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
  • 3
  • 2
6 Comments
 
LVL 83

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 83

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 333 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
ScreenConnect 6.0 Free Trial

At ScreenConnect, partner feedback doesn't fall on deaf ears. We collected partner suggestions off of their virtual wish list and transformed them into one game-changing release: ScreenConnect 6.0. Explore all of the extras and enhancements for yourself!

 
LVL 108

Assisted Solution

by:Ray Paseur
Ray Paseur earned 167 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 83

Accepted Solution

by:
Dave Baldwin earned 333 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
updating table data with inner join 9 24
how to use a function in heredoc 5 21
sql_mode 1 18
Configuring a checkbox in CSS and php 18 31
Most of the applications these days are on Cloud. Cloud is ubiquitous with many service providers in the market. Since it has many benefits such as cost reduction, software updates, remote access, disaster recovery and much more.
A customer recently asked me about anti-malware and the different deployment options available for his business. Daily news about cyberattacks, zero-day vulnerabilities, and companies that suffered a security breach made him wonder if the endpoint a…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Need to grow your business through quality cloud solutions? With everything required to build a cloud platform and solution, you may feel like the distance between you and the cloud is quite long. Help is here. Spend some time learning about the Con…

910 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now