Dev Time: Getting rid of synchronized: Using Akka from Java
Getting rid of synchronized: Using Akka from Java I've been giving an internal talk on Akka , the Actor framework for the JVM, at my former company synyx . For the talk I implemented a small example application, kind of a web crawler, using Akka. I published the source code on Github and will explain some of the concepts in this post. Motivation To see why you might need something like Akka, think you want to implement a simple web crawler for offline search. You are downloading pages from a certain location, parse and index the content and follow any links that you haven't parsed and indexed yet. I am using HtmlParser for downloading and parsing pages and Lucene for indexing them. The logic is contained in two service objects, PageRetriever and Indexer, that can be used from our main application. A simple sequential execution might then look something like this: public void downloadAndIndex(String path, IndexWriter writer) { VisitedPageStore pageStore = new VisitedPageStore();Read full article from Dev Time: Getting rid of synchronized: Using Akka from Java
No comments:
Post a Comment