Solved

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

Posted on 2014-11-15
6
364 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 82

Expert Comment

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

Author Comment

by:Victor Kimura
Comment Utility
Maybe just two to start.
0
 
LVL 82

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 333 total points
Comment Utility
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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
LVL 108

Assisted Solution

by:Ray Paseur
Ray Paseur earned 167 total points
Comment Utility
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
Comment Utility
@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 82

Accepted Solution

by:
Dave Baldwin earned 333 total points
Comment Utility
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

763 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

9 Experts available now in Live!

Get 1:1 Help Now