Neo4j中GraphDatabaseServer和BOLT之间的区别(Difference between GraphDatabaseServer and BOLT in Neo4j)

我试图在Neo4J中启动一个新的Java项目,并且通过一些教程和示例,我已经看到了两种从Java访问Neo4j的方法。 GraphDatabaseServer类和Bolt驱动程序类。

据我了解,当您在Neo4j数据库中部署应用程序时,GraphDatabaseServer是首选,因为它可以直接访问底层数据库,而另一个可以使访问外部数据库服务器变得容易。 它是否正确? 是否有其他差异,优先使用其中一种?


I am trying to start a new Java project in Neo4J, and going through some tutorials and examples I have seen two way to access Neo4j from Java. The GraphDatabaseServer class and the Bolt driver classes.

As I understand, the GraphDatabaseServer is prefered when you are deploying your application inside the Neo4j DB because it can directly access the underlying DB while the other can make it easy to access an external DB server. Is this correct? Are there any other differences, prefered use cases for one or the other?


原文:https://stackoverflow.com/questions/39396065
2022-11-12 09:11

满意答案

django-auth-ldap的tests.py包含一个简单的模拟ldap用于自己的测试。 这是由其他人分拆到fakeldap包中,虽然我没有跟进进展。 正确的答案可能是从fakeldap开始并在必要时做出贡献。

更新:目前正在进行更严肃的分离模拟LDAP层的工作。


django-auth-ldap's tests.py includes a simple mock ldap for its own tests. This was spun off by someone else into the fakeldap package, although I haven't been following progress. The right answer is probably to start with fakeldap and contribute if necessary.

UPDATE: A more serious effort to spin off a mock LDAP layer is currently underway.

相关问答

更多

django-python3-ldap在Active Directory中搜索属于特定组的用户(django-python3-ldap Search Users belonging to Specific Group in Active Directory)

这里记录了如何使用这个特定的包进行过滤。 在示例中,它显示了如何使用组成员资格进行过滤。 以下将限制搜索到AD组“foo” # settings.py LDAP_AUTH_FORMAT_SEARCH_FILTERS = "path.to.your.custom_format_search_filters" # path/to/your/module.py from django_python3_ldap.utils import format_search_filters def custom...

django-python3-ldap认证(django-python3-ldap authentication)

从文档: 当用户尝试进行身份验证时,会与LDAP服务器建立连接,并且应用程序会尝试使用提供的用户名和密码进行绑定。 如果绑定尝试成功,则用户详细信息将从LDAP服务器加载并保存在本地Django用户模型中。 本地模型仅创建一次,并且详细信息将随每次登录时的LDAP记录详细信息而更新。 它每次通过绑定进行身份验证,并且每次都从LDAP更新信息(如您配置的那样)。 如果从LDAP中删除,则不会从Django的用户表中删除Django用户; 如果您将多个auth后端设置为使用Django默认身份验证,则...

django-auth-ldap验证失败(django-auth-ldap failed authentication)

