Which one is easy to implement for starters Ehcache or Memcached? - caching

Hi all am fresher to the coding field having background about c, c++, php, little java. I wanted to implement caching concept in my grais application (Which is my first grails experience). Can anyone suggest me, (in implementation side) which one will be easy to understand and implement for freshers like me. Your valuable answers will be very helpful for most of the freshers like me. Thanks in advance.

Performance wise Ehcache is very fast than memcached.. But ehcache needs to be implemented on each slave nodes. When the size of the databse is not too large you can go for ehcache.. In implimentation side both are not too complicated to implement.

Related

How would I implement Matrix Factorization Algorithm for a Spring App?

So I have this CS course that has a project about building a web application using a REST API. I am in the backend and I used the Spring framework. There is a task, to implement Matrix Factorization algorithm from scratch. I am a bit lost. How would I implement this. Should I just load all my data from the DB and do the calculations with java? That seems like a waste of memory. Is there a more efficient way to do this? Thanks for reading, any help would be more than welcome.

Websocket server performance comparison

Are there any reliable performance test results/benchmarks/comparisons for websocket server frameworks?
I was googlin to and fro without any significant results. Going by various of Google's instant search suggestions, it seems to be a really hot topic, but the search results are far from satisfying. So a good answer is highly appreciated!
Background
I need to implement websockets for an application that has to be able to scale well, and would therefore like to knoow if there are any big performance differences amongst the available frameworks. I do not really care (too much) about the specific programming language, as stated above performance as well as scalability (+ obviously stability) are the important factors.
What I found so far
A more or less functional check with some time measurements by the autobahn testsuite, comparing their implementation (with CPy, pypy, wsaccel) against 4 others (Jetty, Websocket++, cowboy, ws)
A websockets byproduct of the HTTP comparison between MochiWeb and cowboy
So it is not much, but maybe at least these help someone also looking for an answer.
Aside: If you think this question is not good as is, please consider editing rather than close-voting it, (I found out that I am not a good OP ^^) I would really appreciate it, and there really is a great demand for a good answer to this (kind of) question.

What is the most robust, universal ActiveRecord implementation for JavaScript/SSJS?

Although I'm not very familiar with its usage yet, I'm intrigued by what I've seen of the power of convention-over-configuration employed in the ActiveRecord pattern, popularized by Ruby-on-Rails. I've seen a few JavaScript implementations out there, but was looking for advice on which was:
The most universal JavaScript implementation in terms of both adapter support (ranging from in-memory JSON stores to specific databases) and CommonJS-friendliness (if relevant yet)
The most robust in terms of elegantly leveraging conventions for reducing redundancy and allowing for rapid application development.
Combining the strengths of JavaScript such as its possibilities for code reuse on the client and server-side, with what appears from my limited perspective to be the primary draw of RoR, seems a slam dunk.
Also any tips on getting started or good tutorials, would be most welcome.
I guess it is too late for this answer but you want to have a look at Ember and Ember-Data. Ember does exactly what you want. http://emberjs.com/

should we need to know how to implement built-in data structures?

I'm a C# developer and I use data structures such as List and Dictionary all the time, I'm reading some interview books and they all seem to suggest that we should know how to implement such data structures as well as how to use them, do a lot of you share the same viewpoint?
I would say that at a minimum every competent programmer should understand the internals of the most widely used data structures.
By that I mean being able to explain how they work internally, and what complexity guarantees (both time and space) they offer.
Yes.
For the same reasons that a C or C++ programmer should be familiar with assembly language; it helps you understand what is going on under the hood, and improves your ability to select the appropriate data structure for your particular programming problem.
In the same vein, you don't have to write a compiler use your favorite programming language effectively, but you can greatly improve your knowledge about that language by writing a compiler for it.
If you don't know how to implement the data structure how can you possibly say you understand the strengths and weaknesses of the structure in question? As aix mentioned it should be a requirement that you understand the internals of what you are using. I would never trust a mechanic who didn't understand how an engine worked.
It is preferably that you know how to implement these data structures, but you do not need this knowledge in order to be a competent or even effective programmer.
You should have a high level understanding of (obviously) what they do but also how they do it. That should suffice.
I don't need to know the inner workings of every tool I use to be able to use it effectively. I just need to have a grasp on what it does, which uses it is suited to, and which uses it is not suited to.
The best programmers will know such data structures and all known variations inside out, but then they will also know every little corner of their chosen language / framework as well. They are well above the 'competent' level.

Reference for the benefits of Caching

I am looking for a good reference (Paper, Blog, Book etc.) on how a good caching strategy could benefit - especially web based - applications. I know it is always application specific but I just want to quote some figures about the performance gains possible (or when it doesn't make sense). Would be great if you had some input for me.
Some pointers with data:
http://www.gear6.com/memcached-resources/papers
http://www.docstoc.com/docs/412119/Technical-White-Papers---Oracle-Coherence
http://www.terracotta.org/ehcache/distributed-cache/ehcache-ex-performance-whitepaper
There's a decent paper (published in the ACM) called "Quick and Easy Cache Performance Analysis". You might find it useful.
If you can't download that paper, let me know and I'll send it to you.

Resources