Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors

C/C++ to Erlang convert

  • This topic has 12 replies, 1 voice, and was last updated 4 years ago by arjun.
Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #38705
    Eranga
    Guest

    Hi,

    We have a couple of telco grade platforms developed using C/C++ in Linux. After the study of Erlang, we’re seeking the feasibility of porting those codes in to Erlang for better distribution of operations. Somebody please help me to figure out answers to below questions.

    1) Is it a good idea to do so?

    2) Will processing be fater and efficient in Erlang than in C?

    3) Is there a converter or cross-compiler that I can use for easy conversion of C/C++ code to Erlang?

    4) How about MNESIA database? Can it stand for upto 1000 concurrent requests per second?

    5) What kind of Hardware will need for that kind of processing?

    6) What will be the future in Erlang?

    7) Is Ericsson still use Erlang or they’re migrating to C/C++ or other languages? If so, why?

    Thanks in advance!

    #38706
    GKM
    Guest

    ) Is it a good idea to do so?

    “couple of telco grade platforms ”
    Are these applications ?

    If they are UP and running well you need not port.

    If you have performance related issues you need to look at alternates.

    2) Will processing be fater and efficient in Erlang than in C?

    C is just a language .

    You can get good optimised code if you re write certain critical modules again.

    The isue is performance tuning, tesing, optimization and re engineering.

    Your SW architecure, design and optimization will give the performance.

    3) Is there a converter or cross-compiler that I can use for easy conversion of C/C++ code to Erlang?

    I don’t think so.

    4) How about MNESIA database? Can it stand for upto 1000 concurrent requests per second?

    5) What kind of Hardware will need for that kind of processing?

    Multi processor,High Speed Back plane.

    Please estimate the load.
    Analyse the application pofile.

    6) What will be the future in Erlang?

    7) Is Ericsson still use Erlang or they’re migrating to C/C++ or other languages? If so, why?
    ———

    Regards,

    GKM
    gkm@axiomtech.org

    #38707
    GKM
    Guest

    Hi,

    You may like to adapt a mixed plat form to keep scalability, extensibility and low support costs.

    Your application will decide the optimum, state of the art HW,Back Bone, Network architecture.

    GKM

    gkm@axiomtech.org

    #38708
    Eranga
    Guest

    Thanks GKM for your replies.

    I have some problems with adopting the scalability to the current platform developed using C. So anyway I will have to re-design/re-structure the platform for high availability and scalability. That’s why I thought whether by migrating to Erlang platform, it that will shorten the development time and efforts. Also if that’ll give a benifits by using already existing Telco grade apps/tools in OTA.

    But I wonder how will be the future for Erlang. Will that receive the same recognition it had or currently has?

    #38709
    GKM
    Guest

    Hello Eranga ,

    Any paltform’s life / support depend’s on it’s users.

    You need to decide based on the resources you have and the time constrait’s.

    If you have good develeoper’s and budgets in place go for Erlang.

    If you have limited resources depend on linux – a good and well supported environment.

    Can you explain the scalability problems you have ?

    Are you working for voice communication only or data communication ?

    No of users ( simultaneous ) and data rates you are planning will give a good in sight of the system.

    Are you in Australia ?

    Regards,

    GKM

    #38710
    Eranga
    Guest

    Hi All,

    I found this disturbing sentense about Erlang…

    “In February 1998, Erlang was banned within Ericsson Radio AB (ERA) for new product projects aimed for external customers because”

    Does that mean Erlang is going outdated or over taken from other languages?

    #38711
    Eranga
    Guest

    Hi GKM,

    Thanks for your reply! Below are the answers for your questions.

    >>You need to decide based on the >>resources you have and the time >>constrait’s.

    I have limited resources and time. I need our products to be in the market asap.

    >>If you have good develeoper’s >>and budgets in place go for >>Erlang.

    Yes, I have a good team of developers. But the budget is limited.

    >>If you have limited resources >>depend on linux – a good and >>well supported environment.

    Yes, but the C/C++ development with sufficient stability and scalability takes too much time/resources. Since Erlang is developed for Telecom, I thought that will address my most of the problems. But the “clause” I posted in my last post, disturbs my thoughts.

    >>Can you explain the >>scalability problems you have ?

    Java is certainly unsuilable for the platforms that we develope, since we need the throuput of 100 ~ 1000 messages/sec. Also it involves a lot of database access and logging functions. The system can distributed in many servers (avg 5)

    >>Are you working for voice >>communication only or data >>communication ?

    We work both voice and data (mainly SS7)

    >>Are you in Australia ?

    No. I’m from Sri Lanka.

    Thanks!

    #38712
    GKM
    Guest

    Hi Eranga,

    1. I saw Ericsson site and down loaded the support docs. It’s a good environment. I am new to this. But my first reading says its really good.

    Now you say “Erlang was banned within Ericsson ” !!!

    Is this from a reliable source ??

    2. Usually multinational companies support lot of development from Universities and small indpendent developers.

    They invest a lot as they need results.

    3. C , C++ , Linux, Multi processor architectures on PCI bus is the best bet. Proven technology in telecom and going to stay. I would like to choose that only.

    4.
    Are you from univ ?
    Telecom industry ?

    5. I live in India.
    Telecom market is tough to penetrate.
    6. I am working on IEEE 802.11 a,b,g architectures. In the process of writing design specifications for the products. My work will be on
    IP addressing scheme,
    PCI bus, Controllera, assembly , c, c++ code for optimim routers in the wireless data ( vice, Images, nideo & data )world.

    I also intend to work on the back planes and PCI plug in cards for telecom in the back bone routers.

    My we can exchange some views and
    take the products to some logical end.

    Regards

    GKM

    #38713
    GKM
    Guest

    Hi Eranga .

    1. Java is certainly unsuilable

    Yes. I agree.
    2.

    -throuput of 100 ~ 1000 messages/sec.
    – database access and logging functions
    – The system can distributed in many servers (avg 5)

    This is where HW need to be optimsed.

    -Can you tell the size of the messagges ?
    No. Of Bytes.
    IP bases ?

    – Database functions / More info reqd.

    3. What are the external world interfaces ?
    Have you the c/C++ up and running ?

    Regards,

    GKM

    gkm@axiomtech.org

    #38714
    Eranga
    Guest

    Hi GKM,

    I’m pleased to get to know you, as you are from a neighbour country, in the same field. Please find my answers to your questions below.

    >>Now you say “Erlang was banned >>within Ericsson ” !!!

    >>Is this from a reliable >>source ??

    Yes, this is from reliable source. But at the same time Ericsson has mentioned it’s because they’re finding it’s difficult to maintain a programming language (not their business). Also some says it’s bacause Ericsson has moved away from Software development to Software consuming (outsource).

    >>2. Usually multinational >>cmpanies support lot of >>development from Universities >>and small indpendent developers.

    I’m worried if it’s only university and research support that Erlang gets. Without actual commercial support to the language development, it’ll be slow, unless many developer start to use it.

    >>3. C , C++ , Linux, Multi >>processor architectures on PCI >>bus is the best bet.

    Same here. But with C/C++, development time to greater and a lot of time is used by code debugging.

    >>Are you from univ ?
    >>Telecom industry ?

    I did a B.Sc. Engineering at University of Moratuwa, Sri Lanka. Now working at a company called WaveNET. Yes, we developed VAS platforms to telecom industry.

    >>Telecom market is tough to >>penetrate.

    It definitely is. But worth trying. Currently we’re getting a pretty good recognition from telco operators, specially in Sri Lanka.

    >>6. I am working on IEEE 802.11 a,b,g architectures.

    That’s really good to hear. Actually we’re looking for possible mobile communication (limited area) on Wifi. May be you might be able to help us.

    Thanks & Regards,

    #38715
    GKM
    Guest

    Hi Eranga ,

    1. Nice to hear from you.

    2. If you have clients with you we can take care of dev and implementation can be done by you.

    3. c , c ++ , dev efforts, architecture design …. we are strong.

    4. We will work on the specifications first.

    Regards,

    GKM

    gkm@axiomtech.org

    #38716
    Wallis Dudhnath
    Guest

    Erlang is now a part of the open source community. Look at Erlang.org.
    Whatsapp is powered by Erlang. Compared to 2002, Erlang has traction.

    At one stage a vendor earmarked Erlang as the key Language that would be used for Next Generation Data Switches, e.g. ATM (Asyn. Transfer Mode).

    VBR/ Wallis Dudhnath

    #75726
    arjun
    Guest

    #include <pthread.h>
    #include <semaphore.h>
    #include <stdlib.h>
    #include <stdio.h>

    /*
    This program provides a possible solution for producer-consumer problem using mutex and semaphore.
    I have used 5 producers and 5 consumers to demonstrate the solution. You can always play with these values.
    */

    #define MaxItems 5 // Maximum items a producer can produce or a consumer can consume
    #define BufferSize 5 // Size of the buffer

    sem_t empty;
    sem_t full;
    int in = 0;
    int out = 0;
    int buffer[BufferSize];
    pthread_mutex_t mutex;

    void *producer(void *pno)
    {
    int item;
    for(int i = 0; i < MaxItems; i++) {
    item = rand(); // Produce an random item
    sem_wait(&empty);
    pthread_mutex_lock(&mutex);
    buffer[in] = item;
    printf(“Producer %d: Insert Item %d at %d\n”, *((int *)pno),buffer[in],in);
    in = (in+1)%BufferSize;
    pthread_mutex_unlock(&mutex);
    sem_post(&full);
    }
    }
    void *consumer(void *cno)
    {
    for(int i = 0; i < MaxItems; i++) {
    sem_wait(&full);
    pthread_mutex_lock(&mutex);
    int item = buffer[out];
    printf(“Consumer %d: Remove Item %d from %d\n”,*((int *)cno),item, out);
    out = (out+1)%BufferSize;
    pthread_mutex_unlock(&mutex);
    sem_post(&empty);
    }
    }

    int main()
    {

    pthread_t pro[5],con[5];
    pthread_mutex_init(&mutex, NULL);
    sem_init(&empty,0,BufferSize);
    sem_init(&full,0,0);

    int a[5] = {1,2,3,4,5}; //Just used for numbering the producer and consumer

    for(int i = 0; i < 5; i++) {
    pthread_create(&pro[i], NULL, (void *)producer, (void *)&a[i]);
    }
    for(int i = 0; i < 5; i++) {
    pthread_create(&con[i], NULL, (void *)consumer, (void *)&a[i]);
    }

    for(int i = 0; i < 5; i++) {
    pthread_join(pro[i], NULL);
    }
    for(int i = 0; i < 5; i++) {
    pthread_join(con[i], NULL);
    }

    pthread_mutex_destroy(&mutex);
    sem_destroy(&empty);
    sem_destroy(&full);

    return 0;

    }

Viewing 13 posts - 1 through 13 (of 13 total)
  • The forum ‘Telecom Design’ is closed to new topics and replies.