Hi Vitalii,
Indeed - we have thought about this alternative ever since we introduced
"resume route". However, the amount of work required to make this
happen is immense, and would retard the development of other,
potentially much more useful features. It is our belief that, for the
moment, having to break down the logic into "before" and "after"
sections is not that much of a deal-breaker (I can personally attest to
that!). Here are two tips to make your script more readable:
* try breaking it down into multiple files, grouped by business logic
* try to have a naming convention for the resume routes, for example:
"resume_lnp_dip"
Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com
On 09.04.2019 18:28, Vitalii Aleksandrov wrote:
Hi opensips team and community,
Want to share one headache I have which might be converted into a
feature request. It's about async() implementation. I use it, like
probably many of us, for db operations and http requests and it's so
complicated to insert an async() call so some already written and
tested config. The requirement to set a "resume_route" and continue
request processing in it forces to break a script into "before async"
and "after async" parts. If you have only one async() call during
request processing it's more or less manageable and when it comes to
many async() operations it becomes a nightmare.
I'm dreaming about the way to just "return" from a "resume_route"
and continue script execution from the instruction next to the place
were async() was called. Frankly speaking I didn't check how it's
implemented and config execution part of opensips is a blackbox for
me. So I assume there might be some architectural reasons and
obstacles which don't allow to make it this way.
Haven't found anything related in 3.0 roadmap. I'm sure this would
be very beneficial for all opensips users.
Feedback and comments are appreciated.
_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users