All Projects → devicehive → Devicehive Java Server

devicehive / Devicehive Java Server

Licence: apache-2.0
DeviceHive Java Server

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Devicehive Java Server

Sitewhere
SiteWhere is an industrial strength open-source application enablement platform for the Internet of Things (IoT). It provides a multi-tenant microservice-based infrastructure that includes device/asset management, data ingestion, big-data storage, and integration through a modern, scalable architecture. SiteWhere provides REST APIs for all system functionality. SiteWhere provides SDKs for many common device platforms including Android, iOS, Arduino, and any Java-capable platform such as Raspberry Pi rapidly accelerating the speed of innovation.
Stars: ✭ 788 (+226.97%)
Mutual labels:  microservices, zookeeper, platform, kafka, iot
Digital Restaurant
DDD. Event sourcing. CQRS. REST. Modular. Microservices. Kotlin. Spring. Axon platform. Apache Kafka. RabbitMQ
Stars: ✭ 222 (-7.88%)
Mutual labels:  rest, microservices, kafka, websockets
Micronaut Microservices Poc
Very simplified insurance sales system made in a microservices architecture using Micronaut
Stars: ✭ 394 (+63.49%)
Mutual labels:  microservices, kafka, postgresql, jwt
Thingsboard
Open-source IoT Platform - Device management, data collection, processing and visualization.
Stars: ✭ 10,526 (+4267.63%)
Mutual labels:  platform, kafka, iot, websockets
Fw Spring Cloud
SpringCloud构建实战、从入门到高级,包含eureka、zuul、gateway、feign、ribbon、hystrix、mq、turbine、nacos、elk、consul、zookeeper、rocketmq、kafka、分布式事务(RocketMq、LCN、Seata)、分库分表(Sharding-JDBC)、分布式锁(Redis、Guava)、jwt、SkyWalking、Zipkin、bootadmin等使用案例
Stars: ✭ 276 (+14.52%)
Mutual labels:  zookeeper, kafka, jwt
Surging
Surging is a micro-service engine that provides a lightweight, high-performance, modular RPC request pipeline. The service engine supports http, TCP, WS,Grpc, Thrift,Mqtt, UDP, and DNS protocols. It uses ZooKeeper and Consul as a registry, and integrates it. Hash, random, polling, Fair Polling as a load balancing algorithm, built-in service gove…
Stars: ✭ 3,088 (+1181.33%)
Mutual labels:  microservices, zookeeper, kafka
Gin Boilerplate
The fastest way to deploy a restful api's with Gin Framework with a structured project that defaults to PostgreSQL database and JWT authentication middleware stored in Redis
Stars: ✭ 559 (+131.95%)
Mutual labels:  microservices, postgresql, jwt
Nakadi
A distributed event bus that implements a RESTful API abstraction on top of Kafka-like queues
Stars: ✭ 734 (+204.56%)
Mutual labels:  microservices, kafka, postgresql
Whatsmars
Java生态研究(Spring Boot + Redis + Dubbo + RocketMQ + Elasticsearch)🔥🔥🔥🔥🔥
Stars: ✭ 1,389 (+476.35%)
Mutual labels:  microservices, zookeeper, kafka
Kafka Zk Restapi
Kafka Zookeeper RESTful API to perform topic/consumer group administration/metric(offset\lag\message) collection and monitor
Stars: ✭ 121 (-49.79%)
Mutual labels:  rest, zookeeper, kafka
Gemini
Model Driven REST framework to automatically generate CRUD APIs
Stars: ✭ 138 (-42.74%)
Mutual labels:  rest, microservices, postgresql
Firecamp
Serverless Platform for the stateful services
Stars: ✭ 194 (-19.5%)
Mutual labels:  zookeeper, kafka, postgresql
Microservices Platform
基于SpringBoot2.x、SpringCloud和SpringCloudAlibaba并采用前后端分离的企业级微服务多租户系统架构。并引入组件化的思想实现高内聚低耦合,项目代码简洁注释丰富上手容易,适合学习和企业中使用。真正实现了基于RBAC、jwt和oauth2的无状态统一权限认证的解决方案,面向互联网设计同时适合B端和C端用户,支持CI/CD多环境部署,并提供应用管理方便第三方系统接入;同时还集合各种微服务治理功能和监控功能。模块包括:企业级的认证系统、开发平台、应用监控、慢sql监控、统一日志、单点登录、Redis分布式高速缓存、配置中心、分布式任务调度、接口文档、代码生成等等。
Stars: ✭ 3,274 (+1258.51%)
Mutual labels:  microservices, platform, jwt
Synch
Sync data from the other DB to ClickHouse(cluster)
Stars: ✭ 200 (-17.01%)
Mutual labels:  kafka, postgresql
Awot
Arduino web server library.
Stars: ✭ 200 (-17.01%)
Mutual labels:  rest, iot
Fastapi Gino Arq Uvicorn
High-performance Async REST API, in Python. FastAPI + GINO + Arq + Uvicorn (w/ Redis and PostgreSQL).
Stars: ✭ 204 (-15.35%)
Mutual labels:  rest, postgresql
Pos
Sample Application DDD, Reactive Microservices, CQRS Event Sourcing Powered by DERMAYON LIBRARY
Stars: ✭ 207 (-14.11%)
Mutual labels:  microservices, kafka
Express Graphql Boilerplate
Express GraphQL API with JWT Authentication and support for sqlite, mysql, and postgresql
Stars: ✭ 201 (-16.6%)
Mutual labels:  postgresql, jwt
Thunder
⚡️ Nepxion Thunder is a distribution RPC framework based on Netty + Hessian + Kafka + ActiveMQ + Tibco + Zookeeper + Redis + Spring Web MVC + Spring Boot + Docker 多协议、多组件、多序列化的分布式RPC调用框架
Stars: ✭ 204 (-15.35%)
Mutual labels:  zookeeper, kafka
Spring Boot Postgresql Jpa Hibernate Rest Api Demo
Building RESTful APIs with Spring Boot, PostgreSQL, JPA and Hibernate
Stars: ✭ 209 (-13.28%)
Mutual labels:  rest, postgresql

License

DeviceHive Java server

DeviceHive turns any connected device into the part of Internet of Things. It provides the communication layer, control software and multi-platform libraries to bootstrap development of smart energy, home automation, remote sensing, telemetry, remote control and monitoring software and much more.

Connect embedded Linux using Python, Node.js or Java libraries and JSON format. Write and read your data via REST, Websockets or MQTT, explore visualization on Grafana charts.

Develop client applications using HTML5/JavaScript and Android libraries. Leave communications to DeviceHive and focus on actual product and innovation.

DeviceHive license

DeviceHive is developed by DataArt Apps and distributed under Open Source Apache 2.0. This basically means you can do whatever you want with the software as long as the copyright notice is included. This also means you don't have to contribute the end product or modified sources back to Open Source, but if you feel like sharing, you are highly encouraged to do so!

© Copyright 2013-2017 DataArt Apps © All Rights Reserved

Docker Container

DeviceHive could be deployed manually, via Docker Compose or to Kubernetes cluster. Our suggestion is to start from Docker Compose - the easiest way to start your mastering DeviceHive capabilities. Instructions could be found here. In case you're more familiar with Kubernetes, please follow this link for detailed instructions.

DeviceHive Java installation instructions

Though docker-compose installation is the most developer-friendly way of running DeviceHive locally, sometimes it's required to build and start project manually. Below you can find detailed instructions on that.

Prerequisites

In order to use DeviceHive framework you must have the following components installed and configured:

Build packages

Download source code from GitHub using "Download ZIP" button. It should always point to recent stable or beta release, but you always can get any other tag or branch. It also can be done using one of Git version control client or git command line tool. If you prefer git, clone project using command

git clone https://github.com/devicehive/devicehive-java-server.git

After that you can switch to the tag or branch you need. The list of all available releases can be found at https://github.com/devicehive/devicehive-java-server/releases. Execute following command from ${devicehive-java-server-directory}.

mvn clean package

If there are no errors, compilation and packaging are completed and you can go to the next step.

Running Apache Kafka