我找到了答案。 我通过添加(OU = Users)更改了AUTH_LDAP_BIND_DN 我必须在AUTH_LDAP_USER_SEARCH中使用samAccountName而不是CN 我的新settings.py: import ldap, logging from django_auth_ldap.config import LDAPSearch logger = logging.getLogger('django_auth_ldap') logger.addHandler(logging...

如何使用LDAP在Django中检查密码?(How to check a password in Django with LDAP?)

LDAP用户不是Django用户。 所以你需要检查你的LDAP系统的密码,而不是Django。 一个好的做法是为每个你拥有的LDAP用户创建一个django用户,并在第一次登录时设置密码,所以当你的LDAP离线时,至少现有的django用户可以登录(你可以使用check_password ) I solved this problem today by use a diferent method - authenticate. I did this way and it works: def aj...

如何在django项目中使用django_auth_ldap?(How to use django_auth_ldap for django project?)

任何错误信息? 启用日志记录可能有所帮助 把它放在设置文件中: import logging, logging.handlers logfile = "/tmp/django-ldap-debug.log" my_logger = logging.getLogger('django_auth_ldap') my_logger.setLevel(logging.DEBUG) handler = logging.handlers.RotatingFileHandler( logfile, max...

项目之外的Django设置(Django settings outside of project)

“独立的Django脚本” "Standalone Django Scripts"

LDAP服务器 - 移动应用程序(LDAP server - mobile application)

Java中的默认JNDI类不是很难理解。 基本上: 使用服务器的连接参数创建LdapContext对象 执行身份验证 使用经过身份验证的连接查询LDAP服务器以获取数据 我当前项目的一些示例代码。 步骤1和2:使用“userdn”和“password”创建经过身份验证的连接。 private LdapContext getLdapContext( String userdn, String password ) { LdapContext ldapCtx = null; H...

如何为Django项目创建模拟LDAP服务器?(How to create mock LDAP server for Django project?)

django-auth-ldap的tests.py包含一个简单的模拟ldap用于自己的测试。 这是由其他人分拆到fakeldap包中,虽然我没有跟进进展。 正确的答案可能是从fakeldap开始并在必要时做出贡献。 更新:目前正在进行更严肃的分离模拟LDAP层的工作。 django-auth-ldap's tests.py includes a simple mock ldap for its own tests. This was spun off by someone else into th...

根据Django中的登录用户名获取LDAP组(Get LDAP group based on login username in Django)

最后,我找到了解决方案: CONF / local.cfg [ldap] .... # Set up the basic group parameters. groupbase = ou=Groups,dc=mydomain groupfilter = (objectClass=posixGroup) grouptype = PosixGroupType ... 关键因素是使用groupType PosixGroupType ,因为组上的查询将通过Django Auth LDAP在membe...

使用Django Auth Ldap将LDAP用户映射到Django用户(Mapping LDAP users to Django users with Django Auth Ldap)

如果设置AUTH_LDAP_GROUP_SEARCH ,则还需要设置AUTH_LDAP_GROUP_TYPE 。 由于您显然使用groupOfNames进行分组,因此需要AUTH_LDAP_GROUP_TYPE = GroupOfNamesType() 。 其他一切看起来都不错,尽管你不太可能同时需要AUTH_LDAP_MIRROR_GROUPS和AUTH_LDAP_FIND_GROUPS_PERMS 。 它可能不会伤害任何东西,但那些都是替代品。 一般来说,在这种情况下, 日志记录是你的朋友。 ...

相关文章

更多

图形数据库、NOSQL和Neo4j(转载)

源地址:http://www.infoq.com/cn/articles/graph-nosql-ne ...

图形数据库、NOSQL和Neo4j

简介 在众多不同的数据模型里,关系数据模型自80年代就处于统治地位,而且有不少实现,如Oracle、 ...

图形数据库、NOSQL和Neo4j

简介 在众多不同的数据模型里,关系数据模型自80年代就处于统治地位,而且有不少实现,如Oracle、 ...

图形数据库、NOSQL和Neo4j

在众多不同的数据模型里,关系数据模型自80年代就处于统治地位,而且有不少实现,如Oracle、MySQ ...

Twitter Storm中Bolt消息传递路径之源码解读

本文初次发表于storm-cn的google groups中,现以blog的方式再次发表,表明本人徽沪 ...

顶 【storm API】spout & bolt 类图

转自:http://my.oschina.net/hutj/blog/215271

Storm-源码分析- bolt (backtype.storm.task)

Bolt关键的接口为execute, Tuple的真正处理逻辑, 通过OutputCollector ...

请教:log4j 问题

我的log4j配置文件内容如下: log4j.rootLogger=ERROR, Rlog4j.lo ...

Solr 使用 Log4j

大家知道在解压开solr的web程序(apache-solr-3.2.0.war)时,在其WEB-IN ...

Solr 使用 Log4j

原文出处:http://blog.chenlb.com/2010/08/solr-with-log4j ...

最新问答

更多

您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)

将diff文件复制到存储库的根目录,然后执行以下操作: git apply yourcoworkers.diff 有关apply命令的更多信息, apply 见其手册页 。 顺便说一下:一个更好的方法是通过文件交换整个提交文件是发送者上的命令git format-patch ,然后在接收器上加上git am ,因为它也传送作者信息和提交信息。 如果修补程序应用程序失败,并且生成diff的提交实际上在您的备份中,则可以使用尝试在更改中合并的apply程序的-3选项。 它还适用于Unix管道,如下

将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)

尝试将第二行更改为snprintf(buf1, sizeof buf1, "%.2f", balance1); 。 另外,为什么要声明用该特定表达式分配缓冲区的存储量? EDIT @LưuVĩnhPhúc在下面的评论中提到我的原始答案中的格式说明符将舍入而不是截断,因此根据如何在不使用C舍入的情况下截断小数,您可以执行以下操作: float balance = 200.56866; int tmp = balance1 * 100; float balance1 = tmp / 100.0; c

OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)

