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

adaptive inter-module interfaces #1

Open
jywarren opened this issue Jan 9, 2017 · 5 comments
Open

adaptive inter-module interfaces #1

jywarren opened this issue Jan 9, 2017 · 5 comments

Comments

@jywarren
Copy link
Owner

jywarren commented Jan 9, 2017

The idea in image-sequencer is that each module is self contained, but I am thinking about how to avoid re-encoding images over and over:

I was thinking of making a way for each module to see what the outputs of the previous module are, maybe ranked by preference/least work, and to choose a format that'd take the least work.

Say, if module A can output an ndarray and subsequent module B can consume an ndarray, A would (via module.getNdarray()?) choose to send it that way instead of as an Image object, to avoid encoding/decoding.

However, each module would have to have the module.getImage() method, at a minimum, so we can render its output as a step in the interface, or in case it's the final module.

An adapter method could do the matching and necessary conversions?

@djmgit
Copy link

djmgit commented Feb 4, 2017

@jywarren I want to contribute to this project, how do I build this project. I mean in both the index.html files dist/image-sequencer is used, so how to generate the dist file from src.

@jywarren
Copy link
Owner Author

jywarren commented Feb 6, 2017

Hi, this is a pretty new project but we'd love to have your contribution. I'll do some work on it tonight and post build guidelines. But the basic build process is run with grunt build.

@sakshamsaxena
Copy link

Hi @jywarren
Can we use the global space of Modules.js ? So the module A may be assigning it's output to some object in this global space, which would act as an optional (?) argument for subsequent modules.
This might however require some management of the same as well, to un-clutter the same space as per the cases.
I'm still reading the source and getting familiar with the working, so please pardon me if I'm off track 😅

@jywarren
Copy link
Owner Author

No problem, and I'm not sure that's the best architecture choice but maybe I misunderstand. I think we should be able to interact with modules via the containing sequencer object, and not need globals.

Thanks, I hope you can help us out!

@lvyachao
Copy link

lvyachao commented Mar 30, 2017

Hi, @jywarren After reading this, the first thing come to my mind actually is Meteor.js. Meteor.js provide the whole solution for data passing between modules since Meteor.js application is a single-page js application and even passing the backend data to front end without requiring the developer to write any synchronization code. Of course the drawbacks is that it might be a little heavy for small web applications. BTW, Meteor can also provide solutions not letting all modules compile.(As I saw this need in readme)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants