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

Bolts that accept multiple streams cannot differentiate expected fields #12

Open
cameront opened this issue Jun 5, 2014 · 3 comments
Open

Comments

@cameront
Copy link
Contributor

cameront commented Jun 5, 2014

either Fields() needs to take a string that can help decide which interfaces get returned, or a new method FieldsForStream(string)? needs to be added to the interface that allows the bolt to return fields dependent on the streamId passed.

@cameront
Copy link
Contributor Author

cameront commented Jun 5, 2014

I think both changes would break existing users, unless a new "MultiStreamBolt" interface is created, which seems unideal?

@jsgilmore
Copy link
Owner

Yes, this is a gap we saw when we added the ShellBolt and ShellSpout wrappers for the conn objects. I would prefer to just take the pain now and break the interface. Maybe this is a good time to start versioning GoStorm. In the release notes for the new version we can specify the breaking change and we can add a section to the readme to tell the user to use the gofmt tool to help fix the breaking changes with something like: gofmt -r 'func Fields() -> func Fields("default")' -w *.go. Of course I'm still not entirely happy with how Fields works.

@jsgilmore
Copy link
Owner

We'll also have to rethink how the ShellBolt handles its connection. Currently it requests fields from the fields factory and then reads the metadata and fields from the connection. We now need to first read the metadata, maybe buffer the fields bytes, Use the metadata to obtain the correct fields objects and then use the conn again to correctly unmarshall the fields. We need to think on whether we can't find a more elegant solution here.

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