Tag Archives: Scala

.NET / Scala Interop Using RabbitMQ


.NET / Scala Interop Using RabbitMQ
// CodeProject Latest Articles

Getting .NET code to talk to Scala code and vice versa using RabbitMQ

Scala: call me by my name please?


via Dublin Tech: Scala: call me by my name please?.

In Java, when frameworks such as log4J became popular in Java architectures it was a common occurence to see code such as:

Reactive (in RxJS) and Non-Reactive (in Scala) Snakes And Ladders


via Reactive (in RxJS) and Non-Reactive (in Scala) Snakes And Ladders | Software Artisan’s Blog.

While playing around with RxJS, I thought it would be interesting to create a Snake and Ladders game that I played during my childhood days. A typical game is played by 3-4 players with a board size of 100 cells and a dice. The board has snakes and ladders on it. Rules are very simple; when a player ends up in a position where the ladder starts, it gets a lift to a position where the ladder ends and if a player ends up in a position where a snake’s mouth starts, it gets gulped down by the snake and reach the tail as a new position. Otherwise, the player moves to a new position from the old by the throw of a dice. Players take turn at throwing the dice.

In the reactive version using RxJS, lets start with a generator that would push a player (represented as a value starting from 0 for first player, 1 for second player and so on…) every few milliseconds, in my case 100ms. In the increment function, lets bump up the value by 1 and finally in the ‘Return Value’ function where the generated numbers are cast out by the number of players using mod operator. So if there are 3 players, the first player would start at 0 and the third would have number of 2. I’m using Node.js to run this and have imported the RxJS module. Here is what I ended up creating for starters.

Regular Expressions in 10 Different Languages


via Regular Expressions in 10 Different Languages – Treehouse Blog.

You might’ve heard that the word “OK” is the most globally recognized phrase in the world. It’s found in almost every spoken language from Arabic to Zulu.

In the programming world, we have something similar: Regular Expressions.

Regular Expressions, or regexes as the cool kids say, are powerful tools used to validate, manipulate, and extract data from text.  The way they work is by defining a pattern that describes what’s trying to be found.  This pattern is the “OK” of the programming world.

First, let’s take a look at how to construct a common pattern. We can use the title of this blog post as an example:

Using Spark to Create APIs in Scala


via Using Spark to Create APIs in Scala | Nordic APIs.

In our previous piece, we discussed the strengths of the Java Language within theSpark framework, highlighting the ways Java Spark increases simplicity, encourages good design, and allows for ease of development.

In this piece we continue our coverage on Spark, a micro framework great for defining and dispatching routes to functions that handle requests made to your web API’s endpoints. We’re going to examine the counterpoint to Java Spark, Scala Spark. We’ll discuss the origin, methodologies, and applications of Scala, as well as some use-cases where Scala Spark is highly effective.

Scaling Scala vs Java


via all that jazz – Scaling Scala vs Java.

In my previous post I showed how it makes no sense to benchmark Scala against Java, and concluded by saying that when it comes to performance, the question you should be asking is “How will Scala help me when my servers are falling over from unanticipated load?” In this post I will seek to answer that, and show that indeed Scala is a far better language for building scalable systems than Java.

Polyglot Persistence: EclipseLink with MongoDB and Derby


via Polyglot Persistence: EclipseLink with MongoDB and Derby ~ Enterprise Software Development with Java.

Polyglot persistence has been in the news since some time now. Kicked off by the famous Fowler post from end 2011 I see more an more nice ideas coming up. Latest one was a company internal student project in which we used Scala as a backend persisting data into MongoDB, PostgreSQL and Apache Solr. I’m not a big fan of Scala and remembered EclipseLink’s growing support for NoSQL databases. Given that I simply had to try something like this.