Solved

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

Posted on 2014-11-15
6
412 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 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
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 
LVL 110

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

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

For cloud, the “train has left the station” and in the Microsoft ERP & CRM world, that means the next generation of enterprise software from Microsoft is here: Dynamics 365 is Microsoft’s new integrated business solution that unifies CRM and ERP fun…
When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
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.

739 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