At a present moment project is under slowpoke construction
SMS Classifier is simple application that implements sms classification by categories: spam, marketing, time-sensitive messages and etc. Application should determine the SMS category by text, sender or country, for the future prioritizing and filtering purposes.
- Rules-engine based approach
- Caching rule models for the high performance
- Data loading & updating using MSSQL stored procedures (
production
mode restriction) - RESTful API
Cache library module contains simple Cacheable
interface:
public interface Cacheable<K, V> {
int size();
boolean isEmpty();
void clear();
V get(K key);
V remove(K key);
boolean containsKey(K key);
//...
}
with different kinds of implementations:
These classes provide a base toolkit for convenient work with deletable DB records, their updating and storing into the cache. You can easily customise your own caches according to your requirements. For example see the Rule service, that is based on Listable cache) implementation.
Service is a RESTful API rules engine, which classifies sms's into different types. According to the performance requirements, all the data are stored in fast cached structures described above.
git clone https://github.com/ASaunin/sms-classifier
cd sms-classifier
mvnw clean install
mvnw spring-boot:run -pl classifier
You can customize your own classification rules in appropriate H2 data file
mvnw spring-boot:run -pl classifier -Dactive.profile=stage
Using stage
or prod
mode, you need to:
- setup MSSQL database with your own correct schema & data
- configure datasource url & credentials in
application-{env}.yml
Use Swagger-UI endpoint to get an API description