• Complain

Zachary Kessin - Building Web Applications with Erlang: Working with REST and Web Sockets on Yaws

Here you can read online Zachary Kessin - Building Web Applications with Erlang: Working with REST and Web Sockets on Yaws full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2012, publisher: OReilly Media, genre: Computer. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

Zachary Kessin Building Web Applications with Erlang: Working with REST and Web Sockets on Yaws
  • Book:
    Building Web Applications with Erlang: Working with REST and Web Sockets on Yaws
  • Author:
  • Publisher:
    OReilly Media
  • Genre:
  • Year:
    2012
  • Rating:
    4 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 80
    • 1
    • 2
    • 3
    • 4
    • 5

Building Web Applications with Erlang: Working with REST and Web Sockets on Yaws: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "Building Web Applications with Erlang: Working with REST and Web Sockets on Yaws" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

Why choose Erlang for web applications? Discover the answer hands-on by building a simple web service with this book. If youre an experienced web developer who knows basic Erlang, youll learn how to work with REST, dynamic content, web sockets, and concurrency through several examples. In the process, youll see first-hand that Erlang is ideal for building business-critical services.

Erlang was designed for fault-tolerant, non-stop telecom systems, and building applications with it requires a large set of skills. By the end of the book, youll have the information you need to build a basic web service and get it running.

  • Explore the power of Erlang and REST for building web services
  • Serve static and dynamic content with the Yaws web server
  • Use different methods for outputting data to user, such as encoding Erlang data structures into JSON or XML
  • Build an application to listen for HTTP requests, process them, store data, and return useful data
  • Go beyond the request-response modelpush data to clients with web sockets
  • Use Erlang and Yaws to stream data from the server to a client

A book which is truly needed and will help get Erlang to the next level.
Francesco Cesarini, CEO of Erlang Solutions, author of Erlang Programming.

Zachary Kessin: author's other books


Who wrote Building Web Applications with Erlang: Working with REST and Web Sockets on Yaws? Find out the surname, the name of the author of the book and a list of all author's works by series.

Building Web Applications with Erlang: Working with REST and Web Sockets on Yaws — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "Building Web Applications with Erlang: Working with REST and Web Sockets on Yaws" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make
Building Web Applications with Erlang
Zachary Kessin
Published by OReilly Media

Beijing Cambridge Farnham Kln Sebastopol Tokyo Preface Erlang promises to let - photo 1

Beijing Cambridge Farnham Kln Sebastopol Tokyo

Preface

Erlang promises to let you build robust, fault-tolerant servers far more easily than with Java or C#. It almost sounds too good to be true, but Erlang has become a programmers secret handshake. As much as many of us hate our phone company, there is a basic truth that must be recognized: when you pick up your phone to make a call, it normally just works. So people have started to realize that telecom folks must be doing something right!

Erlang was built to program telephone switches at Ericsson, and most of the language design choices reflect what was necessary to program a telephone switch. That means, for example, that Erlang software can run for years at a time without interruption because phone switches are expected to do that. Erlang applications can be upgraded in place without taking the system offline or even losing state because the phone company cant drop a citys worth of calls every time they have to patch a bug or roll out a new feature.

When a web service goes down, a lot of things break. It may not be as obvious as a suddenly interrupted call, but it may actually create more problems as failures create new failures. Web services can benefit from the language design decisions Erlangs creators made in a telephone switching environment. Having a server that can run without interruption can allow a development team to provide a better service to their customers.

Who This Book Is For

This book shows you the baby steps to building a web service with Erlang. It does not try to teach you Erlang (there are other books for that), nor does it try to show you how to build the large-scale applications that really call for Erlang. Instead, it shows you how to build simple web services as a step along the way to learning to build large-scale web services.

I expect that many readers will, like me, be long-time web professionals who are looking at Erlang as a way to stand out from a crowd of Java and C# developers. After all, in a few years Erlang may be the next big thing, and you want to be ahead of the wave. Or perhaps you have become frustrated with some aspect of building web applications in those other languages and are looking for something a bit more powerful.

You need to know at least basic Erlang, but you should also be familiar with web developmentin PHP, Perl, Ruby, Java, or something else. I assume that you have seen HTML and know the basics of how HTTP works.

