[erlang-questions] Did I do it right?
Mon Oct 29 00:03:43 CET 2012
Thanks for taking a look...
I wanted to understand better what was going on with OTP, and I thought that rolling my own OTP- Supervisor-compliant process would help. I thought that one day I might need to write my own. I sort of forgot that I did that - I will replace it with a gen-server.
From: Gleb Peregud <>
To: James Rosenblum <>
Cc: erlang-questions <>
Sent: Saturday, October 27, 2012 3:53 AM
Subject: Re: [erlang-questions] Did I do it right?
Since no one reacted yet, I've skimmed through the code very quickly and it looks really good - I wouldn't assume it being written by Erlang novice. The only thing I've spotted, which is rarely done in production grade Erlang systems is use of non-OTP servers by doing manual looping in spawned process (although I can see it does handle all sys messages and stuff). Is there any particular reason to not use gen_server in that case?
On Thursday, October 25, 2012, James Rosenblum wrote:
Kind and Wise List;
> For selfish and professional reasons, I regularly attempt medium-to-deep dives on interesting technologies (Ruby, Go, etc.), and about 12 months ago I started looking at Erlang. I have become a huge fan of the entire Erlang Ecosystem and have tried to be a good student.
>Like many, I taught myself by reading the usual books, going to the usual websites, looking at existing projects, following this list and participating in stackoverflow. And, like many I suspect, I wrote a cache ;)
>What I wrote could solve a problem for my company which builds and deploys an enterprise application which needs to cache domain-objects (assembled from a variety of Oracle or MSSQL tables) and provide them to web clients. We currently use an in-process cache that is part of a fairly typical Java-stack application. Unfortunately it is difficult to cluster, and it doesn't provide us with the level of control and specialization that we would like. A successful cache needs to be available on 2 or 3 nodes for redundancy and to handle load. There are 200 - 400 clients producing about 50 transactions per second bursting to about 200 transactions per second for a few minutes at a time (probably 80% reads). Our software is installed in customer's data centers - no public Internet involvement. What I wrote would seem to fulfill these requirements.
>As a company, based on my enthusiasm, we are considering Erlang, and my cache is going to be looked at as a reference implementation, learning tool and poc.
>What I don't know is: Did I create a piece of crap example of Erlang that does the entire community a disservice; or, did I do a reasonable job of representing what could, and should, be done with the technology?
>If anyone is feeling charitable, and wouldn't mind helping develop a good Erlang Citizen, I would appreciate any comments or suggestions on what I have done.
>It can be found at https://github.com/jr0senblum/JCache
>If this is an inappropriate request, I apologize and please feel free to ignore this all together.
>Thanks in advance,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions