index.html 18.8 KB
Newer Older
1 2 3 4 5 6 7 8
<!doctype html>
<html lang="en" dir="ltr" class="docs-wrapper docs-doc-page docs-version-current plugin-docs plugin-id-default docs-doc-id-intro">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="generator" content="Docusaurus v2.0.0-beta.18">
<link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="IoTSharp 在线文档 RSS Feed">
<link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="IoTSharp 在线文档 Atom Feed"><title data-rh="true">IoTSharp 简介 | IoTSharp 在线文档</title><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://docs.iotsharp.io/docs/intro"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="IoTSharp 简介 | IoTSharp 在线文档"><meta data-rh="true" name="description" content="让我们探索一下  IoTSharp 在五分钟内."><meta data-rh="true" property="og:description" content="让我们探索一下  IoTSharp 在五分钟内."><link data-rh="true" rel="icon" href="/img/favicon.ico"><link data-rh="true" rel="canonical" href="https://docs.iotsharp.io/docs/intro"><link data-rh="true" rel="alternate" href="https://docs.iotsharp.io/docs/intro" hreflang="en"><link data-rh="true" rel="alternate" href="https://docs.iotsharp.io/docs/intro" hreflang="x-default"><link rel="stylesheet" href="/assets/css/styles.f65480cd.css">
9
<link rel="preload" href="/assets/js/runtime~main.55450f54.js" as="script">
10 11 12 13 14
<link rel="preload" href="/assets/js/main.0cc0a2a1.js" as="script">
</head>
<body class="navigation-with-keyboard">
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus">
<div role="region"><a href="#" class="skipToContent_ZgBM">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/iotsharp.png" alt="IoT在线文档" class="themedImage_W2Cr themedImage--light_TfLj"><img src="/img/iotsharp.png" alt="IoT在线文档" class="themedImage_W2Cr themedImage--dark_oUvU"></div><b class="navbar__title">IoTSharp 在线文档</b></a><a aria-current="page" class="navbar__item navbar__link navbar__link--active" href="/docs/intro">参考手册</a><a class="navbar__item navbar__link" href="/blog">博客</a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/IoTSharp/IoTSharp" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a><a href="https://gitee.com/dotnetchina/IoTSharp" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Gitee<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a><div class="toggle_S7eR colorModeToggle_vKtC"><button class="clean-btn toggleButton_rCf9 toggleButtonDisabled_Pu9x" type="button" disabled="" title="Switch between dark and light mode (currently light mode)" aria-label="Switch between dark and light mode (currently light mode)"><svg viewBox="0 0 24 24" width="24" height="24" class="lightToggleIcon_v35p"><path fill="currentColor" d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" class="darkToggleIcon_nQuB"><path fill="currentColor" d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"></path></svg></button></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper"><div class="docPage_P2Lg"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_RiI4" type="button"></button><aside class="theme-doc-sidebar-container docSidebarContainer_rKC_"><div class="sidebar_RiAD"><nav class="menu thin-scrollbar menu_izAj"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" href="/docs/intro">IoTSharp 简介</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/docs/tutorial-basics/iotsharp">参考手册 - 基础</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/docs/tutorial-extras/mqtt">参考手册 - 高级</a></div></li></ul></nav></div></aside><main class="docMainContainer_TCnq"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_DM6M"><div class="docItemContainer_vinB"><article><nav class="theme-doc-breadcrumbs breadcrumbsContainer_Xlws" aria-label="breadcrumbs"><ul class="breadcrumbs" itemscope="" itemtype="https://schema.org/BreadcrumbList"><li class="breadcrumbs__item"><a class="breadcrumbs__link" href="/">🏠</a></li><li itemscope="" itemprop="itemListElement" itemtype="https://schema.org/ListItem" class="breadcrumbs__item breadcrumbs__item--active"><span class="breadcrumbs__link" itemprop="item name">IoTSharp 简介</span><meta itemprop="position" content="1"></li></ul></nav><div class="tocCollapsible_jdIR theme-doc-toc-mobile tocMobile_TmEX"><button type="button" class="clean-btn tocCollapsibleButton_Fzxq">On this page</button></div><div class="theme-doc-markdown markdown"><h1>IoTSharp 简介</h1><p>让我们探索一下  <strong>IoTSharp 在五分钟内</strong>.</p><h2 class="anchor anchorWithStickyNavbar_mojV" id="iotsharp-是什么">IoTSharp 是什么?<a class="hash-link" href="#iotsharp-是什么" title="Direct link to heading"></a></h2><p> IoTSharp 是一个基于.Net 6.0 使用C#开发的数据收集、处理、可视化与设备管理的开源物联网(IoT)平台基础平台,支持 HTTP、MQTT 、CoAP等协议实现设备的数字孪生,且属性数据和遥测数据协议简单类型丰富,简易设置即可将数据存储在PostgreSql、MySql、Oracle、SQLServer、Sqlite 或者 InfluxDB 2.0;TDengine;TimescaleDB等时序数据库中。</p><h3 class="anchor anchorWithStickyNavbar_mojV" id="iotsharp的系统必备有哪些">IoTSharp的系统必备有哪些?<a class="hash-link" href="#iotsharp的系统必备有哪些" title="Direct link to heading"></a></h3><ul><li>[Docker]<!-- -->](<a href="https://www.docker.com/" target="_blank" rel="noopener noreferrer">https://www.docker.com/</a>) 最新版本<ul><li>如果你要部署IoTSharp, 我们首先推荐的是docker, 以及Docker-Compose, 通过我们推荐的<a href="https://github.com/IoTSharp/IoTSharp/raw/master/Deployments/rabbit_mongo_influx/docker-compose.yml" target="_blank" rel="noopener noreferrer">docker-compose.yml</a> 你可以直接部署成功,而不用煞费周折的部署环境。</li></ul></li><li>关系型数据库   用来存储基础数据和属性数据。<ul><li>PostgreSQL 验证过的版本为  PostgreSQL 11.3,12.x等。 </li><li>MySql   验证过的版本为 MySQL 8.0.17  </li><li>Oracle  验证过的版本为  Oracle Standard Edition 12c Release 2  , 操作系统为Cent OS 7 </li><li>Sqlite  程序内置,均验证。 小项目推荐。 </li><li>SQLServer  验证过的版本为 Microsoft SQL Server 2016 (RTM-GDR) (KB4019088) - 13.0.1742.0 (X64)  </li><li>InMemory 通过EF 的内存数据库,一般用于测试 。 </li></ul></li><li>时序数据库    用来存储遥测数据并提供遥测数据的查询统计等等。 <ul><li>通过EFCore 使用关系型数据库来存储带有时间戳的数据,虽然不推荐,但不妨是一种小型项目的最佳选择。 </li><li>InfluxDB 2.x 我们致力于推荐的时序数据库, InfluxDB集成非常好用的可视化工具, 除了不符合信创没有任何可挑剔的。</li><li>TDengine  我们致力于推荐的国产时序数据库, 甚至为了支持它我花了大量时间编写他的提供程序 <a href="https://github.com/maikebing/Maikebing.EntityFrameworkCore.Taos" target="_blank" rel="noopener noreferrer">Maikebing.EntityFrameworkCore.Taos</a></li><li>PinusDB  国产松果时序数据库, 简单易用, 我们也为他编写了提供程序, <a href="https://github.com/maikebing/PinusDB.Data" target="_blank" rel="noopener noreferrer">PinusDB.Data</a> </li><li>TimescaleDB  基于PostgreSQL的时序数据库, 你可以直接选择它来当时序数据库也可以当关系型数据库, 一次搞定。 </li><li>关系数据库 分区法 , 我们有支持这种方式,但始终不推荐,除非你想只想用一个数据库且通过分区就能搞定你的数据量。 </li><li>SingleTable  通过EF的的单表存储。 通过单表, 我们就不需要依赖于数据库或者分区等等。 小项目推荐。 </li></ul></li><li>消息队列  我们是通过CAP项目来实现的,因此它支持的理论上我们都支持。 <ul><li>RabbitMQ 我们推荐的。 </li><li>Kafka   测试似乎正常。 </li><li>ZeroMQ  针对出门的ZeroMQ , 我们编写了MaiKeBing.CAP.ZeroMQ 和 MaiKeBing.HostedService.ZeroMQ  以支持它。 </li><li>InMemory 通过它可以不需要依赖任何外接, 这是CAP提供的一种途径。 小项目推荐。 </li></ul></li><li>消息队列存储<ul><li>PostgreSql 如果全称用PostgreSQL 可以考虑。 </li><li>MongoDB  我们推荐的</li><li>LiteDB  .Net 编写的NoSQL 项目, 小项目推荐, </li><li>InMemory 存储在内存, 不依赖于外接。 小项目推荐。 </li></ul></li></ul><h2 class="anchor anchorWithStickyNavbar_mojV" id="如何部署">如何部署?<a class="hash-link" href="#如何部署" title="Direct link to heading"></a></h2><h3 class="anchor anchorWithStickyNavbar_mojV" id="如何使用docker-compose--安装iotsharp-">如何使用docker-compose  安装IoTSharp ?<a class="hash-link" href="#如何使用docker-compose--安装iotsharp-" title="Direct link to heading"></a></h3><ul><li><p><a href="https://github.com/IoTSharp/IoTSharp/tree/master/Deployments/rabbit_mongo_influx" target="_blank" rel="noopener noreferrer">RMI</a> 使用Rabbitmq 作为 EventBus, Mongodb 作为消息存储, 遥测数据使用Influx 2.0 ,这个方案中遥测数据也可以使用TDengine</p></li><li><p><a href="https://github.com/IoTSharp/IoTSharp/tree/master/Deployments/zeromq_taos" target="_blank" rel="noopener noreferrer">ZPT</a> 使用ZeroMQ 作为 EventBus, PostgreSQL 作为消息存储, 遥测数据使用  TDengine  </p></li><li><p><a href="https://github.com/IoTSharp/IoTSharp/tree/master/Deployments/zeromq_sharding" target="_blank" rel="noopener noreferrer">ZPS</a>  默认开发配置,  IoTSharp 和 PostgreSql, 遥测数据可以通过单表或者分表。 </p></li></ul><h2 class="anchor anchorWithStickyNavbar_mojV" id="初次使用">初次使用<a class="hash-link" href="#初次使用" title="Direct link to heading"></a></h2><ul><li>初始租户和管理员、用户注册信息在系统发现你未初始化时自动跳转到安装界面, 填写完成后, 系统会初始化权限、基础数据等种子数据。 </li><li>X509 CA证书用于通过证书进行保障安全通讯和关系验证, 第一次时需要调用高级管理员权限办法并写入系统, 尤其是当你使用了非管理员用户进行启动IoTSharp 时 , 因此, 需要确保第一次生成使用高权限, 后续使用低权限。</li></ul></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="theme-doc-footer-edit-meta-row row"><div class="col"><a href="https://github.com/IoTSharp/IoTSharp/docs/intro.md" target="_blank" rel="noreferrer noopener" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_dcUD" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col lastUpdated_foO9"></div></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><div class="pagination-nav__item"></div><div class="pagination-nav__item pagination-nav__item--next"><a class="pagination-nav__link" href="/docs/tutorial-basics/iotsharp"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">IoTSharp是什么?</div></a></div></nav></div></div><div class="col col--3"><div class="tableOfContents_cNA8 thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#iotsharp-是什么" class="table-of-contents__link toc-highlight">IoTSharp 是什么?</a><ul><li><a href="#iotsharp的系统必备有哪些" class="table-of-contents__link toc-highlight">IoTSharp的系统必备有哪些?</a></li></ul></li><li><a href="#如何部署" class="table-of-contents__link toc-highlight">如何部署?</a><ul><li><a href="#如何使用docker-compose--安装iotsharp-" class="table-of-contents__link toc-highlight">如何使用docker-compose  安装IoTSharp ?</a></li></ul></li><li><a href="#初次使用" class="table-of-contents__link toc-highlight">初次使用</a></li></ul></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container container-fluid"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">文档</div><ul class="footer__items"><li class="footer__item"><a class="footer__link-item" href="/docs/intro">简介</a></li></ul></div><div class="col footer__col"><div class="footer__title">社区</div><ul class="footer__items"><li class="footer__item"><a href="https://jq.qq.com/?_wv=1027&amp;k=u1ZzTmVd" target="_blank" rel="noopener noreferrer" class="footer__link-item">QQ群<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://discord.gg/My6PaTmUvu" target="_blank" rel="noopener noreferrer" class="footer__link-item">Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://weibo.com/iotsharp" target="_blank" rel="noopener noreferrer" class="footer__link-item">微博<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li></ul></div><div class="col footer__col"><div class="footer__title">其他</div><ul class="footer__items"><li class="footer__item"><a href="https://github.com/IoTSharp/IoTSharp" target="_blank" rel="noopener noreferrer" class="footer__link-item">GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://gitee.com/IoTSharp/IoTSharp" target="_blank" rel="noopener noreferrer" class="footer__link-item">Gitee<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://beian.miit.gov.cn/" target="_blank" rel="noopener noreferrer" class="footer__link-item"> 冀ICP备18039206号-2<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2022 IoTSharp. Built with Docusaurus.</div></div></div></footer></div>
15
<script src="/assets/js/runtime~main.55450f54.js"></script>
16 17 18
<script src="/assets/js/main.0cc0a2a1.js"></script>
</body>
</html>