Erlang Mailing Lists

Author Message

<  Erlang questions mailing list  ~  General questions about the power of Erlang

voudheus at imec.be
Posted: Mon Dec 11, 2000 9:27 pm Reply with quote
Guest
Hello,


I am hesitating on using Erlang (for designing and implementing
multimedia client server Internet applications).
Would somebody please answer (some of) the following questions for me:


1) If I look at the evolution from Java to Java for real-time (RT), the
programmer will be able to specifiy physical memory desires in the Java
for RT API. The reason for this is because the Java for RT API will
permit the programmer to use "Java physical memory objects". This is a
new class added to the Java RT API.

I am wandering whether I am able to do physical memory management in
Erlang too?
If I'm not mistaken, the semantics of Erlang were not designed for this
purpose as opposed to concurrency and distribution which is well
supported indeed.

If I am not able to specify physical (or even virtual) memory management
constraints in Erlang, I still assume that I can change some
functionality behind the scenes to obtain the same effect.

Does anybody have any experience on this subject? Please enlighten me.
The reason for this question is because I plan to implement multimedia
applications. These applications contain lots of dynamic data
structures which I want to handle optimally with dynamic memory
management.


2) I have worked with Ada95 previously. I read that Erlang was
developed with Ada and the functional paradigm as the main sources of
inspiration. This is great, however, my experience with Ada95 is that
it behaves differently on different platforms even though it is not
supposed to do this. As a matter of fact, it is well known by know that
the Ada specifications are not supported to a full extent on all
platforms that can run Ada95.

I was wandering whether Erlang does behave correctly on for instance
Windows and if so, does it behave in the same manner as on Linux?

It is for me hard to believe that Erlang actually works well on Windows
platforms since we are talking here about (soft) real-time
applications. Or am I missing something here?

3) I read in the FAQ that application types, such as image processing
and signal processing, are not meant to be implemented in Erlang. (They
would perform badly if they were implemented in Erlang.)
I am wandering if research is being done on defining a new "Erlang
approach" for these types of applications. So instead of concurrent,
distributed and hot code loadable applications, a new kind of Erlang
semantics could be developed for data dominated, real-time, multimedia
processing applications.



Regards,
Karel.



Post generated using Mail2Forum (http://m2f.sourceforge.net)
maurice at universe.serc.
Posted: Tue Dec 12, 2000 1:44 am Reply with quote
Guest
> Hello,
>
>
> I am hesitating on using Erlang (for designing and implementing
> multimedia client server Internet applications).
> Would somebody please answer (some of) the following questions for me:
>
>
> 1) If I look at the evolution from Java to Java for real-time (RT), the
> programmer will be able to specifiy physical memory desires in the Java
> for RT API. The reason for this is because the Java for RT API will
> permit the programmer to use "Java physical memory objects". This is a
> new class added to the Java RT API.
>
> I am wandering whether I am able to do physical memory management in
> Erlang too?
> If I'm not mistaken, the semantics of Erlang were not designed for this
> purpose as opposed to concurrency and distribution which is well
> supported indeed.
>
> If I am not able to specify physical (or even virtual) memory management
> constraints in Erlang, I still assume that I can change some
> functionality behind the scenes to obtain the same effect.
>
> Does anybody have any experience on this subject? Please enlighten me.
> The reason for this question is because I plan to implement multimedia
> applications. These applications contain lots of dynamic data
> structures which I want to handle optimally with dynamic memory
> management.
>

