> That should be done in a separate session manager process, IMHO. yes, that's what i mean. it just needs to demux the info from multiple browser processes and then just write them to the file exactly like opera does right now.
On 4/14/17, Enrico Weigelt, metux IT consult <enrico.weig...@gr13.net> wrote: > On 14.04.2017 16:10, hiro wrote: >> just for inspiration: >> >> check out the format in .opera-12/sessions/autosave.win >> plaintext .ini format, keeps history per tab, including title, url, >> position, etc. > > okay, that's easy and obvious. > > BUT: how can we do that properly w/ multiple processes ? > I'm thinking of having each tab in its own process, of course. > > There're several ideas coming into my mind: > > a) split it into a whole directory, so each process maintains its state > in its own file. the filename would be given by the session manager > (whoever that might be then) > b) have a little session management server which the individual browser > processes talk to. > > We'd also need some way for handling new windows/tabs, history, > bookmarks, etc. > > IMHO, that should be left to the session manager. Lets, for now, > define this as the big hog that handles startup of individual browser > processes, session management, bookmarks, history, cookies, ... > (whether we can split it into multiple programs can be seen later). > > So, we'd need some communication interface between (eg. 9p based) > session manager and individual browser (in future, that could also > be used by other applications, eg. editors, video players, etc, etc.). > > * when session manager starts a browser, it passes some communication > link (eg. fd, socket filename, statedir, ...) down to it. > * browser will not open up new viewers on its own, but notify the SM, > so it can start a new browser instance with the given URL > * perhaps the decision whether to open some url at all, how to handle > other mimetypes, etc, could also be delegated to the SM > (the browser should also signal how the user attempted to open it, > so SM can decide whether to use new tab or window, etc) > > Another interesting topic is extending the context menu, eg. if somebody > wants to introduce new actions, eg. something like incognito mode. > >> personally i think tabs are stupid. there should be one url and title >> per process. > > Of course, each tab should run on its own process. But having multiple > tabs in one window can be quite handy, eg. for organizing things. > >> problem is: you still need one history per tab/window/process. >> if you want to keep it compatible with having just one single session >> file in opera format all those different processes have to synchronize >> via one process that then writes into the session file before >> requesting a new site or going back/forward in history. > > That should be done in a separate session manager process, IMHO. > > > > --mtx > >