这是简单的解决方案 在你需要写的控制器中 BackendMenu::setContext('Archetypics.Team', 'website', 'team'); 请参阅https://octobercms.com/docs/backend/controllers-views-ajax#navigation-context BackendMenu::setContext('Author.Plugin name', 'Menu code', 'Sub menu code'); 你需要在r

页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)

每当发出请求时ASP都会创建一个新的Page对象,并且一旦它将响应发送回用户就不会保留对该Page对象的引用,因此只要你找不到某种方法来保持生命自己引用该Page对象后,一旦发送响应, Page和只能通过该页面访问的所有对象才有资格进行垃圾回收。 ASP creates a new Page object whenever a request is made, and it does not hold onto the reference to that Page object once it

codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)

要在生产服务器中调试这个,你可以临时放 error_reporting(E_ALL); 并查看有哪些其他错误阻止正确的重定向。 您还应该检查生产服务器发送的响应标头。 它是否具有“缓存”,是否需要重新验证标头等 to debug this in production server, you can temporary put error_reporting(E_ALL); and see what other errors are there that prevents the proper

在计算机拍照在哪里进入

打开娥的电脑.在下面找到视频设备点击进去就可以了...

使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)

你是对的。 第一次输入后,换行符将保留在输入缓冲区中。 第一次读取后尝试插入: cin.ignore(); // to ignore the newline character 或者更好的是: //discards all input in the standard input stream up to and including the first newline. cin.ignore(numeric_limits::max(), '\n'); 您必须为#inc

No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)

for (int k = 0; k > 10; k++) { System.out.println(k); } k不大于10,所以循环将永远不会执行。 我想要什么是k<10 ,不是吗? for (int k = 0; k < 10; k++) { System.out.println(k); } for (int k = 0; k > 10; k++) { System.out.println(k); } k is not greater than 10, so loop

单页应用程序:页面重新加载(Single Page Application: page reload)

优点是不注销会避免惹恼用户,以至于他们会想要杀死你:-)。 说真的,如果每次刷新页面时应用程序都会将我注销(或者在新选项卡中打开一个链接),我再也不会使用该应用程序了。 好吧,不要这样做。 确保身份验证令牌存储在刷新后的某个位置,即不在某些JS变量中,而是存储在cookie或本地存储中。 The advantage is that not logging off will avoid pissing off your users so much that they'll want to kill

在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)

EXECUTE IMMEDIATE 'SELECT '||field_val_temp ||' FROM tableb WHERE function_id = :func_val AND rec_key = :rec_key' INTO field_val USING 'STDCUSAC' , yu.rec_key; 和, EXECUTE IMMEDIATE 'UPDATE tablec SET field_val_'||i||' = :field_val' USI