Scalable Automatic Email Classification Service

We are currently working on an application that allows a user to register with one or more email accounts so that their emails can be automatically classified. The interface is implemented using Ruby, but the built-in (electronic classifier) ​​is written in Java and uses the WEKA API. The question is how can I integrate the front-end interface (web interface written in Ruby) using the back-end (mail classifier written in java) in a scalable way (processing a large number of users at the same time ..

+3
source share
3 answers

I'm not sure what an email classifier is. But in any such problem, the best solution is I recommend creating a RESTful API for your java service. This can be done very elegantly with the right tools. The API must be over HTTP, which returns JSON. Use a library like Jackson , which is serialized in JSON.

On the ruby ​​side, you can easily parse JSON and deserialize.

This is a very scalable solution because HTTP calls are stateless and are already scalable. The thread is used and discarded. If you need more energy, just add more cars.

A Rails application can also trigger caching of certain calls. But this is premature optimization.

, . , Java- . API. Ruby. JSONP AJAX , JSON.

+1

, RESTful API . , Java- API RESTful, API Rails. /user/ID/newmail.

Java Rails .

Btw:

Java 1000 ?

0

As the amount of data that you use to train the classifier grows, you may find that you can use ensemble algorithms (where a group of n nodes form an ensemble) and break the training data into each of n nodes.

To classify a new datapoint, you can use a voting system in which each of the n nodes receives a β€œvote” for the new datapoint to be classified as. The classification with the most votes wins.

0
source