We shouldn’t.
I did a presentation about this, and this is one of my nice slides :) about my journey.
I wanted both an actor framework, and a robust web server / framework - and I wanted them to work together seamlessly.
I was working with Rails so considered Elixir/Erlang immediately, but didn’t want to be a fanboy and jump on the next “cool” thing. So, I went around the circle, investigating and trying similar solutions to Erlang’s actor framework in each, but always found something lacking.
Edit: Updated to add some more details about what my results were at each step in this journey.
What were
We shouldn’t.
I did a presentation about this, and this is one of my nice slides :) about my journey.
I wanted both an actor framework, and a robust web server / framework - and I wanted them to work together seamlessly.
I was working with Rails so considered Elixir/Erlang immediately, but didn’t want to be a fanboy and jump on the next “cool” thing. So, I went around the circle, investigating and trying similar solutions to Erlang’s actor framework in each, but always found something lacking.
Edit: Updated to add some more details about what my results were at each step in this journey.
What were some of the shortcomings? Well, for example
- Ruby is on here because that’s where I started :). I like Ruby, but it doesn’t handle massive amounts of connections very well. ActionCable was disappointingly slow, the threading model not really compatible with Rails controllers, etc. That’s why I started my journey - I want an Actor model that can handle lots of connections and be distributable, functional programming, and all that good stuff.
- Celluloid was cool, but missing the protection and maturity of Erlang. Celluloid just wasn’t being used that much. And the use of threads really didn’t give the protection. Suffers the “threads are expensive” problem, and distribution is not transparent. I remember trying to remember all the rules, and the things that could go wrong if I didn’t follow them…
- Sidetrack
- JRuby is great, but not all Ruby libraries work with it
- Go is cool, but it’s not directly distributable and the scheduler is just not for actor frameworks. All the Go code I look at is like 80% error handling. I thought about the Erlang philosophy of “let it crash” and tried to understand it more deeply about this point in time…
- Java/JVM. The frameworks/languages: Spring, Clojure, Scala, Play, Akka, etc. run on top of the JVM. JVM is really evolved and stable, but it’s based on several decision that are hard to get around. Such as the threading and memory models, which make things like tail recursion optimization difficult. Or for example, what can you do when a Java thread dies - it’s hard to get back to a guaranteed system state because threads share memory. You can try to protect things, as many frameworks do, but it’s still JVM underneath.
- Java8 has got closures! I dunno, after trying to use functional stuff in Java8 I came to the conclusion that it was just enough to not want to use it.
- Spring. What can I say. Everything is about wiring this and wiring that. And then people build microservices, and then they have to have circuit breakers, and then Docker, and then Kubernetes. All the services talking REST, or gRPC to each other. I didn’t have a big Devops team to manage this…
- Clojure, I like a lot. But the trouble started when I needed a web framework. There are several options, but it’s a lot of work left to developer.
- Clojure’s libraries (APIs) are great. But have you ever cracked open the parallel map reduce to see the Java code inside of it - a bit scary to say the least.
- Guaranteed tail recursion optimization was missing (this is a Java problem).
- Scala is great but very complex and actually is based a lot on Erlang ideas. Doesn’t give true process safety and I need a web framework too. We had some Scala developers rewrite their message handlers in Elixir and came up with less than half of the line count - and it worked better, handled errors better, and was much more readable.
- So I tried Play. Play’s threading model is strange, mixing both reactive and threaded which can cause surprises. What’s this about Promises, etc.? - I don’t want Javascript…
- Akka is basically Erlang OTP. However, you just can’t get away from the “threads are expensive” and “threads share memory” issues. For example, when a Java thread dies, how can you shut it down 100% safely and ensure it has not corrupted any memory.
At the end of the day, I found myself back using Elixir/Phoenix/Erlang. A true robust, safe, scalable, fault recovering system which most of the other actor models copied anyways.
As far as maturity, Erlang is mature, and continues to get better - it’s much older than Java and has been used in production for a long time: Erlang, OTP and running on the BEAM. I like to use Elixir, it’s newer but has great libraries, and Elixir is essentially Erlang so you won’t find any issues using Erlang libraries directly, for example Cowboy (arguably the best web server ever made), is used directly in Phoenix and each web request is totally isolated from every other request.
In the end, I ended up back at my starting point concluding that Erlang does indeed have the best actor framework, and having given all the others a good try I felt confident with my decision! I have been using it ever since.
- It gives me true process protection (there are not threads, and nothing in the language itself that can share memory).
- Fast message passing.
- Great web frameworks (Cowboy and Phoenix) which can interact seamlessly with HTTP and Websockets, etc.
- TCP, connections, external connections, lots of connections - all good.
- It has distribution built in, with discovery, etc.
- It has an error recovery system built in.
- It is mature with plenty of libraries and supporters.
- It has Elixir, which makes programming easier (in my opinion, but Erlang is a must know for Elixir programmers).
Where do I start?
I’m a huge financial nerd, and have spent an embarrassing amount of time talking to people about their money habits.
Here are the biggest mistakes people are making and how to fix them:
Not having a separate high interest savings account
Having a separate account allows you to see the results of all your hard work and keep your money separate so you're less tempted to spend it.
Plus with rates above 5.00%, the interest you can earn compared to most banks really adds up.
Here is a list of the top savings accounts available today. Deposit $5 before moving on because this is one of th
Where do I start?
I’m a huge financial nerd, and have spent an embarrassing amount of time talking to people about their money habits.
Here are the biggest mistakes people are making and how to fix them:
Not having a separate high interest savings account
Having a separate account allows you to see the results of all your hard work and keep your money separate so you're less tempted to spend it.
Plus with rates above 5.00%, the interest you can earn compared to most banks really adds up.
Here is a list of the top savings accounts available today. Deposit $5 before moving on because this is one of the biggest mistakes and easiest ones to fix.
Overpaying on car insurance
You’ve heard it a million times before, but the average American family still overspends by $417/year on car insurance.
If you’ve been with the same insurer for years, chances are you are one of them.
Pull up Coverage.com, a free site that will compare prices for you, answer the questions on the page, and it will show you how much you could be saving.
That’s it. You’ll likely be saving a bunch of money. Here’s a link to give it a try.
Consistently being in debt
If you’ve got $10K+ in debt (credit cards…medical bills…anything really) you could use a debt relief program and potentially reduce by over 20%.
Here’s how to see if you qualify:
Head over to this Debt Relief comparison website here, then simply answer the questions to see if you qualify.
It’s as simple as that. You’ll likely end up paying less than you owed before and you could be debt free in as little as 2 years.
Missing out on free money to invest
It’s no secret that millionaires love investing, but for the rest of us, it can seem out of reach.
Times have changed. There are a number of investing platforms that will give you a bonus to open an account and get started. All you have to do is open the account and invest at least $25, and you could get up to $1000 in bonus.
Pretty sweet deal right? Here is a link to some of the best options.
Having bad credit
A low credit score can come back to bite you in so many ways in the future.
From that next rental application to getting approved for any type of loan or credit card, if you have a bad history with credit, the good news is you can fix it.
Head over to BankRate.com and answer a few questions to see if you qualify. It only takes a few minutes and could save you from a major upset down the line.
How to get started
Hope this helps! Here are the links to get started:
Have a separate savings account
Stop overpaying for car insurance
Finally get out of debt
Start investing with a free bonus
Fix your credit
Supposing the project is a good fit for Akka:
Because Elixir/Erlang doesn’t have the same library ecosystem than Java.
Because your project has dependencies on other internal projects written in Java and it could reuse some of that infrastructure.
Because finding experience Elixir/Erlang developers is orders of magnitude harder than finding Java developers.
Any of those reasons apply. Now, I understand what you mean: Why do people want explicitly an actor model to build what’s basically a website when there are a lot of appropriate libraries to do that in Java already and if they really really REA
Supposing the project is a good fit for Akka:
Because Elixir/Erlang doesn’t have the same library ecosystem than Java.
Because your project has dependencies on other internal projects written in Java and it could reuse some of that infrastructure.
Because finding experience Elixir/Erlang developers is orders of magnitude harder than finding Java developers.
Any of those reasons apply. Now, I understand what you mean: Why do people want explicitly an actor model to build what’s basically a website when there are a lot of appropriate libraries to do that in Java already and if they really really REALLY need that model they should probably just use Elixir/Erlang anyway?
Well, that’s something that I asked myself a lot. I think that a lot of developers (including myself!) often find exciting features in languages that they don’t use normally and try to export them to their day-a-day stack. You see this with Akka, that’s inspired in Erlang model, or vert.x which is inspired in nodeJS event model or tons of other examples. I think that there are valid cases for that (see first paragraphs). I also think that in most cases the project isn’t a good fit for Akka/Vert.x/whatever-feature-exported-from-one-stack-to-another or at least not more than a more idiomatic solution to your stack, but rather that feature is the hot new thing of the moment, there are tons of blogs saying you should totally ditch PastWeeksProgrammingModel and move to ThisWeekProgrammingModel and people buy that crap more than they should.
TLDR: If you are startup go ahead with Elixir/Erlang. If you already hard on Java, Akka is not a bad option for specific problems.
Unfortunately Elixir/Erlang is not coming to the party in any near future:
If you are making a startup go ahead with Elixir. But if you try to adopt it in enterprise it may be painful.
I was working on an easier problem that was ”Akka+Scala” system for a company that has 90% of its stuff written in “Java EE”. It is just a new programming language that is Scala for the same ecosystem. It is kind of cross-compile to Java and you can run it within the same JVM on the sam
TLDR: If you are startup go ahead with Elixir/Erlang. If you already hard on Java, Akka is not a bad option for specific problems.
Unfortunately Elixir/Erlang is not coming to the party in any near future:
If you are making a startup go ahead with Elixir. But if you try to adopt it in enterprise it may be painful.
I was working on an easier problem that was ”Akka+Scala” system for a company that has 90% of its stuff written in “Java EE”. It is just a new programming language that is Scala for the same ecosystem. It is kind of cross-compile to Java and you can run it within the same JVM on the same physical machine setup. But project was about to abandon in some time since the problem was not isolated and company started to rewrite more and more code in Scala maintaining old Java stuff in parallel. It results in a great waste of developers time.
Any new technology in a big ecosystem is very questionable.
Akka was in use well before Elixir was popular. Erlang is a tough sell in the enterprise. The Java ecosystem is firmly entrenched.
Since a lot of the world runs in the Java ecosystem, a switch to BEAM isn't practical. As a layer into existing systems, absolutely, but it's not always a good ROI. It's not just questions if technology that drive decisions.
The best way to find the right freelancer for digital marketing is on Fiverr. The platform has an entire category of professional freelancers who provide full web creation, Shopify marketing, Dropshipping, and any other digital marketing-related services you may need. Fiverr freelancers can also do customization, BigCommerce, and Magento 2. Any digital marketing help you need just go to Fiverr.com and find what you’re looking for.
The biggest project I used Akka for, in a production system, was the election reporting and analysis system at NBC. It was surprisingly capable on minimal hardware. The key was in its ease of decoupling potentially blocking processes as their own actors. I'm mainly going to talk about the architecture, and hopefully it'll tell you what the experience was like.
The web application processed HTTP requests from the client via Servlet 3.0. The "AsyncContext" was retrieved from the request object, which lets you hold the connection to the client (until you call its "complete" method). Pass that
The biggest project I used Akka for, in a production system, was the election reporting and analysis system at NBC. It was surprisingly capable on minimal hardware. The key was in its ease of decoupling potentially blocking processes as their own actors. I'm mainly going to talk about the architecture, and hopefully it'll tell you what the experience was like.
The web application processed HTTP requests from the client via Servlet 3.0. The "AsyncContext" was retrieved from the request object, which lets you hold the connection to the client (until you call its "complete" method). Pass that off to a temporary RequestHandler actor.
The RequestHandler's job is to store this one AsyncContext and fulfill the request. It queries one or more "service actors". The RequestHandler is free to block until it gets a response. It's just devoted to that one client request, so nothing else will try to use it.
A service actor has no knowledge of the web application server, database, or other I/O processes. A nifty thing is you can load this actor up quickly and independently, via perhaps a Scala REPL, and test its functionality (number crunching perhaps) without needing external inputs and outputs.
We also had an actor to handle database I/O, and also separate actors for each of the external feeds we were reading from (data being provided from other companies).
We had one service actor maintaining in-memory state (persisting it asynchronously via the database actor). The key was to always have it respond with an immutable object, which is totally safe to pass between Akka actors. When a change is written, the new state would be a copy of the previous immutable state, but with that one change made. Behind the scenes, this is extremely efficient. When you're passing around data, you're not passing around actual copies of the data. You're passing pointers to specific versions of the data. Client requests might regularly ping the service actor for the latest state, and the service actor is able to respond lightning fast with a pointer.
You could have one actor "subscribe" to updates of this state, or subscribe to changes of a subset of the state. (The exit poll service actor may have only been interested in updates to the exit poll data.) There's no issue with providing a pointer to a subset of a immutable object.
Also, I didn't mention this running on multiple servers. This runs on one server, which allows it to benefit from the speed of immutable object transfer, and it overall simplifies the architecture. Akka makes remote communication fairly easily, but it was unnecessary.
The previous system they had required ... I think it was 20+ servers (including redundant systems). This Akka-based system was capable of running with one server, with a couple others for backups. When one system goes down, it's very easy to let it fail. All communication runs on sequence numbers, (i.e. Give me all the updates since change #15), so if there is a glitch, everything can get back up to date in an orderly fashion.
Building a performant production Akka system was very simple as compared to more complex options I've endured in the past. There's some additional trickiness with actors in terms of how you log exceptions, and how you initialize them with "initialize objects", which you have to learn, but... in general, I found Akka in production... very nice.
I didn't stick around long enough to get detailed metrics, but my coworker reported that the system has been handling just fine. During the last major election in November, it was "properly fault tolerant", and all the election calls were processed smoothly. Mission accomplished.
The concurrency model for Erlang and Java are very different.
Erlang is essentially the “Actor” model of computation - everything is a process, processes communicate via message passing, there is no shared state - hence no shared memory, no locks, etc.
As a result, the Erlang VM is designed with concurrency at its core. For the JVM, concurrency is essentially an afterthought.
Here’s the thing: I wish I had known these money secrets sooner. They’ve helped so many people save hundreds, secure their family’s future, and grow their bank accounts—myself included.
And honestly? Putting them to use was way easier than I expected. I bet you can knock out at least three or four of these right now—yes, even from your phone.
Don’t wait like I did. Go ahead and start using these money secrets today!
1. Cancel Your Car Insurance
You might not even realize it, but your car insurance company is probably overcharging you. In fact, they’re kind of counting on you not noticing. Luckily,
Here’s the thing: I wish I had known these money secrets sooner. They’ve helped so many people save hundreds, secure their family’s future, and grow their bank accounts—myself included.
And honestly? Putting them to use was way easier than I expected. I bet you can knock out at least three or four of these right now—yes, even from your phone.
Don’t wait like I did. Go ahead and start using these money secrets today!
1. Cancel Your Car Insurance
You might not even realize it, but your car insurance company is probably overcharging you. In fact, they’re kind of counting on you not noticing. Luckily, this problem is easy to fix.
Don’t waste your time browsing insurance sites for a better deal. A company called Insurify shows you all your options at once — people who do this save up to $996 per year.
If you tell them a bit about yourself and your vehicle, they’ll send you personalized quotes so you can compare them and find the best one for you.
Tired of overpaying for car insurance? It takes just five minutes to compare your options with Insurify and see how much you could save on car insurance.
2. Ask This Company to Get a Big Chunk of Your Debt Forgiven
A company called National Debt Relief could convince your lenders to simply get rid of a big chunk of what you owe. No bankruptcy, no loans — you don’t even need to have good credit.
If you owe at least $10,000 in unsecured debt (credit card debt, personal loans, medical bills, etc.), National Debt Relief’s experts will build you a monthly payment plan. As your payments add up, they negotiate with your creditors to reduce the amount you owe. You then pay off the rest in a lump sum.
On average, you could become debt-free within 24 to 48 months. It takes less than a minute to sign up and see how much debt you could get rid of.
3. You Can Become a Real Estate Investor for as Little as $10
Take a look at some of the world’s wealthiest people. What do they have in common? Many invest in large private real estate deals. And here’s the thing: There’s no reason you can’t, too — for as little as $10.
An investment called the Fundrise Flagship Fund lets you get started in the world of real estate by giving you access to a low-cost, diversified portfolio of private real estate. The best part? You don’t have to be the landlord. The Flagship Fund does all the heavy lifting.
With an initial investment as low as $10, your money will be invested in the Fund, which already owns more than $1 billion worth of real estate around the country, from apartment complexes to the thriving housing rental market to larger last-mile e-commerce logistics centers.
Want to invest more? Many investors choose to invest $1,000 or more. This is a Fund that can fit any type of investor’s needs. Once invested, you can track your performance from your phone and watch as properties are acquired, improved, and operated. As properties generate cash flow, you could earn money through quarterly dividend payments. And over time, you could earn money off the potential appreciation of the properties.
So if you want to get started in the world of real-estate investing, it takes just a few minutes to sign up and create an account with the Fundrise Flagship Fund.
This is a paid advertisement. Carefully consider the investment objectives, risks, charges and expenses of the Fundrise Real Estate Fund before investing. This and other information can be found in the Fund’s prospectus. Read them carefully before investing.
4. Earn Up to $50 this Month By Answering Survey Questions About the News — It’s Anonymous
The news is a heated subject these days. It’s hard not to have an opinion on it.
Good news: A website called YouGov will pay you up to $50 or more this month just to answer survey questions about politics, the economy, and other hot news topics.
Plus, it’s totally anonymous, so no one will judge you for that hot take.
When you take a quick survey (some are less than three minutes), you’ll earn points you can exchange for up to $50 in cash or gift cards to places like Walmart and Amazon. Plus, Penny Hoarder readers will get an extra 500 points for registering and another 1,000 points after completing their first survey.
It takes just a few minutes to sign up and take your first survey, and you’ll receive your points immediately.
5. Get Up to $300 Just for Setting Up Direct Deposit With This Account
If you bank at a traditional brick-and-mortar bank, your money probably isn’t growing much (c’mon, 0.40% is basically nothing).
But there’s good news: With SoFi Checking and Savings (member FDIC), you stand to gain up to a hefty 3.80% APY on savings when you set up a direct deposit or have $5,000 or more in Qualifying Deposits and 0.50% APY on checking balances — savings APY is 10 times more than the national average.
Right now, a direct deposit of at least $1K not only sets you up for higher returns but also brings you closer to earning up to a $300 welcome bonus (terms apply).
You can easily deposit checks via your phone’s camera, transfer funds, and get customer service via chat or phone call. There are no account fees, no monthly fees and no overdraft fees. And your money is FDIC insured (up to $3M of additional FDIC insurance through the SoFi Insured Deposit Program).
It’s quick and easy to open an account with SoFi Checking and Savings (member FDIC) and watch your money grow faster than ever.
Read Disclaimer
5. Stop Paying Your Credit Card Company
If you have credit card debt, you know. The anxiety, the interest rates, the fear you’re never going to escape… but a website called AmONE wants to help.
If you owe your credit card companies $100,000 or less, AmONE will match you with a low-interest loan you can use to pay off every single one of your balances.
The benefit? You’ll be left with one bill to pay each month. And because personal loans have lower interest rates (AmONE rates start at 6.40% APR), you’ll get out of debt that much faster.
It takes less than a minute and just 10 questions to see what loans you qualify for.
6. Lock In Affordable Term Life Insurance in Minutes.
Let’s be honest—life insurance probably isn’t on your list of fun things to research. But locking in a policy now could mean huge peace of mind for your family down the road. And getting covered is actually a lot easier than you might think.
With Best Money’s term life insurance marketplace, you can compare top-rated policies in minutes and find coverage that works for you. No long phone calls. No confusing paperwork. Just straightforward quotes, starting at just $7 a month, from trusted providers so you can make an informed decision.
The best part? You’re in control. Answer a few quick questions, see your options, get coverage up to $3 million, and choose the coverage that fits your life and budget—on your terms.
You already protect your car, your home, even your phone. Why not make sure your family’s financial future is covered, too? Compare term life insurance rates with Best Money today and find a policy that fits.
Is Elixir (elixir-lang.org) production ready? What would you say are the distinct positives of using Elixir over Erlang? Why would/wouldn't you go for it?
Is Elixir the programming language that Jose Valim was working on ready for production usage? Is anyone already using it? I've been extremely curious about it and I'd like to know of developer experiences with it and how its compares to erlang. What would you say are the distinct positives of using Elixir over Erlang and why you wouldn't go for it.
First of: Yes Elixir is production ready for a while now. I use it already at a second company (
Is Elixir (elixir-lang.org) production ready? What would you say are the distinct positives of using Elixir over Erlang? Why would/wouldn't you go for it?
Is Elixir the programming language that Jose Valim was working on ready for production usage? Is anyone already using it? I've been extremely curious about it and I'd like to know of developer experiences with it and how its compares to erlang. What would you say are the distinct positives of using Elixir over Erlang and why you wouldn't go for it.
First of: Yes Elixir is production ready for a while now. I use it already at a second company (to be honest: I introduced it in both).
I started with Erlang in 2013 while looking for an alternative for Ruby. Ruby lacked so much and Erlang seemed to offer solutions to many of my problems. But the syntax was not very nice. This was something which I found much better at Ruby. Then I attended a workshop by Chris McCord during the RailsConv 2014 and I fell in love with Elixir. Elixir is a bit more pragmatic than Erlang since it comes with simpler patterns e.g. for GenServers. And the code is much better to read from my perspective.
Regarding performance there is no difference. Both compiles to the same byte code. So there is no loss. Up to now I used it for several projects and many are currently running in production like:
- A data client fetching information about call center’s telephone lines
- An application serving structured data about customer devices. It is able to sync automatically to some other micro services to ensure no manual seeding of data is ever required.
- An application which does some database alignment tasks between two backend services. It was more or less a quick fix. The initial script was written in Python, but was not very reliable. It often crashed. Since it is now done by this Elixir app the supervisors ensure it stays up and running. There were no issues any more after the exchange.
- An application restructuring customer data. Initially it was just a small mix project too fix the structure of some customer data. But since we needed to do this task for more and more customers it became a serious part of my current tool belt when dealing with customer problems.
Further Elixir applications (mainly RESTful backends) are already planned. The stack of our company includes along with Elixir, Python and Scala (plus some Java legathy). If you monitor the load of all the applications you will see that the Java app consumes 10 times more RAM compared to the Elixir app while the Scala apps consume about 5 times as much. All applications currently have a similar amount of requests to handle, but regarding infrastructure Elixir is so far the most lightweight solution here.
Erlang VM was developed with concurrent systems in mind. Node joining and process separation was the main reason of all the decision making while developing the BEAM machine.
JVM was always supposed to be universal and because of that some of its already settled standards are limitations to making concurrent systems as good as they could be done.
One of the main decisions is for instance garbage collection system - Java pauses all threads to clean the memory, which makes availability substantially worse. The processes can share memory, and because of that the GC has to be universal for all of th
Erlang VM was developed with concurrent systems in mind. Node joining and process separation was the main reason of all the decision making while developing the BEAM machine.
JVM was always supposed to be universal and because of that some of its already settled standards are limitations to making concurrent systems as good as they could be done.
One of the main decisions is for instance garbage collection system - Java pauses all threads to clean the memory, which makes availability substantially worse. The processes can share memory, and because of that the GC has to be universal for all of them. Erlang VM does garbage collection on per process basis. Which means the process gets cleared after its death, and it’s totally independent from other processes which means no availability tradeoffs.
There’s a lot of decisions like that which cannot be changed because of inherent VM infrastructure.
And although there are frameworks for JVM that try to mimic some existing concurrency systems (f.i Akka) they’re still hacks and workarounds to make JVM be something it isn’t. And though they grew to be mature and war-tested frameworks they still have to carry the weight of JVM’s legacy
Communicating fluently in English is a gradual process, one that takes a lot of practice and time to hone. In the meantime, the learning process can feel daunting: You want to get your meaning across correctly and smoothly, but putting your ideas into writing comes with the pressure of their feeling more permanent. This is why consistent, tailored suggestions are most helpful for improving your English writing abilities. Seeing specific writing suggestions based on common grammatical mistakes multilingual speakers make in English is key to improving your communication and English writing fluen
Communicating fluently in English is a gradual process, one that takes a lot of practice and time to hone. In the meantime, the learning process can feel daunting: You want to get your meaning across correctly and smoothly, but putting your ideas into writing comes with the pressure of their feeling more permanent. This is why consistent, tailored suggestions are most helpful for improving your English writing abilities. Seeing specific writing suggestions based on common grammatical mistakes multilingual speakers make in English is key to improving your communication and English writing fluency.
Regular feedback is powerful because writing in a language that isn’t the first one you learned poses extra challenges. It can feel extra frustrating when your ideas don’t come across as naturally as in your primary language. It’s also tough to put your writing out there when you’re not quite sure if your grammar and wording are correct. For those communicating in English in a professional setting, your ability to write effectively can make all the difference between collaboration and isolation, career progress and stagnation.
Grammarly Pro helps multilingual speakers sound their best in English with tailored suggestions to improve grammar and idiomatic phrasing. Especially when you’re writing for work, where time often is in short supply, you want your communication to be effortless. In addition to offering general fluency assistance, Grammarly Pro now includes tailored suggestions for writing issues common among Spanish, Hindi, Mandarin, French, and German speakers, with more languages on the way.
Features for all multilingual speakers
Grammarly’s writing suggestions will catch the most common grammatical errors that multilingual speakers make in English. For example, if you drop an article or misuse a preposition (such as “on” instead of “in”), our sidebar will flag those mistakes within the Fix spelling and grammar category with the label Common issue for multilingual speakers. Most importantly, it will provide suggestions for fixing them. While these errors seem small, one right after another can make sentences awkward and more difficult to absorb. Eliminating them all in one fell swoop is a powerful way to put a more fluent spin on your document.
Features for speakers of specific languages
With Grammarly Pro, speakers of French, German, Hindi, Mandarin, and Spanish can get suggestions specifically tailored to their primary language, unlocking a whole other level of preciseness in written English. For speakers of those languages, our sidebar will flag “false friends,” or cognates, which are words or phrases that have a similar form or sound in one’s primary language but don’t have the same meaning in English.
But now Grammarly Pro’s writing suggestions will catch these types of errors for you and provide suggestions on how to fix them. You can find these suggestions in the Sound more fluent category in our floating sidebar. Simply click on the suggestion highlighted in green, and voila, your English will be more polished and accurate.
PS: Tailored suggestions for other language backgrounds are on the way!
They aren't better isolated. They are isolated.
Erlang processes are memory isolated. They are not capable of effecting the memory of other processes. This provides safety from unintended effects but also limits the ability to use some concurrency models. Erlang users the actor model but can't have several threads acting upon a single object transactionally with software transactional memory, for example.
Isolation is a very interesting model and provides a lot of security and potential for performance enhancements but also makes several options impossible. So it's not better.
Also Haskell threa
They aren't better isolated. They are isolated.
Erlang processes are memory isolated. They are not capable of effecting the memory of other processes. This provides safety from unintended effects but also limits the ability to use some concurrency models. Erlang users the actor model but can't have several threads acting upon a single object transactionally with software transactional memory, for example.
Isolation is a very interesting model and provides a lot of security and potential for performance enhancements but also makes several options impossible. So it's not better.
Also Haskell threads are not isolated worse. They are not isolated at all. They aren't trying to be. They are making use of STM and MVars for concurrency which share memory and are great for their own reasons just like Erlangs model.
Green threads are an orthogonal concept. It means implement threads in a light weight way in the runtime rather that using heavy weight operating system threads. This means you can start up hundreds of threads without using up tons of resources. Both Haskell and Erlang have green threads.
One of the contributors here (core, genx, expm, other libs).
We have been using Elixir since around end of the spring 2012 and so far our run is pretty decent — bugs get fixed quickly enough, detailes are ironed out as we go (José is very communicable) and we couldn't be happier.
After all, after you compile Elixir, it's an Erlang's AST that gets down to erlang's compiler and we're still running on the same BEAM emulator.
I find one of the most important strengths of Elixir to be macros. They allow for creating DSLs, avoiding code repetition and more unexpected things (checkout how we implemented
One of the contributors here (core, genx, expm, other libs).
We have been using Elixir since around end of the spring 2012 and so far our run is pretty decent — bugs get fixed quickly enough, detailes are ironed out as we go (José is very communicable) and we couldn't be happier.
After all, after you compile Elixir, it's an Erlang's AST that gets down to erlang's compiler and we're still running on the same BEAM emulator.
I find one of the most important strengths of Elixir to be macros. They allow for creating DSLs, avoiding code repetition and more unexpected things (checkout how we implemented String.Unicode or type specifications!)
Feel free to come over to #elixir-lang IRC channel (FreeNode). Will be happy to chat about Elixir!
It isn't. Erlang is better at concurrency and parallelism partly because it isn't a threaded model. Java only really supports threads natively. Erlang supports processes that may run on top of threads, separate system processes or even separate machines. That is just the beginning of the differences though.
Erlang processes don't share memory or state. Each one is independent and communicates by passing messages. This model of concurrency comes from Communicating Sequential Processes (CSP) which is a formal system for safely handling concurrency. While Erlang doesn't strictly follow CSP, it is
It isn't. Erlang is better at concurrency and parallelism partly because it isn't a threaded model. Java only really supports threads natively. Erlang supports processes that may run on top of threads, separate system processes or even separate machines. That is just the beginning of the differences though.
Erlang processes don't share memory or state. Each one is independent and communicates by passing messages. This model of concurrency comes from Communicating Sequential Processes (CSP) which is a formal system for safely handling concurrency. While Erlang doesn't strictly follow CSP, it is close enough to make well designed Erlang programs safely concurrent on large jobs.
Java threading on the other hand provides a lawless wasteland inside a single process memory space. Threads can stomp all over each other and the programmer has to use clear design to prevent it. The Java programmer can do the same thing Erlang does (there is a version of Erlang on the JVM), but they don't have to and the results can be a steaming pile of wrecked code. Sure you can do anything you want, but in the same sense as this picture.
Tõnis Pool at University of Tartu published an in-depth comparison, available here: http://ds.cs.ut.ee/courses/course-files/To303nis%20Pool%20.pdf. It’s not very long, so give it a read.
In short, they are quite different. Erlang’s VM is designed for the Actor model, where ligth-weight, independent processes communicate through messages. They don’t have shared memory, so sending a message means copying the data. All data is immutable. This means that the BEAM is very good at what it does, but less flexible than the JVM.
The JVM is less opinionated about what you do with it, so it can support man
Tõnis Pool at University of Tartu published an in-depth comparison, available here: http://ds.cs.ut.ee/courses/course-files/To303nis%20Pool%20.pdf. It’s not very long, so give it a read.
In short, they are quite different. Erlang’s VM is designed for the Actor model, where ligth-weight, independent processes communicate through messages. They don’t have shared memory, so sending a message means copying the data. All data is immutable. This means that the BEAM is very good at what it does, but less flexible than the JVM.
The JVM is less opinionated about what you do with it, so it can support many different approaches to concurrency, programming paradigms etc. There’s even a very successful implementation of the Actor model on the JVM called Akka. If your problem at hand doesn’t fall nicely into Erlang’s actor model, then the JVM is likely a good choice.
But if the actor model fits your problem, then the BEAM will be hard to beat. It let you easily spawn millions of processes on a single machine, and OTP (Erlang’s framework for building distributed, fault-tolerant systems) will help you create a distributed application that can be updated while the system is running. Few other language runtimes will let you do that.
Well, the obvious ones would be the following:
- A lot more people to ask for help if you run into problems
- Fewer bugs (in the language) since Erlang is very mature
- Generally more written about the language on the web
- Simpler (in my opinion) abstractions, with fewer ways to shoot yourself in the foot (with the drawback that it’s slightly less expressive)
Edited to add:
- The Erlang community, simply by virtue of being around for a long time, has a lot of very experienced people who have worked a long time in the industry with a good idea of what works and doesn’t (and why) - they’ve seen a lot of fads p
Well, the obvious ones would be the following:
- A lot more people to ask for help if you run into problems
- Fewer bugs (in the language) since Erlang is very mature
- Generally more written about the language on the web
- Simpler (in my opinion) abstractions, with fewer ways to shoot yourself in the foot (with the drawback that it’s slightly less expressive)
Edited to add:
- The Erlang community, simply by virtue of being around for a long time, has a lot of very experienced people who have worked a long time in the industry with a good idea of what works and doesn’t (and why) - they’ve seen a lot of fads play out over time (not to say that Elixir is a fad - it’s probably great - even Armstrong says so =P)
At CommerceHub, we have integrated Akka with about a half dozen of our components. We have two component classes connected via Remoting in production (something like 400 installs of the "client" component and 20 of the "server" component) and have experimented with Clustering in a new component.
The primary benefit we get out of Actors is a clean pattern for building pipelined processes without having to worry about threading at design time. It's also helpful for specific concurrency problems that Java makes very difficult to solve. For example, we'll use Actors to replace lock-heavy systems by
At CommerceHub, we have integrated Akka with about a half dozen of our components. We have two component classes connected via Remoting in production (something like 400 installs of the "client" component and 20 of the "server" component) and have experimented with Clustering in a new component.
The primary benefit we get out of Actors is a clean pattern for building pipelined processes without having to worry about threading at design time. It's also helpful for specific concurrency problems that Java makes very difficult to solve. For example, we'll use Actors to replace lock-heavy systems by creating an actor that represents all the locked behaviors and have actors representing each use case message the lock actor. The lock actor we'll pin to a single thread and the actors we'll distribute as necessary to meet load. Using a priority mailbox allows us to control which use case "wins" in a race condition, something difficult when synchronizing threads.
And that's the secondary benefit we get out of Actors (and really out of Akka itself): you can program the performance characteristics of your currency code separately from the code itself. Tuning the size and behavior of actor pools and their mailboxes is very straightforward and shaves time off the optimization phase of development.
In our experience, the ease of tuning spread to Remoted systems as well, with us able to spin up specific actor "servers" independently and on-demand (more on this later). Moving functions in a pipeline from one component to another was reasonably seamless, too. And when we outgrew Java serialization, adapting our remoted systems to interchange via JSON instead was similarly straightforward.
The downside to Actors is that they can be difficult to reason with. As an example, we found difficulty when testing both business code and actor orchestration ("conversations") at the same time. This lead us to adopt a pattern where we use Actors to deal with messaging concerns and keep the business code in POJO "services" which Actors call. We also maintain "conversation" diagrams for each component to help assert the correctness of orchestration tests...making sure that hand-off operations that include a Remote client properly handle message loss, for example.
And you WILL have message loss, or at least what looks like it. Network quality notwithstanding: during Actor startup or shutdown it's pretty much guaranteed that even if messages are delivered they won't be handled.
Always integration test with a dead node and a node that accepts but doesn't respond in the cluster/pool. This will force devs to consider the very real problem of dead / zombie systems up front. Similarly, dead Letters should be considered a big deal during development, as these can indicate problems with the actor lifecycle.
For remote systems, securing and load balancing actor systems can be a challenge for engineers used to firewalls and load balancers fixing everything. Addressability of individual actor systems is essential for the bidirectional comms required for remoting to work, so you can't just have a big "actorpool.my.co;" if you want to have two or more Actor systems on the same IP, you'll also need to care about their port. For service discovery, we use DNS SRV records and client side load balancing with Remoting systems. Our clustered system uses the same technique to identify the "seed nodes." (BTW I've been meaning to open source the "SRV Routing Actor" we built to make this process seamless to client code. If you've got the same problem, bug me and I'll get on it).
Logging and auditing can be annoying at times, especially when porting a legacy system whose logs feed downstream processes. A common logging pattern is to build a collection of context (such as an MDC) as a side effect of processing, and many loggers expect that this is an okay thing to put into a ThreadLocal. This obviously doesn't jibe with the desire for side-effect free programming and the evasion of thread affinity that's implied by an actor system. We got around it by moving the MDC as part of message content wherever contextual logging is important (and at least one of our components uses an actor whose job it is to do logging on behalf of other actors, who communicate with it via tells). Somebody with more time than me could probably solve this in a less clunky fashion and indeed I've seen "plugins" that improve the situation (though they introduce the problem of, well, depending on the plugin).
Akka (and Scala) moves fast. My components are rarely in lock-step with each other w/r/t their versions of the framework and while things commonly work great in this configuration we've had some "heisenbugs" that have cleared up with an upgrade.
My engineers have found Kamon to be an indispensable tool for visualizing Actor systems at runtime.
I've used lots of different concurrency libraries, application servers and job scheduling frameworks. Akka is an excellent balance: not hard to write against nor hard to control. It can seem needlessly verbose at first, but then you remember how important it is to bound everything in systems programming and Akka's verbosity is often there to force those boundaries. My devs used to reach for ThreadExecutors first when building utilities. Now they reach for Akka.
This is from someone who has just played with the language, not a professional developer, so have a boulder of salt with it.
That said, they are the same language. If they were cars, Erlang is the totally stripped down, no frills, any color as long as it's black model and Elixir has all the fancy bells and whistles, like a great sound system, climate control, GPS system, and so on.
The mechanics are the same, same engine, transmission, suspension and so on, but the creature comforts of Elixir are much nicer.
It's not like the translation from C to C++, where the differences are significant in how
This is from someone who has just played with the language, not a professional developer, so have a boulder of salt with it.
That said, they are the same language. If they were cars, Erlang is the totally stripped down, no frills, any color as long as it's black model and Elixir has all the fancy bells and whistles, like a great sound system, climate control, GPS system, and so on.
The mechanics are the same, same engine, transmission, suspension and so on, but the creature comforts of Elixir are much nicer.
It's not like the translation from C to C++, where the differences are significant in how they work. Both Erlang and Elixir run on BEAM, use OTP, and Elixir can literally call anything from Erlang directly. It just has some extra fancy doodads.
And they are nice ones. The pipe system is lovely and it's definitely easier to read, being more verbose and fewer symbols, but at the end, they work the same way, with the same weird quirks inherited from their common ancestor as a pure telecommunications systems control language.
I designed Bamboo which is a big data analytics engine; which uses the Typesafe stack heavily. This work is an end-to-end solution for Hewlett Packard and delivered in several ways to customers (as a native package using something like `dpkg ...`, virtual images deployed by docker) . We are a big fan of Akka, Scala and Play. So, how do we use it?
We have a distributed Akka cluster that caches the result of large-scale queries and we introduced several techniques as described in Amazon's DynamoDB paper and benchmarking this piece of work using TCP-H and so far, its been more than satisfactory th
I designed Bamboo which is a big data analytics engine; which uses the Typesafe stack heavily. This work is an end-to-end solution for Hewlett Packard and delivered in several ways to customers (as a native package using something like `dpkg ...`, virtual images deployed by docker) . We are a big fan of Akka, Scala and Play. So, how do we use it?
We have a distributed Akka cluster that caches the result of large-scale queries and we introduced several techniques as described in Amazon's DynamoDB paper and benchmarking this piece of work using TCP-H and so far, its been more than satisfactory though we had "secret sauces" embedded into that implementation and largely drawn from the excellent work of Gil Tene and Martin Thompson.
We have another Akka cluster that handles the recording of user's actions in the platform and is able to replay the trail of the user at any point in time; this cluster hosts a number of actors using the Akka persistence.
There's another Akka cluster that was designed to handle stringing jobs of different types together into a workflow and managing the lifecycle of the workflows and we've crafted the dynamic deployment of actors to different execution environments. Each stage of executing the workflow requires input and output where the next stage would consume the output from the previous. Actors are used to process the input and output and stream them, if necessary.
That's about all i can say, really. I'm a big fan of the Typesafe stack and of Scala really and i wanted to put it out to the folks that Scala and Akka really allowed my team to put their imagination to the test, literally.
Erlang is better than pretty much anything else, for multiprocessing, and particularly for massive multiprocessing. By design, and by constraint (shared nothing message passing).
Though.. multithreading is a very specific approach to multiprocessing. If you’re really talking multithreading - that’s a separate issue that depends very heavily on implementation details of the respective virtual machines.
The Erlang community has been around for a long time. I hear from many that they love the language. For someone passionate about Erlang, there is not really any benefit to switching to Elixir. If there was a feature in Elixir you needed (like macros), you could write a small module in Elixir and us it in your Erlang code.
Programming language choice is a very subjective. People choose languages and frameworks out of personal taste. Some people love the Erlang syntax. Other prefer Elixir. For those coming from a ruby background, the Elixir syntax may feel Elixir is a lot less foreign than Erlang
The Erlang community has been around for a long time. I hear from many that they love the language. For someone passionate about Erlang, there is not really any benefit to switching to Elixir. If there was a feature in Elixir you needed (like macros), you could write a small module in Elixir and us it in your Erlang code.
Programming language choice is a very subjective. People choose languages and frameworks out of personal taste. Some people love the Erlang syntax. Other prefer Elixir. For those coming from a ruby background, the Elixir syntax may feel Elixir is a lot less foreign than Erlang.
For me, I just found there was too much punctuation in Erlang. I was forever missing a comma, semi-colon, or a period. I occasionally forget the `do` in Elixir, but not very often.
With all that said, I do find myself wondering why someone new to the Erlang VM would go Erlang over Elixir, but hey, to each his own.
Most people that believe one language is better than another do so for personal preference. Their personal preferences are influenced by the languages they have become familiar with, as well as the areas they work in, or would prefer to work in.
Elixir is much more comfortable to me that Erlang with my Ruby and Prolog background, because it seems to be less of a learning curve and “reads” better to me that Erlang.
Elixir also adds some missing functionality to Erlang, which apart from a friendlier syntax as some of the reasons Jose the creator gave. For more info read Why did José Valim create E
Most people that believe one language is better than another do so for personal preference. Their personal preferences are influenced by the languages they have become familiar with, as well as the areas they work in, or would prefer to work in.
Elixir is much more comfortable to me that Erlang with my Ruby and Prolog background, because it seems to be less of a learning curve and “reads” better to me that Erlang.
Elixir also adds some missing functionality to Erlang, which apart from a friendlier syntax as some of the reasons Jose the creator gave. For more info read Why did José Valim create Elixir? - Adolfo Neto - Medium
Eric des Courtis's answer to How would you choose between Elixir and Erlang? gave some useful pros and cons for both languages, with Erlang being the winner (currently) for him.
How meta. Question about one of my answers. Did I just level up in this game?
Ok, I’ll pile on here. Elixir (Erlang) will use as many cores as it can get it’s hands on. It will cross machines, rooms, countries and continents to do so. You can call those a lot of things, to include threads, but they are somewhat different than what a C++ or Java programmer would call a thread. So in essence, Erlang is far from single threaded.
What I was saying there is that the performance of any single thread is low. Pitifully low compared to many other languages out there. If I’m computing something that is no
How meta. Question about one of my answers. Did I just level up in this game?
Ok, I’ll pile on here. Elixir (Erlang) will use as many cores as it can get it’s hands on. It will cross machines, rooms, countries and continents to do so. You can call those a lot of things, to include threads, but they are somewhat different than what a C++ or Java programmer would call a thread. So in essence, Erlang is far from single threaded.
What I was saying there is that the performance of any single thread is low. Pitifully low compared to many other languages out there. If I’m computing something that is not parallelizable, like computing the millionth digit of the Fibonacci sequence it will take longer in Erlang than it will in many other languages.
That said, most programs are not doing long computational tasks where this is a problem. Very often code is waiting for an external resource or signal. In those cases Erlang is just as fast as every other language. In some cases it will be faster as it can handle those waits efficiently with it’s concurrency model (which acts like threads).
Super open-ended question, but I'll bite.
Erlang, or more specifically the Open Telecom Platform (OTP) portion of Erlang, was designed specifically for long-lived, concurrent applications. While the original use case was for telephone switches, Erlang/OTP can run on most hardware these days.
One of the best features of a concurrent, long-living platform that Erlang/OTP offers is the ability to hot-swap code modules without restarting the application. This allows your code to evolve naturally with theoretically 0 downtime whatsoever, pretty awesome.
Also, since Erlang was designed itself as ha
Super open-ended question, but I'll bite.
Erlang, or more specifically the Open Telecom Platform (OTP) portion of Erlang, was designed specifically for long-lived, concurrent applications. While the original use case was for telephone switches, Erlang/OTP can run on most hardware these days.
One of the best features of a concurrent, long-living platform that Erlang/OTP offers is the ability to hot-swap code modules without restarting the application. This allows your code to evolve naturally with theoretically 0 downtime whatsoever, pretty awesome.
Also, since Erlang was designed itself as having referential transparency/immutable variables and communication via message-passing, it makes Erlang extremely well-suited for concurrent systems. It was essentially built to do exceptionally well at concurrent problems.
To be fair, I've only dabbled in Scala, but it's my understanding that the Scala ecosystem is attempting to build in some of the same patterns that Erlang has, specifically around Akka and decoupled message-passing.
Hope that helps! Really need more info into the details of your app to really help though.
I can only write my own experience with it. I did not give it up completely as yet (still have class of problems I believe I could solve by using it). So far I only managed to form some kind of opinion.
After trying it out and spent some time on it, I realized the potential, but it is still not clicking with me on how to do even some basic processing things.
I find that critical things are not explained anywhere in documentation and that concept is at some areas a bit constrained. It needs more explanation especially more explanation for people who come from OO and procedural worlds.
Yes, it is e
I can only write my own experience with it. I did not give it up completely as yet (still have class of problems I believe I could solve by using it). So far I only managed to form some kind of opinion.
After trying it out and spent some time on it, I realized the potential, but it is still not clicking with me on how to do even some basic processing things.
I find that critical things are not explained anywhere in documentation and that concept is at some areas a bit constrained. It needs more explanation especially more explanation for people who come from OO and procedural worlds.
Yes, it is easy to get basic concepts, and write some more advanced suitable mickey mouses, but translation from real problems to functional thinking is not there. (first shock comes when finding out that there is no ‘loops’ and that ‘if’ is discouraged but you first read a more than half of the book to reach it if it is told at all). I have read 3 books about it and start getting impression that authors lie to us intentionally trying to push us to think in differently in order to sell but not explaining how to do it, just expecting if we get basic blocks we would naturally start building more complex code - let’s be honest - it does not happen - at some point I was left alone with absolutely no help or hint, and still do not have idea how to deal with some issues.
It kinda looks to me that is mostly suitable for problems that are on high scale and where process is break down in arbitrary complex selection (or rule based - because it is essentially rule based). But I cannot stand behind that claim as I do not know as much as I would like.
I believe it could be used much more like Haskel could be used more or Lisp can be used more, but personally languages that close the gap between OO and functional (like Rust) kind of promise more and are kind of more friendly. Possibly prolog inheritance has to do something with it. Its Elixir -> Erlang -> Prolog way of thinking. I never had use for Prolog after programming for 45 years (and for good of that time I was very aware of Prolog) but prolog used to solve certain class of problems that I never really needed it- possibly Elixir is just very modern way to package same thing. One of basic blocks here is forgetting everything. Erlang is perfect for telephony system as process can be stopped at any time at no technological cost. But these are not only problems to solve.
All of this is speculation and impressions, and would like to learn some more and see how it can be useful to me. For example I love to use AWK for some things and it is no less weird programming language. But with AWK I went from learning in 2 days to production code which now works in and out 24/7 on a significant mission critical process. I have spent a month on Elixir and still have no idea how to write useful program for me. I am taking awk as example because it is essentially rule based language as elixir is so they can be compared at some conceptual level.
Will add just one more thing - I know for example that CouchDB is written in erlang (which base language for elixir) and it is extremely good and well behaved system - but it is what I would call mile wide and inch deep - the operations are relatively simple and whole strength comes from being able to scale to arbitrary large demand and intercommunicate flawlessly. But there is no complex algorithms to fulfil. I am not saying here that some complex algorithms cannot be done in elixir but big question is what is class of problems elixir tries to solve as I am not seeing it clearly.
that my 2c why I am not using it more.
ps - added later - there is interesting comparison to ponder. In 2009 Ryan re-introduced the idea of using javascript at server side (idea was not original as netscape had it in mid 90ties - you could write both run at browser and run at server javascript). Since than node exploded like wildfire. It took maybe 2–3 years that everyone got aware of it. In 10 years it is system so big that you need a lot of time just to see its size not to mention to know details. How come that essentially bad programming language like javascript gets so much attention and essentially quite fine elixir with very interesting concepts unlike other that additionally solves some erlang problems (on a user side) does not get even a tiny fraction of attention. What is the problem here?
I can't offer a comprehensive answer, but my impression is that the different VMs make for very different semantics under the hood.
The Erlang VM offers ultra-lightweight processes, which makes the "let it crash" philosophy a no-brainer. Process isolation in Erlang extends to both heap and stack, which I don't believe is true for Akka, and makes both for safer code and virtually invisible garbage collection (at least compared to the JVM).
The biggest advantage I see to the JVM is the plethora of libraries that support it, and I imagine that array and matrix manipulation are much faster because
I can't offer a comprehensive answer, but my impression is that the different VMs make for very different semantics under the hood.
The Erlang VM offers ultra-lightweight processes, which makes the "let it crash" philosophy a no-brainer. Process isolation in Erlang extends to both heap and stack, which I don't believe is true for Akka, and makes both for safer code and virtually invisible garbage collection (at least compared to the JVM).
The biggest advantage I see to the JVM is the plethora of libraries that support it, and I imagine that array and matrix manipulation are much faster because Erlang doesn't offer mutable data structures.
Short answer is, the Akka actor system is superior to Scala actors. It's a more capable, safer design. So much so, that Scala actors are being replaced by Akka actors: http://docs.scala-lang.org/overviews/core/actors-migration-guide.html
The latest version of Scala now includes both the Scala actor implementation in one jar, and the Akka actor implementation in another jar. Scala actors are deprecated starting with Scala 2.11. Eventually the Scala actor jar will be removed entirely from Scala updates.
A superset is typically built on an underlying language to minimize the amount of code required to achieve a certain functionality. With this comes additional overhead that may not be wanted or necessary for a given application.
Which language to choose depends on the size of the project and what it is you're trying to achieve. If you know both, you'll be in a better position to decide your prefer
A superset is typically built on an underlying language to minimize the amount of code required to achieve a certain functionality. With this comes additional overhead that may not be wanted or necessary for a given application.
Which language to choose depends on the size of the project and what it is you're trying to achieve. If you know both, you'll be in a better position to decide your preference for a given application accordingly.
Any layer of abstraction may impede...
I used to work with it at Ericsson (the company that invented Erlang) and contrary to what you may think, it isn't widely used. It's the usual politics of being worried that you won't find enough developers who know it, that it's strange, and that it's relatively slow.
Where we did use it was in the test environment for the LTE (4G) radio base station. We used Erlang to fake everything from other base stations (3G and 4G), UEs (User Equipment, basically phones), the core network nodes such as MME, and other services, like a DHCP server.
It was easily the best test framework I've worked with, and
I used to work with it at Ericsson (the company that invented Erlang) and contrary to what you may think, it isn't widely used. It's the usual politics of being worried that you won't find enough developers who know it, that it's strange, and that it's relatively slow.
Where we did use it was in the test environment for the LTE (4G) radio base station. We used Erlang to fake everything from other base stations (3G and 4G), UEs (User Equipment, basically phones), the core network nodes such as MME, and other services, like a DHCP server.
It was easily the best test framework I've worked with, and making new additions was a breeze. We used Common Test to run our tests which works really well for larger integration tests (it's too slow to be suitable for unit tests though, but to be fair, that's not what it aims to do either).
The process oriented paradigm works really well in an environment like this, where you have a large number of independent nodes that all communicate asynchronously. In our test environment we could spy on all the messages being sent and also intercept and change them at will which helped a lot in keeping the test cases readable and compact.
I would say that readability is one of the key strengths of Erlang actually. The code is rather WYSIWYG once you've gotten used to the syntax.
Specifically on the topic of OOM errors, there is no support for handling them after the fact in Erlang. In general, it's very hard to do this in an environment with dynamic memory management and green threads. The thing that will trigger an OOM error detection would most likely be a garbage collection, but since they are per-process in Erlang, there is no way of knowing whether the process detecting the OOM condition is the actual culprit. Also, any hook responding to the OOM would need to run in constant, pre-allocated memory, which is "un-erlangy" (it could be done, of course, but would req
Specifically on the topic of OOM errors, there is no support for handling them after the fact in Erlang. In general, it's very hard to do this in an environment with dynamic memory management and green threads. The thing that will trigger an OOM error detection would most likely be a garbage collection, but since they are per-process in Erlang, there is no way of knowing whether the process detecting the OOM condition is the actual culprit. Also, any hook responding to the OOM would need to run in constant, pre-allocated memory, which is "un-erlangy" (it could be done, of course, but would require some custom approach.)
What you can do in Erlang is use the memory supervision library, subscribe to system monitor warnings about large process heaps, profile your applications with garbage collection traces* etc. There are also good load regulations solutions (such as Jobs) which can let you throttle incoming traffic in e.g. high-memory conditions.
When it comes to isolation in general, Erlang and Haskell provide great isolation by default, but there are pragmatic ways to subvert it. I tend to think that this is the way to go: offer an intuitive and useful default, but don't be too militant about trapping users into it; commercial development tends to call for dirty compromises now and then, and the people maintaining the code are adults and should be allowed to take risks. Erlang, for example, allows for user-provided C code to run inside the VM. That obviously voids any guarantees of isolation and real-time characteristics, and there are well-known horror stories in the community related to this. But when you really need it, it can be a godsend.
* Erlang's trace facility is amazing. The GC trace will let you know when GC kicks in, in which function, how much memory was reclaimed, and how large the heap is afterwards. It's easy to write a small program that identifies wasteful processes and points to the code segments that are most likely the cause.
Not really. You’re using the same core classes. But they will be slightly more awkward to call and to deal with the results. That’s because futures in java are not monads and so you have to program every manipulation explicitly.
Java 11 has a lot of the goodies that Scala has always had. So Java is becoming less verbose and easier to write.
So what happened? The world changed, and continues to change:
- Moore’s law ends,
- I am sitting in front of a 16 core SMP computer,
- It has more memory than I could ever use,
- It is really fast,
- I am writing simple networked & distributed services,
- Reliable code, not just features, differentiates,
- Scalability is standard, and not special.
Some years ago it might not have been practical to use Erlang because there is no mutable state and performance would suffer. Now distributed and network services are pervasive. At the same time these services tend to be much simpler, and there is new awareness that simpl
So what happened? The world changed, and continues to change:
- Moore’s law ends,
- I am sitting in front of a 16 core SMP computer,
- It has more memory than I could ever use,
- It is really fast,
- I am writing simple networked & distributed services,
- Reliable code, not just features, differentiates,
- Scalability is standard, and not special.
Some years ago it might not have been practical to use Erlang because there is no mutable state and performance would suffer. Now distributed and network services are pervasive. At the same time these services tend to be much simpler, and there is new awareness that simple, safe, and reliable code (and systems) are differentiators. Languages built on Erlang, like Elixir, provide a familiar environment and toolset which allows programmers to adopt more easily.
1. We are currently using Elixir for development of a couple of production applications.
I am a programmer with Erlang background and switching to Elixir is rather hard, but I have a feeling that it's worth the shot. It's important to be ready to follow the releases and changes in the libraries up until the version one of the language.
2. It's good that non-erlangers pick basics of Elixir rather quickly, that Elixir fixes some things in Erlang, adds even more neat introspection while Elixir libraries provide handy DSLs for doing stuff being less verbose and more expressive; on the cons
1. We are currently using Elixir for development of a couple of production applications.
I am a programmer with Erlang background and switching to Elixir is rather hard, but I have a feeling that it's worth the shot. It's important to be ready to follow the releases and changes in the libraries up until the version one of the language.
2. It's good that non-erlangers pick basics of Elixir rather quickly, that Elixir fixes some things in Erlang, adds even more neat introspection while Elixir libraries provide handy DSLs for doing stuff being less verbose and more expressive; on the cons side of things — the only concrete aim of the language I see is being Erlang++ with nice syntax and extensive macro support and I can't get the *big* picture of language architecture (which doesn't mean that Elixir lacks one) and also, it's not that stable cause most of the developers develop their stuff against master. But hey, after all, it's only 0.7.0!
--
Hope that helps,
Jonn Mostovoy
Nope.
Erlang Virtual Machine (known as BEAM) is probably the best concurrency/parallelisation solution on the market. Not only does it use all of the system cores, it implements it’s own lightweight threads with custom scheduler upon them.
What you get is the system that can handle tens of thousands or even millions of threads on accessible hardware. That allows you to use Erlang processes (aforementioned lightweight threads) without really limiting yourself, while being sure that scheduler will handle their execution in the most efficient manner, while utilizing all OS resources.
It’s the best f
Nope.
Erlang Virtual Machine (known as BEAM) is probably the best concurrency/parallelisation solution on the market. Not only does it use all of the system cores, it implements it’s own lightweight threads with custom scheduler upon them.
What you get is the system that can handle tens of thousands or even millions of threads on accessible hardware. That allows you to use Erlang processes (aforementioned lightweight threads) without really limiting yourself, while being sure that scheduler will handle their execution in the most efficient manner, while utilizing all OS resources.
It’s the best feature offered by the platform.
EDIT:
Question was merged, the original did not have the screenshot attached. The commenter means single-threaded performance of Erlang is not great - which is true. Erlang power is not in fast execution of code(that’s C++), it’s the ability to parallelize execution with low cost involved. However, claiming it’s slower than Ruby is dubious - see fast-faster-fastest (64-bit Ubuntu quad core)
Compared to not using Akka with Java? No disadvantages.
Compared to using Akka with Scala? Minimal disadvantages. You’d just have to work a little harder to hook things up than you would if you were writing in Scala.
I don’t think its a matter of suitably. Erlang has added features over the past few year, but is still the same language it was years ago. The Elixir language adds a few features over Erlang, but not many.
Personally, I think that José and Chris coming from Rails has influenced that exposure to the languages followed by some key contributors that help build the eco-system we have today (mix, Hex.pm, etc).
My experience has been that once designers see the language, many love it. The more noise, the more people investigate it.
Furthermore, Erlang had the stigma that it was for telecommunications w
I don’t think its a matter of suitably. Erlang has added features over the past few year, but is still the same language it was years ago. The Elixir language adds a few features over Erlang, but not many.
Personally, I think that José and Chris coming from Rails has influenced that exposure to the languages followed by some key contributors that help build the eco-system we have today (mix, Hex.pm, etc).
My experience has been that once designers see the language, many love it. The more noise, the more people investigate it.
Furthermore, Erlang had the stigma that it was for telecommunications with some barriers to entry like being functional and its different syntax. Functional language popularity is on the rise. With that and Elixir’s syntax closer to other modern languages, I’m not surprised its rapidly gaining popularity.
Elixir and Erlang have great features for concurrency and fault tolerance, it does not get in the way for a general purpose server side programming language.
I should probably mention testing also. When I first started looking at Erlang, I was not impressed with the way testing was done. Elixir resolved that by bringing a very usable testing solution into the eco-system.
The answer by John is definitely true, with respect to lightweight processes in Erlang that do not impact each other if one fails. Since Akka runs on the monolithic JVM, an OutOfMemoryError is not an event you can supervise.
That said, the clustering feature that has been rolled out in Akka 2.1 and 2.2 allows you to build clusters of JVM nodes that we believe will allow us to approach the "9 nines" of Erlang. They aren't lightweight processes, but they are isolated and watchable. Nodes can join and leave the cluster, providing increased uptime with less self-management as existed with the Re
The answer by John is definitely true, with respect to lightweight processes in Erlang that do not impact each other if one fails. Since Akka runs on the monolithic JVM, an OutOfMemoryError is not an event you can supervise.
That said, the clustering feature that has been rolled out in Akka 2.1 and 2.2 allows you to build clusters of JVM nodes that we believe will allow us to approach the "9 nines" of Erlang. They aren't lightweight processes, but they are isolated and watchable. Nodes can join and leave the cluster, providing increased uptime with less self-management as existed with the Remoting solution that preceded it.