Sign in

Alexander Ang
A curious software developer who loves to write.
Jira Logo

Introduction


WebSocket + SpringBoot
WebSocket + SpringBoot
source: https://blog.ascendingdc.com/a-quick-tutorial-of-springboot-with-websocket-capabilities/


<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>…


source: https://miro.medium.com/max/4000/1*77Vo1RFQ-5DcLKdeHbb2-A.png

What does Redis actually mean?

Introduction


<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-aop</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!-- optional untuk logging -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>



Kubernetes

Definition

sumber: https://docs.bytemark.co.uk/wp-content/uploads/2019/02/Monolithic-Application.png


<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>runtime</scope>
</dependency>
# Redis Config
spring.redis.host=localhost
spring.redis.port=6379
spring.cache.type=redis //set application cache type to redis
spring.cache.redis.time-to-live=60000 //cache expiration time in miliseconds
spring.cache.redis.cache-null-values=false //allow redis to cache null values
spring.cache.redis.use-key-prefix=true //to enable prefix in cache key name
spring.cache.redis.key-prefix=My Cache: //key name prefix


<dependency>
<groupId>javax.cache</groupId>
<artifactId>cache-api</artifactId>
<version>1.1.0</version>
</dependency>
<dependency>
<groupId>org.ehcache</groupId>
<artifactId>ehcache</artifactId>
<version>3.6.2</version>
</dependency>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.ehcache.org/v3"
xmlns:jsr107="http://www.ehcache.org/v3/jsr107"
xsi:schemaLocation="
http://www.ehcache.org/v3 http://www.ehcache.org/schema/ehcache-core-3.0.xsd
http://www.ehcache.org/v3/jsr107 http://www.ehcache.org/schema/ehcache-107-ext-3.0.xsd">
<cache alias="findAllCache">
<expiry>
<ttl unit="seconds">5</ttl>
</expiry>
<listeners>
<listener>
<class>com.example.demo.config.CacheEventLogger</class>
<event-firing-mode>ASYNCHRONOUS</event-firing-mode>…


<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-cache</artifactId>
</dependency>
<beans>
<cache:annotation-driven />

<bean id="cacheManager" class="org.springframework.cache.support.SimpleCacheManager">
<property name="caches">
<set>
<bean
class="org.springframework.cache.concurrent.ConcurrentMapCacheFactoryBean"
name="addresses"/>
</set>
</property>
</bean>
</beans>

Alexander Ang

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store