我用 goldapserver 写了个最简单的 demo,100行左右的代码(关键的就十几行),已经能顺利通过 nslcd 认证。
现在有一个还有争议的问题,数据库选型。
两个主要选择:mongodb 还是 postgreSQL
其他选择:etcd,bolt/sqlite 等嵌入式数据库
我列举一些优劣:
1. mongodb
* pros:
- 简单易上手,开发快,shemaless 很灵活
- replica set 好用,早年因网络抽风引起的认证故障后果很严重
* cons:
- shemaless 留隐患
2. postgres
* pros:
- 坚若磐石,非常稳固
- 完整的 SQL 支持
- 对于 用户、组 这种数据,用关系型模型很科学
* cons:
- replication 不如 mongodb 好用
3. etcd
* pros:
- 强一致性分布式存储
* cons:
- 只有 key-value,对于应用来说有点弱
- 资料相对较少,运维难度未知
4. 嵌入式数据库
* pros:
- 即开即用免配置
* cons:
- replication 完全得手动来
我个人倾向于 mongodb 和 postgres 二选一,并且把功能限制在仅仅保留用户和组,对外提供 ldap、oauth2 、REST
API 等接口,再加一个可选的 web。我相信有不少团队都有类似需求,把功能限制在一个小集合中,可以造福更多人。
大家有什么意见?
--
Justin Wong
On Tue, Jun 28, 2016, at 00:09, XIAO Qi wrote:
> 我当初用 LDAP 存储 DNS 信息的动机是把服务器的信息放在同一个地方维护。
>
> LDAP 的数据模型并没有什么明显的优势,而且额外学习的成本很高。我很赞成自己设计数据库结构,然后造 LDAP 兼容层的轮子。当年要有合适的
> LDAP server 框架我肯定也自己写了。
>
> 在 2016年6月26日 下午7:03,Justin Wong <[email protected]> 写道:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA256
> >
> > 不知道还有多少人知道,我们还有个 wiki [1]
> > 我调到中央以后,由于历史的行程,TUNA 从一个相对封闭的网管会,转型成开放的爱好者同好会。
> > 而之前的 wiki,基于 LDAP [2] 的帐号系统、仅注册用户可编辑,等等这些设定使得很少有人能够贡献。
> > 事实上,现有成员里拥有 LDAP 帐号的已经寥寥无几。
> >
> > LDAP 又是另一个问题,当年 xiaq 为了满足一些定制化需求,用了特别的 LDAP 使用技巧,添加了特殊的
> > schema …… 使得维护 tuna ldap 比维护一般的 ldap 还要更复杂一些……
> >
> > 所以我建议:
> > 1. wiki 迁移到 GitHub,和 issues 一样,使用更开放的管理模式,方便大家贡献
> > 2. 全面升级基础业务
> > - 用户系统改用贵系科协开发的 accounts9 (开发者大多也同时是 TUNA 成员)
> > - 更新 DNS 服务
> >
> > 各位有什么想法?
> >
> >
> > [1] https://wiki.tuna.tsinghua.edu.cn/
> > [2] https://ldap.tuna.tsinghua.edu.cn/
> > [3] https://github.com/net9/accounts9
> >
> >
> > - --
> > Justin Wong
> >
> > Blog: https://bigeagle.me/
> > Fingerprint: 15CC 6A61 738B 1599 0095 E256 CB67 DA7A 865B AC3A
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v2
> >
> > iQEcBAEBCAAGBQJXcAreAAoJEJFxpFccJ5IKraEIAJ2ohHaBpjsarixYq+APpgSc
> > f5rnlEbWLDyVuIrSbND3rdPqH5sRkKDohvvbmaDo6vL/q5YIStB8cJjapk5cKbIg
> > c1b9SDbk7n/DNdFzPrZczfyoiE1MKvkEHMUiPNC0RV96tE5gtZkhzHZhdyegU4Pi
> > CEQX36cuYPHZUPhPpK9zhZsAS7BtUg1HDiSFVAPO2R6+C8+H/z1K5BzEg6heFxHg
> > E8lxOpDcAgOHboeKvzjyPA6lreNU3zKSbceOXrMNSzTPv8+6wKsZObm7LsUIw7Oc
> > 2DB2i7d9EHTDELWH+jR26i94+6yN/AQYc/bS+TAAf7KBqwItE/uc6mCpKTIusQM=
> > =TPoV
> > -----END PGP SIGNATURE-----
> >
> > --
> >
> > ---
> > You received this message because you are subscribed to the Google Groups
> > "TUNA 主邮件列表" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> > email to [email protected].
> > To post to this group, send email to [email protected].
> > For more options, visit https://groups.google.com/d/optout.
>
>
>
> --
> Best regards,
> 肖骐 XIAO Qi
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "TUNA 主邮件列表" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
--
---
You received this message because you are subscribed to the Google Groups "TUNA
主邮件列表" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/d/optout.