Lazarus

Programming => General => Topic started by: wisheskernel on October 05, 2021, 09:09:34 am

Title: Develop application of a multi-process architecture with lazarus
Post by: wisheskernel on October 05, 2021, 09:09:34 am
When we launch an application like Firefox or skype, we can find there are many processes for this application if opened Windows Task Manager.

Can we develop application of the kind with lazarus?

Title: Re: Develop application of a multi-process architecture with lazarus
Post by: marcov on October 05, 2021, 09:32:58 am
It is not preprepared, and I don't know exactly what these do, but I suspect that they register the app with some Windows 7 or 8 specific api to organize multiple instances that way. Might require manifest changes too.

Title: Re: Develop application of a multi-process architecture with lazarus
Post by: Thaddy on October 05, 2021, 09:42:59 am
Since ms edge is based on chromium you do indeed have a process per tab because of isolation security. It is indeed possible to create such applications with fpc/lazarus.
Title: Re: Develop application of a multi-process architecture with lazarus
Post by: marcov on October 05, 2021, 10:11:48 am
Since ms edge is based on chromium you do indeed have a process per tab because of isolation security. It is indeed possible to create such applications with fpc/lazarus.

You still have to do something so that multiple instances group under one caption in process manager.
Title: Re: Develop application of a multi-process architecture with lazarus
Post by: korba812 on October 05, 2021, 10:18:27 am
I think task manager groups them automatically. Similarly, in the case of lazarus - gdb - debug process - they are automatically included in the process tree in the task manager.
Title: Re: Develop application of a multi-process architecture with lazarus
Post by: Thaddy on October 05, 2021, 10:37:41 am
AFAIK that is correct.
Title: Re: Develop application of a multi-process architecture with lazarus
Post by: balazsszekely on October 05, 2021, 11:26:09 am
They are linked via the parent processid. Initially only one instance of edge is started, that instance will spawn many more child process. Other then security, multiple process makes sense, since a buggy javascript won't kill the whole browser only a tab. Performance is also improved with this setup.
Title: Re: Develop application of a multi-process architecture with lazarus
Post by: Leledumbo on October 08, 2021, 04:15:52 am
Can we? I can, but I don't know about you ;)
Try the attached project and see for yourself. Do note that killing the parent won't kill the children, so is the other way around. Don't abuse your system resources, this is just for demonstration purpose.
TinyPortal © 2005-2018