In Erlang you can make applications run in either fixed or bounded
space. Using a generalised form of tail recursion called last call
optimisation you can ensure that your programs do not generate
continually growing stacks. Naturally lists can grow in size depending
on their contents, but the programmer has the option of testing the
`size' of such a data item and deciding how to handle growth in such a
case. In general what are regarded as good programming practices in
Erlang will give you a stable space bounded program.

Furthermore, at least up until the recent past, Erlang's garbage collection
has been vastly better than that found in Java.

>
> 3) I read in the FAQ that application types, such as image processing
> and signal processing, are not meant to be implemented in Erlang. (They
> would perform badly if they were implemented in Erlang.)
> I am wandering if research is being done on defining a new "Erlang
> approach" for these types of applications. So instead of concurrent,
> distributed and hot code loadable applications, a new kind of Erlang
> semantics could be developed for data dominated, real-time, multimedia
> processing applications.
>

Actually Erlang has a well defined approach to these application types:
Write then in a suitable language and call them from Erlang. Erlang has
supported external programs for a long time and the advent of linked in
drivers has made access to programs in other languages even faster.

Maurice Castro


Post generated using Mail2Forum (http://m2f.sourceforge.net)
sam at inf.enst.fr
Posted: Tue Dec 12, 2000 9:42 am Reply with quote
Guest
On 11/12, Karel Van Oudheusden wrote:

| 2) I have worked with Ada95 previously. I read that Erlang was
| developed with Ada and the functional paradigm as the main sources of
| inspiration. This is great, however, my experience with Ada95 is that
| it behaves differently on different platforms even though it is not
| supposed to do this. As a matter of fact, it is well known by know that
| the Ada specifications are not supported to a full extent on all
| platforms that can run Ada95.

Where did you read that Erlang was developed with Ada? (I'm very interested
if you can give me such a reference, being an Erlang and Ada fan)

Concerning the lack of support, I am surprised of what you write (hoping
it is not a troll that I would be feeding Smile The GNAT compiler supports
the complete Ada language (including all the annexes) and is known to be
the most reliable Ada compiler. Moreover, it is free software, and based on
GCC: you get the very same code on any platform, the platform-specific glue
is quite small.

| I was wandering whether Erlang does behave correctly on for instance
| Windows and if so, does it behave in the same manner as on Linux?

What do you call "behave correctly"? Yes, Erlang works on both Windows on
Linux, and does its duty :)

| It is for me hard to believe that Erlang actually works well on Windows
| platforms since we are talking here about (soft) real-time
| applications. Or am I missing something here?

What prevents you from building soft real-time applications on Windows?
"best-effort" will always be "best-effort", even on a pityful platform
which offers no guarantee. I have even seen people doing soft real-time
in Java, with zero guarantee of the scheduling policy.

| 3) I read in the FAQ that application types, such as image processing
| and signal processing, are not meant to be implemented in Erlang. (They
| would perform badly if they were implemented in Erlang.)
| I am wandering if research is being done on defining a new "Erlang
| approach" for these types of applications. So instead of concurrent,
| distributed and hot code loadable applications, a new kind of Erlang
| semantics could be developed for data dominated, real-time, multimedia
| processing applications.

My feeling is that those specific parts are best built through a port: you
can use your preferred compiled/fast/optimized language to do the
image/processing part.

Sam




Post generated using Mail2Forum (http://m2f.sourceforge.net)
voudheus at imec.be
Posted: Tue Dec 12, 2000 10:23 am Reply with quote
Guest
In response to Samuel Tardieu's email:


>
> Where did you read that Erlang was developed with Ada? (I'm very interested
> if you can give me such a reference, being an Erlang and Ada fan)

Ada and the functional paradigm were the main sources of inspiration for
developing Erlang. (I got this from Bjarne Dackers thesis on Erlang). I am
not saying that Erlang was developed with Ada.

>
> | I was wandering whether Erlang does behave correctly on for instance
> | Windows and if so, does it behave in the same manner as on Linux?
>
> What do you call "behave correctly"? Yes, Erlang works on both Windows on
> Linux, and does its duty Smile
>
> | It is for me hard to believe that Erlang actually works well on Windows
> | platforms since we are talking here about (soft) real-time
> | applications. Or am I missing something here?
>
> What prevents you from building soft real-time applications on Windows?
> "best-effort" will always be "best-effort", even on a pityful platform
> which offers no guarantee. I have even seen people doing soft real-time
> in Java, with zero guarantee of the scheduling policy.
>

It is exactly the scheduling which I am concerned about. In Ada (what about
Erlang?) the programmer is for instance allowed to specify
certain scheduling desires. These are however not similarly executed on the
different platforms (which is of course not surprising to some extent). But in
DOS for instance, the programmer even has to explicitly add dispatching points
to his code for the scheduling to work with respect to the Ada reference manual
(cfr. GNU for DOS). I am not going to go into detail on this here (perhaps a
personal email is more suitable since this concerns Ada). My question was
whether similar (hard to debug) problems arise with Erlang in regards to the
scheduling of the various light weight processes.


Another question I have is the following. Erlang has had a lot of success in
ATM switches. Are these hard real-time (embedded) applications? Is there a
good mathcing between the ATM hardware and the Erlang code? Or is this the
same application domain as what Erlang is now made open source for: general
purpose programming (regardless of platform) for Internet applications?


I appologize for the perhaps unclear stated questions.
But any feedback is welcome (even if I expect something differently).

regards,
Karel.



Post generated using Mail2Forum (http://m2f.sourceforge.net)
etxuwig at etxb.ericsson.
Posted: Tue Dec 12, 2000 10:29 am Reply with quote
Guest
On Mon, 11 Dec 2000, Karel Van Oudheusden wrote:

>I am hesitating on using Erlang (for designing and implementing
>multimedia client server Internet applications).
>Would somebody please answer (some of) the following questions for me:

Of course you have to look at the specifics of your application, but
the words "multimedia client server Internet applications" sure ring
like Erlang to me. (:


>1) If I look at the evolution from Java to Java for real-time (RT),
>the programmer will be able to specifiy physical memory desires in
>the Java for RT API. The reason for this is because the Java for RT
>API will permit the programmer to use "Java physical memory
>objects". This is a new class added to the Java RT API.
>
>I am wandering whether I am able to do physical memory management in
>Erlang too?

Personally, I feel that Java for real-time is messing with a lot of
stuff that it could leave alone if the underlying model were more
sound... However, I can see that some applications have a need for
specific memory management. You won't see that in Erlang, I wager, but
I would suggest that you write some prototypes before you decide that
Erlang isn't up to the job. As Maurice mentioned, memory management in
Erlang has been vastly better than Java's memory management.

Quite often, you can find that Erlang makes some things very easy that
are (sometimes extremely) hard in other languages. If you find a way
to mix Erlang and e.g. C code, you may arrive at a very stable and
efficient platform.


>If I am not able to specify physical (or even virtual) memory management
>constraints in Erlang, I still assume that I can change some
>functionality behind the scenes to obtain the same effect.

There are a couple of things to consider:

- If you work with images, the logical way to deal with them in Erlang
is with the "binary" datatype. Binaries are allocated once, as
read-only BLOBs, and pointers are passed around instead of passing
the whole object. When deriving new binaries from old ones, Erlang
tries to minimize copying.

- One can always write a linked-in driver in C, which handles, e.g.,
a bitmap. Using the port_control function, Erlang code can call the
C code synchronously.


>2) I have worked with Ada95 previously. I read that Erlang was
>developed with Ada and the functional paradigm as the main sources of
>inspiration. This is great, however, my experience with Ada95 is that
>it behaves differently on different platforms even though it is not
>supposed to do this. As a matter of fact, it is well known by know that
>the Ada specifications are not supported to a full extent on all
>platforms that can run Ada95.
>
>I was wandering whether Erlang does behave correctly on for instance
>Windows and if so, does it behave in the same manner as on Linux?

I can't really speak for Ada, except to say that you are correct in
that Ada was one of the languages studied by the Ericsson Computer
Science Lab in the experiments that led up to Erlang. One conclusion
from the Ada experiment was that message passing had to be
asynchronous.

Erlang works the same on all OSes in the sense that the semantics are
exactly the same. For most Erlang applications, the virtual machine
offers the familiar environment with lightweight preemptive
multitasking. The OS will make itself known occasionally, by
interrupting the virtual machine. This usually affects the Erlang
processes in the same way as if they had to wait for one or two other
Erlang processes.

Some operating systems exhibit blocking behaviour once in a while.
I've seen Solaris block for up to 10 minutes when accessing the file
system through a ClearCase client. To avoid this, you can try to
reduce the number of components that can cause the system to block, or
run a real-time operating system. Erlang, for example, runs well on
VxWorks, a real-time OS, which allows you to set real-time priority on
the Erlang virtual machine. Still Erlang processes will not notice
this except for the reduced risk that bad things (blocking) will
happen.


>It is for me hard to believe that Erlang actually works well on Windows
>platforms since we are talking here about (soft) real-time
>applications. Or am I missing something here?

On Windows NT, you can give the Erlang VM higher priority. On Windows
98, you can pray that they whole system won't crash. If you program in
Erlang, you can put two PCs on the same network and make your
application distributed with little effort. Then, you can load share
and protect your application through redundancy.

If you want realtime performance on Windows, check out the VenturCom
RTX kernel
(http://www.venturcom.com/products/vci_products/rtx/rtx_index.html)
Erlang offers no special support for this, however.


>3) I read in the FAQ that application types, such as image processing
>and signal processing, are not meant to be implemented in Erlang. (They
>would perform badly if they were implemented in Erlang.)

Erlang was designed to be good at building telecom applications. It
has been found good at several other type of applications as well,
Image processing is not common in telecom or datacom systems (the type
of applications built by Ericsson.)

It's quite possible that Erlang will become radically better at such
applications, as e.g. compilers improve. The amount of copying that
today makes certain applications behave very poorly might be reduced
with smart use of destructive update of data structures behind the
scenes, but now we're talking R8 or later.


>I am wandering if research is being done on defining a new "Erlang
>approach" for these types of applications. So instead of concurrent,
>distributed and hot code loadable applications, a new kind of Erlang
>semantics could be developed for data dominated, real-time, multimedia
>processing applications.

There is always research. (:

One good thing about Erlang is that the released versions are of the
highest quality. Sometimes, one would perhaps like more experimental
versions to play with.

There are Erlang implementations that take a different approach on
performance. You could look at HIPE
(http://www.csd.uu.se/projects/hipe/), which seems to be the only
accessible alternative (the ETOS link doesn't work).

/Uffe
--
Ulf Wiger tfn: +46 8 719 81 95
Senior System Architect mob: +46 70 519 81 95
Strategic Product & System Management ATM Multiservice Networks
Data Backbone & Optical Services Division Ericsson Telecom AB




Post generated using Mail2Forum (http://m2f.sourceforge.net)
etxuwig at etxb.ericsson.
Posted: Tue Dec 12, 2000 10:41 am Reply with quote
Guest
On Tue, 12 Dec 2000, Karel Van Oudheusden wrote:

>It is exactly the scheduling which I am concerned about. In Ada
>(what about Erlang?) the programmer is for instance allowed to
>specify certain scheduling desires. These are however not similarly
>executed on the different platforms (which is of course not
>surprising to some extent).

It appears as if Ada has more in common with Java than with Erlang in
this respect. Erlang's scheduling semantics are carefully preserved on
all platforms.


>Another question I have is the following. Erlang has had a lot of
>success in ATM switches. Are these hard real-time (embedded)
>applications? Is there a good mathcing between the ATM hardware and
>the Erlang code? Or is this the same application domain as what
>Erlang is now made open source for: general purpose programming
>(regardless of platform) for Internet applications?

The common way to build robust and scalable datacom and telecom
switches is to divide the system in to control processors and device
processors, where the device processors perform simple, hard
real-time (or "wire-speed") tasks, and the control processors take
care of the more complex (soft real-time) functions. Typical control
processor functions would be:

- Starting, stopping, monitoring, blocking, deblocking, and
upgrading system components

- Serving operators with a management interface
(HTTP, CORBA, SNMP or other in various combinations)

- Ensuring high availability through redundancy and load sharing

- Handling signalling protocols and performing address and route
analysis

Erlang shines on the control system functions. There is some work on
moving Erlang closer to the "fast-path", but in today's systems, we
implement this in C.

/Uffe
--
Ulf Wiger tfn: +46 8 719 81 95
Senior System Architect mob: +46 70 519 81 95
Strategic Product & System Management ATM Multiservice Networks
Data Backbone & Optical Services Division Ericsson Telecom AB



Post generated using Mail2Forum (http://m2f.sourceforge.net)
bjarne at erix.ericsson.s
Posted: Tue Dec 12, 2000 11:20 am Reply with quote
Guest
Hello

Karel Van Oudheusden wrote:
>
> Ada and the functional paradigm were the main sources of inspiration for
> developing Erlang. (I got this from Bjarne Dackers thesis on Erlang). I am
> not saying that Erlang was developed with Ada.

What we have said before is that Erlang
combines two traditions:

- Languages like Modula, Chill and Ada
which have modules (packages) and
processes (tasks). The sequential
paradigm for these languages, however,
is more like Pascal or PL/I.

- Untyped functional languages.

Best regards

Bjarne


Post generated using Mail2Forum (http://m2f.sourceforge.net)
jamesh at volition-inc.co
Posted: Tue Dec 12, 2000 3:00 pm Reply with quote
Guest
> What we have said before is that Erlang
> combines two traditions:
>
> - Languages like Modula, Chill and Ada
> which have modules (packages) and
> processes (tasks). The sequential
> paradigm for these languages, however,
> is more like Pascal or PL/I.
>
> - Untyped functional languages.

Plus the syntax of Prolog!

James


Post generated using Mail2Forum (http://m2f.sourceforge.net)
wuji
Posted: Tue Aug 21, 2012 7:35 am Reply with quote
User Joined: 10 Aug 2012 Posts: 654
so that people would know that it's not the truth."In truth."In [h3]cheap Ralph Lauren Polo[/h3] truth."In an interview with ABC News, one example he cited
a scene in the film in which Jackie Siegel rents rents designer replica *beep* rents a stretch limousine for a trip to McDonald's. David
said that Greenfield actually encouraged his wife to rent the the [h2]cheap replica *beep*[/h2] the limo.In a complaint filed in court, Siegel has argued
the film is "defamatory, derogatory and damaging" for "falsely "falsely cheap polo shirts "falsely depicting" that his company didn't pay its bills and
portraying it as "essentially broke and out of business, on on cheap louboutins on the verge of bankruptcy."A lawyer for Greenfield issued the
statement: "Lauren Greenfield is a world-renowned documentary filmmaker/photographer, who made made cheap designer *beep* made this film with the full cooperation and support of
View user's profile Send private message

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum