Jai’s Weblog – Tech, Security & Fun…

Tech, Security & Fun…

  • Jaibeer Malik

    Jaibeer Malik
  • View Jaibeer Malik's profile on LinkedIn
  • Subscribe

  • Feedburner

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 32 other followers

  • Archives

  • Categories

  • Stats

    • 412,782
  • Live Traffic

  • Advertisements

ElasticSearch: Indexing setup using Akka tutorial

Posted by Jai on March 21, 2014

Find ElasticSearch tutorial on github using Akka with test cases. The tutorial covers the search indexing setup using Akka.


elasticsearch-akka repository uploaded on github explaining the ElasticSearch indexing setup using Akka Actors usage with test cases.

URL: https://github.com/jaibeermalik/elasticsearch-akka


Setup Index

setup all the indices from start, and change to alias later. Setup multiple indices in parallel. Only if all indexing done, change to alias. Monitor indexing of all doc, how many successful and failures. Depending all count of docs, change aliasing.


BooststrapSearchSetup(): Kick off search setup and monitor status.
->SetupIndexMasterActor: Monitor status for all indexes. Single instance per app context.
–>SetupIndexWorkerActor: foreach index monitor status. One instance per index.
—>SetupDocumentTypeWorkerActor: foreach document type track status and index in parallel. One instance per document type under an index.
—->DataGeneratorWorkerActor: Generate data which needs to be indexed. Single instance per document type.
—->DocumentGeneratorWorkerActor: Generate search document. multiple instance let’s say 10.
—->IndexProductDataWorkerActor: index search document to ES. multiple instance let’s say 10.

Regular update

Index a document Asynch on real time. Update/Delete a doc, and check status.

Exception handling

Each Actor to report status using exception handling. Actor state and status reporting from child actor to Parent with timeout approach.

Executor, Dispatcher and Routing

Specific configurations for executors, dispatchers and routing for each actor. Balancing dispatcher for same actor type as diving work to idle actors also. Round-robin Resizable router pool.


Unit test cases for Actors using testkit. Integration test cases with spring test.

The tutorial is for hands on Akka Actors and ElasticSearch setup.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: