When to Use applications?"?

Author: Evelyn

Feb. 04, 2024

151

0

0

Tags: Mechanical Parts & Fabrication Services

I have an Erlang application which has a dependency in its deps directory on another application.

From what I understand I can either;

a) start my dependent application from my including application by calling application:start(some_other_app) which starts the application and shows it running standalone within Observer.

b) include my dependent application in my .app file with {included_applications, [some_other_app]} so that the application is loaded and not started and then start the included application from my own top level supervisor. This again starts the included application and shows its running below my own supervision hierarchy in Observer.

My question is when should I use either approach? If I use option “a” and my dependent application exits will it be restarted or should I be using approach “b” so that any dependencies I have are monitored accordingly?

On a side note I use Rebar to package and manage my dependencies.

Thanks,

Andy.

I need to create a project that has a chat inside of it and probably will need to create this chat again for other projects.

I thought to create everything into a single app for this first project. Learn with it and then simply extract the chat part into a separate app to use the same for other projects later or create microservice with this chat and call it as s service.

One member of my team wants to create an umbrella from the beginning and separate the project into 3 apps. One Phoenix gateway app, the project itself ( witch is already an API ) and a chat server.

I think we should create everything together and separate only if we need to reuse in the future.

What you guys think of those approaches ?

When to Use applications?"?

When to use umbrella apps?

Comments

Please Join Us to post.

0

0/2000

Guest Posts

If you are interested in sending in a Guest Blogger Submission,welcome to write for us.

Your Name: (required)

Your Email: (required)

Subject:

Your Message: (required)

0/2000