Start Zookeeper and Apache Kafka brokers as explained at official documentation (http://kafka.apache.org/documentation.html#quickstart). If your Kafka brokers are installed on the different machines, please specify their hostname/ports at app.properties file. You need to update zookeeper.connect (zookeeper's contact point) and bootstrap.servers (list of brokers) properties.

Running Hazelcast

To start, download Hazelcast IMDG 3.8.1 from official site (https://hazelcast.org/download/), extract to local drive and create in Hazelcast bin folder file hzstart.sh with following contents:

export JAVA_OPTS="$JAVA_OPTS -cp /path/to/jar/from/devicehive-hazelcast/devicehive-common-<version>-shade.jar:/path/to/HAZELCAST_HOME/lib/hazelcast-all-3.8.1.jar"
./start.sh

Replace

<serialization>
   <portable-version>0</portable-version>
</serialization>

with

<serialization>
   <portable-version>0</portable-version>
   <portable-factories>
        <portable-factory factory-id="1">com.devicehive.model.DevicePortableFactory</portable-factory>
   </portable-factories>
</serialization>

in hazelcast.xml localted in bin folder of hazelcast. Also replace all the map and and multimap sections of hazelcast.xml with:

<map name="default">
  <eviction-policy>LRU</eviction-policy>
</map>
<map name="NOTIFICATIONS-MAP">
  <time-to-live-seconds>120</time-to-live-seconds>
</map>
<map name="COMMANDS-MAP">
  <time-to-live-seconds>120</time-to-live-seconds>
</map>
<multimap name="default">
  <backup-count>0</backup-count>
  <async-backup-count>1</async-backup-count>
  <value-collection-type>SET</value-collection-type>
</multimap>

Run hzstart.sh.

Starting database

  • After you have downloaded and installed PostgreSQL (see https://wiki.postgresql.org/wiki/Detailed_installation_guides) you have to create new user. This step is required for database migrations to work properly. By default, DH expects that the username is postgres and the password is 12345. You can change this in the DH configuration files.
  • Create database with the name devicehive using user that have been created at step 1. This user should be owner of database.
  • Database schema will be initialized on application startup.

Checking properties

Each microservice has its own src/main/resources/application.properties file which contains all application-level configurations (db credentials, hazelcast address, kafka props etc.). Please check them before building application in order to avoid problems at runtime.

You can also override these values by passing them to JVM while running java -Dapplication.property.name=application.property.name -jar. For example:

java -Dhazelcast.cluster.members=0.0.0.1:5701 -jar ${devicehive-jar}.jar
java -Dbootstrap.servers=0.0.0.1:9092 -jar ${devicehive-jar}.jar
java -Dproxy.connect=0.0.0.1:3000 -jar ${devicehive-jar}.jar

DB connection properties are managed inside devicehive-rdbms-dao/src/main/resources/application-persistence.properties. To override them do the same:

java -Dspring.datasource.url=jdbc:postgresql://0.0.0.1:5432/devicehive -jar ${devicehive-jar}.jar
java -Dspring.datasource.username=test -Dspring.datasource.password=test -jar ${devicehive-jar}.jar

Running application

DeviceHive ecosystem contains of 3 mandatory and 1 optional services, namely Backend, Frontend, Auth and Plugin management (optional) micro services.

  • To start application, first run following command:

java -jar ${devicehive-java-server-directory}/devicehive-backend/target/devicehive-backend-<version>-boot.jar

This will start Backend. Wait for the application to start, then run:

java -jar ${devicehive-java-server-directory}/devicehive-frontend/target/devicehive-frontend-<version>-boot.jar

and

java -jar ${devicehive-java-server-directory}/devicehive-auth/target/devicehive-auth-<version>-boot.jar

This will start embedded undertow application server on default port 8080 and deploy DeviceHive application. You can visit http://localhost:8080/dh/swagger from your web browser to start learning the frontend's APIs. Also you can visit http://localhost:8090/dh/swagger from your web browser to start learning the auth's APIs.

For devicehive-frontend and devicehive-backend logging level can be changed by adding the following properties to the command above:

-Droot.log.level=value1 -Dcom.devicehive.log.level=value2

The values can be: TRACE, DEBUG, INFO, WARN, ERROR. If the properties are absent the default values will be used. For devicehive-frontend and devicehive-auth default values for value1 and value2 are WARN and INFO correspondingly. For devicehive-backend the default value for both is INFO.

Plugin management service

There's one optional service inside DeviceHive ecosystem - Plugin Management service. It allows to register and to update DeviceHive plugins (that allow customers to implement their own business logic without diving into DeviceHive source code) via RESTful API.

To start it simply run following command:

java -jar ${devicehive-java-server-directory}/devicehive-plugin/target/devicehive-plugin-<version>-boot.jar

Service will be started on 8110 port by default, so you can visit its swagger at http://localhost:8110/dh/swagger

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].