All Projects → m-czernek → acrobot

m-czernek / acrobot

Licence: Apache-2.0 license
A simple acronym bot for Google Chat

Programming Languages

java
68154 projects - #9 most used programming language
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to acrobot

random-jpa
Create random test data for JPA/Hibernate entities.
Stars: ✭ 23 (+0%)
Mutual labels:  hibernate
the-apache-ignite-book
All code samples, scripts and more in-depth examples for The Apache Ignite Book. Include Apache Ignite 2.6 or above
Stars: ✭ 65 (+182.61%)
Mutual labels:  hibernate
vogon-java
Vogon - A simple personal finance tracker using Spring Boot and AngularJS
Stars: ✭ 16 (-30.43%)
Mutual labels:  hibernate
springmvc
spring mvc study
Stars: ✭ 87 (+278.26%)
Mutual labels:  hibernate
spring-blog
A blogging full-stack web application project made with Spring Boot for Codeup students to use as a reference during the Capstone process.
Stars: ✭ 44 (+91.3%)
Mutual labels:  hibernate
SpringSecuritySocialLoginExample
This application will provider user to login with social login( facebook, linkedin and twitter) and form login as well.
Stars: ✭ 39 (+69.57%)
Mutual labels:  hibernate
Library-Spring
The library web application where you can borrow books. It's Spring MVC and Hibernate project.
Stars: ✭ 73 (+217.39%)
Mutual labels:  hibernate
spring-boot-shop-sample
My first web application using Spring Boot framework.
Stars: ✭ 66 (+186.96%)
Mutual labels:  hibernate
hibernate-l2-memcached
Hibernate second level cache implementation over memcached
Stars: ✭ 34 (+47.83%)
Mutual labels:  hibernate
multitenant
Multi-Tenant Spring Boot Application with separate databases using Hibernate and H2.
Stars: ✭ 15 (-34.78%)
Mutual labels:  hibernate
Diber-backend
Delivery Service - Spring Boot / Spring Data Jpa / Hibernate / PostgreSQL / OAuth2 Application
Stars: ✭ 22 (-4.35%)
Mutual labels:  hibernate
company-structure-spring-security-oauth2-cache
Example Spring Boot + Hibernate + OAuth2 + Redis/EhCache project for demonstration purposes of cache mechanism.
Stars: ✭ 11 (-52.17%)
Mutual labels:  hibernate
Library
Online Library Management. User can search, check in, checkout book. System adds fines automatically if the book is not checked in by due date
Stars: ✭ 27 (+17.39%)
Mutual labels:  hibernate
springboot-rest-api-angularjs-https
REST API https with Spring Boot and Angular JS. Use MySQL, Hibernate and Spring Security.
Stars: ✭ 38 (+65.22%)
Mutual labels:  hibernate
spring-discord-bot
Discord all-purpose bot, made using Spring Boot, JPA, Hibernate, REST, HikariCP. Written for fun, do not take this serious.
Stars: ✭ 26 (+13.04%)
Mutual labels:  hibernate
spring-data-jpa-mongodb-expressions
Use the MongoDB query language to query your relational database, typically from frontend.
Stars: ✭ 86 (+273.91%)
Mutual labels:  hibernate
CXHibernate
C++ Hibernate ORM Framework
Stars: ✭ 17 (-26.09%)
Mutual labels:  hibernate
employeeManager
自己尝试写的一个简单的考勤管理系统,包含管理成员信息以及成员考勤,管理员审批的功能,采用SpringMVC+Hibernate4+Spring搭建
Stars: ✭ 40 (+73.91%)
Mutual labels:  hibernate
SpringMVCgbook
springMVC Hibernate (ssh) 留言板管理系统
Stars: ✭ 18 (-21.74%)
Mutual labels:  hibernate
Spring-Boot-2
Spring Boot 2.x examples
Stars: ✭ 33 (+43.48%)
Mutual labels:  hibernate

Acrobot

Build Status

Acrobot is a Google Hangouts chat bot, with the aim of keeping track of acronyms used within the company.

Image of Acrobot saving and answering an acronym

Image of Acrobot editing and removing acronym explanations

Usage

Acrobot is capable of multiple actions:

  • Saving an acronym: !acronym = explanation
  • Getting an acronym explanation: acronym
  • Modifying an acronym explanation: !acronym = explanation => new explanation
  • Removing an acronym explanation: !acronym = explanation =>

White spaces do not matter. If you are interacting with acrobot in a room, do not forget to tag the bot, e.g. @Acrobot !acronym = explanation.

You can change and remove only those explanations that you entered into the database.

Architecture

Acrobot is a simple application, using:

  • Java (tested against OpenJDK 11)
  • Hibernate
  • MySQL
  • Kubernetes/OpenShift for deployment #todo OCP template

This particular implementation uses Google's Cloud Pub/Sub messaging middleware.

Alt text

custom_mark10 @startuml; actor "Google Hangouts" as User; participant "Pub/Sub middleware" as A; participant Acrobot; User -> A: Send a message; Acrobot --> A: Poll for a message; Acrobot --> User: Send a response; @enduml; custom_mark10

As such, before deploying the Google bot, you have to complete Google's Pub/Sub prerequisites:

  1. Create a project in the Cloud Platform Console, which:
    1. Has the Pub/Sub API enabled.
    2. Has granted the Pub/Sub permissions to the [email protected] service role.
  2. Create a service account with the Pub/Sub API roles.
  3. Create a message queue in the Cloud Platform Console.
  4. Associate the queue with a subscription in the Cloud Platform Console.

For more details on setting up the bot, see the Google Developer's documentation.

Acrobot has a few dependencies:

  1. export GOOGLE_APPLICATION_CREDENTIALS: an environment variable that contains the path to the service account json you created. If you are deploying Acrobot on Kubernetes/OpenShift, you will have to inject the file either using a secret, or a config map, into your pod.
  2. export JDBC_URL, JDBC_USER, and JDBC_PASSWORD for the DB connection details.
  3. export PROJECT_ID and SUBSCRIPTION_ID which match your Google project and subscription created earlier.

Testing

Acrobot contains unit tests with an in-memory H2 database. You should execute all tests before pushing new code. You can execute tests by issuing: mvn clean test. To execute a particular test, you can specify the test parameter in the format of ClassName#TestName, for example:

mvn clean test -Dtest=MessageHelperTest#exceptionPropagationTest

All new features should have tests.

Credits

Author: Marek Czernek. The idea of Acrobot came from a number of very smart folks at Red Hat. The IRC implementation was done by https://github.com/mfojtik. If you wish to run AcroBot on IRC, see the AcroBot Implementation.

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].