There are a few examples in this book that use JavaScript to interface a browser with the Erlang example. Except in ]

Learning Erlang

This book will not teach you Erlang. There are already a number of good resources for that, including:

  • Learn You Some Erlang for Great Good , by Fred Hbert. Learn You Some Erlang will also be published by No Starch Press in September 2012.

  • Erlang Programming , by Francesco Cesarini and Simon Thompson, published by OReilly.

  • Programming Erlang , by Joe Armstrong, published by The Pragmatic Programmers.

Reading the first few chapters of any of these and understanding the basics of how Erlang works should be enough. However, you should plan to really work through those chapters and write some simple programs before attempting the projects here.

In particular, you should read up on sequential code and the very basics of how concurrency works in Erlang. When building large-scale applications in Erlang, taking advantage of the Open Telecom Platform (OTP) will allow the programmer to leverage a large amount of well-tested functionality. And while OTP is very powerful and will make development in Erlang much easier, the details of OTP are less important to learn up front and can be learned as you go along after you have an understanding of how other parts of the system work.

Before You Start

Before you dive into this book, you should have Erlang and Yaws installed on your system. (If you need help in this, check .) Erlang and Yaws can be run on Windows, Mac, and Linux, so any type of system will work fine.

Note

Several people have asked me why I wrote this book around Yaws and not some other web package. There were a few reasons. First of all, Yaws seemed the easiest package to get something simple working in. Second, several of the other packages do not support web sockets (or at least didnt when I started writing), and I knew that I would be needing web sockets in my own development.

I am also assuming that you are familiar with the Unix command line. While it is not necessary to be a Bash Kung-Fu Master (Im not), you should be able to interact with the bash shell and not freak out.

What You Will Learn

Building a full Erlang application requires a large set of skills. This book will help you get to the point where you can build a basic web service application and get it running.

First, youll explore some of the power and mystery of Erlang and REST. Youll see why Erlang makes sense as a foundation for building scalable and reliable systems and why REST is a popular approach to building web services and explore some of the tradeoffs involved in using the two together. This first chapter will also explore some of your data storage options.

The Yaws web server is the foundation of our application, so youll learn to configure Yaws and serve static content. Yes, static content. In many cases, a website with dynamic content will have a collection of static files as resources. Once you know how to manage static files, you can move on to working with dynamic content, embedding Erlang into an HTML file or other kind of file (see ). Youll learn about working with HTTP itself and basic debugging tools like logging.

Youll need a way to route client requests presented as URLs to the internal resources of your service. Appmods, discussed in , will let you map arbitrary URLs onto relevant resources.

Next we cover output formats. I will show three general ways to output data to the user. The first, and least useful, method is to use ehtml to directly translate Erlang data into HTML or XML. We also will see how to use the erlydtl library to use the Django template language to create formatted output. (DTL is a common template package on Python and should be familiar to some readers of this book.) Finally, we will see how to encode Erlang data structures into JSON or XML, which can be sent to the user. In many cases, modern web applications will have a page of static (or almost static) HTML and a lot of JavaScript that will interact with the server by sending JSON or XML over Ajax channels.

Now that we can generate content, its time to build a simple RESTful service. Youll assemble an application that can listen for HTTP requests, process them, store data, and return useful information. Youll also learn how to handle large chunks of incoming information, dealing with multipart requests and file uploads.

If youd like to go beyond HTTPs request-response model, presents a live bidirectional method of communication between the client and the server. Yaws supports web sockets, and the dynamic, event-driven nature of Erlang makes for an ideal platform for pushing dynamic data to the client.

Finally, presents a somewhat larger example that pulls together most or all of the previously discussed topics into one complete application. This chapter will show how to build a complete small application with Yaws and OTP.

Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «Building Web Applications with Erlang: Working with REST and Web Sockets on Yaws»

Look at similar books to Building Web Applications with Erlang: Working with REST and Web Sockets on Yaws. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «Building Web Applications with Erlang: Working with REST and Web Sockets on Yaws»

Discussion, reviews of the book Building Web Applications with Erlang: Working with REST and Web Sockets on Yaws and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.