S
S
Sergey Beresnev2012-04-17 04:31:50
PHP
Sergey Beresnev, 2012-04-17 04:31:50

Organization of the internal API

There is a main application which works with a DB.

It is necessary to write a side application that will work with asterisk and, accordingly, with data in the database. It seems to me fundamentally wrong that such an application works directly with the database (given that it can not only read, but also make some changes).

Therefore, there is an idea to make a separate API for asterisk. How correct is this decision? And how could it be properly implemented (sockets, cURL, ...)?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dali, 2012-04-17
@sectus

if you look from the point of view of SOA service oriented architecture, then all modules must communicate with each other using the API.
That is, the answer to the first question: “In principle, this is a normal solution. You can write a module for working with the database, and for starters, let asterisk work with it. Then you can be inspired by the ideas of SOA, and completely redo all the modules in this way.
On the second, there are many things to advise. Make RESTfull interfaces, the simplest in my opinion to start with

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question