Links

elasticmq: simple message queue system with SQS interface

ElasticMQ is a simple message queue system, written entirely in Scala.

Currently messages are stored either in-memory, or persisted in a database (MySQL, Postgres, H2, ...) using Squeryl.

ElasticMQ implements a subset of the SQS REST interface, providing an SQS alternative e.g. for testing purposes.

The REST server is implemented using Netty, a high-performance, asynchronous, event-driven server Java framework.

The SQS interface has been tested using the Amazon Java SDK library; see the rest-sqs-testing-amazon-java-sdk module for the testsuite.

https://github.com/adamw/elasticmq

Filed under  //   AWS   Java   SQS   Scala   message   queue  
Posted January 25, 2012 by email 

Node.x: asynchronous, event-based server framework for the JVM similar to node.js

What is Node.x?

* A general purpose framework that uses an asynchronous event based style for building highly scalable network or file system aware applications
* Runs on the JVM.
* Everything is asynchronous.
* Embraces the style of node.js and extends it to the JVM. Think node.js on steroids. Plus some.
* Polyglot. The same (or similar) API will be available in multiple languages: Ruby, Java, Groovy, (Python?, JS?, Clojure?), etc
* Goes with the recent developments with InvokeDynamic in Java 7 and bets on the JVM being the future premier runtime for dynamic languages.
* Enables you to create network servers or clients incredibly easily.
* True threading. Unlike node.js, Python Twisted or Ruby EventMachine, it has true multi-threaded scalability. No more spinning up 32 instances just to utilise the cores on your server.
* Understands multiple protocols out of the box including: TCP, SSL, UDP, HTTP, HTTPS, Websockets, AMQP, STOMP, Redis etc
* Provides an elegant api for composing asynchronous actions together. Glue together HTTP, AMQP, Redis or whatever in a few lines of code.

https://github.com/purplefox/node.x/
http://purplefox.github.com/node.x/

Filed under  //   groovy   java   jruby   jvm   node   node.js   scala   server  
Posted July 11, 2011 by email 

Apache Clerezza: Semantic web + OSGi

Clerezza is a service platform based on OSGi (Open Services Gateway initiative) which provides a set of functionality for management of semantically linked data accessable through RESTful Web Services and in a secured way. Furthermore, Clerezza allows to easily develop semantic web applications by providing tools to manipulate RDF data, create RESTful Web Services and Renderlets using ScalaServerPages.

Contents are stored as triples based on W3C RDF specification. These triples are stored via Clerezza's Smart Content Binding (SCB). SCB defines a technology-agnostic layer to access and modify triple stores. It provides a java implementation of the graph data model specified by W3C RDF and functionalities to operate on that data model. SCB offers a service interface to access multiple named graphs and it can use various weighted providers to manage RDF graphs in a technology specific manner, e.g., using Jena or Sesame. It also provides for adaptors that allow an application to use various APIs (including the Jena api) to process RDF graphs. Furthermore, SCB offers a serialization and a parsing service to convert a graph into a certain representation (format) and vice versa.

http://incubator.apache.org/clerezza/

Filed under  //   apache   http   java   jena   osgi   rdf   rest   scala   semanticweb   sesame   sparql  
Posted May 31, 2011 by email 

Metrics: Capturing JVM- and application-level metrics

Capturing JVM- and application-level metrics. So you know what's going on.

Metrics comes with five types of metrics:

* Gauges are instantaneous readings of values (e.g., a queue depth).
* Counters are 64-bit integers which can be incremented or decremented.
* Meters are increment-only counters which keep track of the rate of events. They provide mean rates, plus exponentially-weighted moving averages which use the same formula that the UNIX 1-, 5-, and 15-minute load averages use.
* Histograms capture distribution measurements about a metric: the count, maximum, minimum, mean, standard deviation, median, 75th percentile, 95th percentile, 98th percentile, 99th percentile, and 99.9th percentile of the recorded values. (They do so using a method called reservoir sampling which allows them to efficiently keep a small, statistically representative sample of all the measurements.)
* Timers record the duration as well as the rate of events. In addition to the rate information that meters provide, timers also provide the same metrics as histograms about the recorded durations. (The samples that timers keep in order to calculate percentiles and such are biased towards more recent data, since you probably care more about how your application is doing now as opposed to how it's done historically.)

Metrics also has support for health checks

Code:
https://github.com/codahale/metrics


Presentation:
http://codahale.com/codeconf-2011-04-09-metrics-metrics-everywhere.pdf

Filed under  //   java   jvm   metrics   monitoring   scala  
Posted April 11, 2011 by email 

HawtDispatch: The libdispatch style API for Java and Scala

HawtDispatch is a small ( less than 100k ) thread pooling and NIO handling framework API modeled after the libdispatch API that Apple created to power the Grand Central Dispatch (GCD) technology in OS X. It allows you to more easily develop multi-threaded applications which can more easily scale to take advantage of all the processing cores on your machine. At the same time, it’s development model simplifies solving many of the problems that plague multi-threaded NIO development.

Image001

http://hawtdispatch.fusesource.org/

Filed under  //   concurrent   dispatch   java   scala   threading  
Posted September 28, 2010 by email 

Akka: simpler Scalability, Fault-Tolerance, Concurrency & Remoting through Actors

Akka is the platform for the next generation event-driven, scalable and fault-tolerant architectures on the JVM.

http://www.akkasource.org/

Scala Example:

// creates an actor on the remote node 
    val service = actor("remote.node", 9999) {
      case fun => reply(fun())
    }

    // creates a processing function 
    val processingFun = () => ...

    // sends function to remote node 
    service ! processingFun

Filed under  //   actors   concurrency   java   scala  
Posted May 28, 2010 by email