简体   繁体   English

用neo4j数据库构建一个php会话处理程序

[英]build a php session handler with neo4j database

How can I build a session handler in php that store sessions data in neo4j database? 如何在php中建立会话处理程序,以将会话数据存储在neo4j数据库中? How can I draw a schema good schema for neo4j for save sessions user data and manage user authentication for a web application? 如何为neo4j绘制架构良好的架构,以保存会话用户数据并管理Web应用程序的用户身份验证?

You'll need to create a SessionHandler instance that uses the Neo4J REST API. 您需要创建一个使用Neo4J REST API的SessionHandler实例。 There is a PHP library that should cover communicating with Neo4J: as it is a graph database you don't really need to lose sleep over a schema in advance. 有一个PHP库应该涵盖与Neo4J的通信:由于它是一个图形数据库,因此您实际上并不需要事先通过模式就失去睡眠。 The session interface just requires you to save/retrieve an associative array: unless you are explicitly planning to browse through the data via some other language you can just serialize it to a string (or to JSON) and store it as a property in a new node keyed by the session id. 会话接口只需要您保存/检索一个关联数组:除非您明确计划通过其他某种语言浏览数据,否则您只需将其序列化为字符串(或JSON)并将其作为属性存储在新的字符串中即可。会话ID为键的节点。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM