30 ms·
Here's a few things I experienced when building an erlang webapp 4 years ago: During dev, I had a server live for users to play with. The data structures were
by jhancock 17y ago
Here's a few things I experienced when building an erlang webapp 4 years ago:
During dev, I had a server live for users to play with. The data structures were in flux, there was zero traditional data input protection. My users were domain experts, no tech background and would type in all sorts of odd inputs as there was no training or documentation on how to use the webapp. But I never once had data corruption issues and never once did the server crash. I was able to run this "test" server with no admin or headaches while I was doing dev.
The reasons are due to a few characteristics of erlang:
1 - you write concrete pattern matching, not abstract object containers. So a controller or model function would spec out a clear data structure that was expected as input. Anything else failed right at the point where the data didn't fit the patterns and guards.
2 - each request is handled by an isolated erlang process that fails gracefully and doesn't effect the rest of the system. So my early testers would get error dumps from the server for bad data inputs but they never corrupted the data or crashed things. I was able to take these error messages from test users to see how they were using the system incorrectly.
3 - Single assignment and functional programming were a big win in terms of writing once, testing once (not writing separate test code), and knowing that that piece of code was solid and I could move on.
The app was very responsive. All requests were ajax and this system felt like the server was running on the same box as the web browser. When we had errors, the erlang error message almost always showed the crash at exactly the point in the code that needed attention.
These characteristics speak to the power of the dev process, not scalability which is what you normally hear about erlang.
- icey 17y agoWhat do you work with now? If it's not erlang, what prompted you to not use erlang?
- jhancock 17y agoThat's a good question. I've been using merb lately. I started with rails and didn't like it but thought ruby was ok. The main reason for going with ruby was to be able to hire other programmers and get out of the way of coding everything myself. I assumed 3 years ago when I made the decision that I would eventually be able to hire others. This has not worked out as planned. I am still coding everything. It turns out erlang has taken off enough that it may be reasonable to do a new project in erlang. I'm still not a fan of using erlang for writing view templates, but choices for this have improved greatly as well. When viewing the erlang vs. ruby programmer talent pool, there is a gut feel that the erlang pool may have a higher quality ratio although its a much smaller pool. I can tell you that although merb is a nice framework, I still end up digging through code at times to find bugs that would be much easier to spot if it were in erlang.
- icey 17y agoWhen you say that hiring others hasn't worked out as planned, have you had a hard time finding talent or you just haven't been in a place that hiring outside help was a viable option? Sorry for all the questions, I just think it's an interesting insight to what happens if you pick a language / framework that isn't terribly mainstream.
- aditya 17y agoRails is pretty mainstream now, though, isn't it? I think it's tough hiring good Ruby/Rails people because they're all busy. And those that aren't, are probably not good to begin with... (I think the OP mentioned "hasn't worked out as planned" with regards to hiring Rails talent, not erlang)
- icey 17y agoSorry, it was 2 thoughts conveyed poorly. Question 1 was whether he was having a hard time finding rails people or just that he didn't need more people. Then my statement was more directly referring to the Erlang piece of it. One of the things that crosses my mind every time I start leaning towards one of the more exotic languages is whether or not I'll ever be able to find someone to maintain the software later.
- percept 17y agoFWIW, I've read several accounts of companies switching from Rails to PHP because they couldn't find enough developers (or didn't like negotiating with the few available ones). Of course good PHPers are probably busy too.
- dpnewman 17y agoWhy would there be something generalizable about rails programmers, or any language for that matter. Honestly, this whole notion always seems so out there.
- 17y ago
- gtani 17y agoThe language and development tools have exploded the last 4 years, both inside and outside Ericsson and especially after Armstrong's book and work on R12 started. I have a blog post brewing on all the improvements, here's an outline =================== string, regex handlers, faster file I/O: - "re" module replaces "regex" - faster iteration over large binaries, R13A - avoid io:get_line using raw access ----------------------------- metaprogramming/"DSL" - deep exploring parse_transform ---------------------- frameworks, database, middleware - couchdb, nitrogen, mochiweb, erlyweb,and now the boss! - thrift, ejabberd, rabbitMQ, ---------------------------- debug, trace, static code analysis; verify program behavior - dialyzer, tidier (Sagonas and Avgerinos) - mcErlang model checker - quick check application vs. specification ------------------------- data structures - destructive / mutable byte arrays (HiPE BIF) - shared immutable data structure ---------------------- tail recursion - Ericsson expanding as fast as they can (e.g. "andalso", ------------- SMP, run queues, ---------- build systems, distribute your app - rake - faxien, sinan (erlware) ============== Yah, this could be a long post, take a while to draft too. Dunno the state of scala, clojure and haskell /GHC docs these days, but to explore the dark corners of erlang dev, you ahve to do a lot of mailing list and google digging. (and read Cesarini/Thompson book, which is equal to best software books ever, modulo fair number of typo's)
- signa11 17y agowould you mind sharing your blog address ? i tried looking for it in your profile, but couldn't really find any pointers to it. thanks !
- gtani 17y agohttp://isthiserlang.blogspot.com/ http://isthiserlang.blogspot.com/ nothing there yet, I've only been erlanging for a month or 2. But: i have been workiing on a better documentation database, you can email for details if interested: base: genetanigmailcom; insert periods, after positions 4 and 13 and "at" you know where..gene
- jacquesm 17y agoIn less than 20 lines you've just converted me from a fence-sitter to someone that is going to install erlang and mess around with it. Thanks!