Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Electron pdf recipe #125

Closed
pofider opened this issue Oct 5, 2015 · 6 comments
Closed

Electron pdf recipe #125

pofider opened this issue Oct 5, 2015 · 6 comments

Comments

@pofider
Copy link
Contributor

pofider commented Oct 5, 2015

No description provided.

@bjrmatos
Copy link
Collaborator

ok i have started the electron implementation with electron-workers, and it works like a champ in OSX (should work in windows too), unfortunately i discovered that because electron is not a headless process (for now) it won't work on linux (you can see the travis build logs in electron-workers repo).. but the good news is that this will be solved electron/electron#228.. until then i will continue with the development of
electron-html-to-pdf and when the issue is resolved all will be ready.

@bjrmatos
Copy link
Collaborator

notes about electron-workers implementation:

basically the implementation is heavily based on phantom-workers but with the following differences:

1.- ES6 😄

2.- simple round robin task distribution across workers.. so each worker process is never marked as busy (unless it is recycled), instead one task per worker will be distributed. since electron is not a heavy (buggy?) process like phantom this will work fine in scale. the main difference is that each worker process never gets marked as busy so it can handle more tasks concurrently without losing task balancing across the other workers.

3.- i only recycle the worker process if a timeout is reached, not if the worker return an error. seems like electron have ways to detect if a process is frozen, so in the future i was thinking that the electron script can trigger a process recycle on its own with an event emitter mechanism (something i will explore more in the future)

4.- an additional param to .execute, in order to support a timeout per task (not globally)

@bjrmatos
Copy link
Collaborator

just to report that i'm very close to finish the electron recipe, the hard work is done, i just need to write some docs and make the jsreport integration

@pofider
Copy link
Contributor Author

pofider commented Nov 27, 2015

Great! I am looking forward.
Feel free to ask for help with jsreport integration. I guess you will just need to add some inputs to UI, I can do it for you if you will want.

@bjrmatos
Copy link
Collaborator

thnks, i will let you know if i have some trouble 😄

@bjrmatos
Copy link
Collaborator

bjrmatos commented Dec 8, 2015

done and published in npm! 🎉 🎈

@bjrmatos bjrmatos closed this as completed Dec 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants