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

Roadmap for 1.0 #26

Open
3 of 8 tasks
quelgar opened this issue Aug 14, 2019 · 7 comments
Open
3 of 8 tasks

Roadmap for 1.0 #26

quelgar opened this issue Aug 14, 2019 · 7 comments

Comments

@quelgar
Copy link
Contributor

quelgar commented Aug 14, 2019

What milestones do we need to hit to reach 1.0?

Add more or throw out ideas in the comments!

@mijicd
Copy link
Member

mijicd commented Aug 14, 2019

I'd add 2.13 (maybe 2.11) compatibility as well.

@quelgar
Copy link
Contributor Author

quelgar commented Aug 14, 2019

Another thing I've been thinking about is if we can improve type safety in other areas:

Read-only buffers: The Buffer wrappers currently mimic the Java API with regard to read-only buffers. You can have buffers in a read-only "mode" where all the write APIs are still there, but throw ReadOnlyBufferException if you call them by accident. How about having a trait just with read operations for these read-only variants?

SelectableChannel: A problem with SelectableChannel subtypes (network channels and pipes) is that they can be switched to non-blocking mode. The difference between these modes is pretty significant for a ZIO program. I'm thinking we could have two variants of all SelectableChannels: a blocking version with ZIO's Blocking required: ZIO[Blocking, Exception, X], and a non-blocking using ZIO[Any, Exception, X].

@quelgar
Copy link
Contributor Author

quelgar commented Aug 14, 2019

A more philosophical question is whether we want to add any extra convenience utilities in zio-nio.

As an example, consider the java.nio.file.Files#copy methods that use InputStream or OutputStream. The functionality of splatting a stream of bytes to a file seems with minimal fuss seems generally useful, but the Java NIO implementations don't seem at all useful to a ZIO program. What we really want is something like:

def copy(in: ZStreamChunk[Blocking, Exception, Byte], target: Path, options: CopyOption*): ZIO[Blocking, Exception, Long]

But implementing this by wrapping the Java equivalent is quite difficult. It would be easier and likely more performant to simply implement it ourselves using our FileChannel wrapper. But that arguably goes beyond the zio-nio mission statement A small, unopinionated ZIO interface to NIO.. So perhaps we just don't offer any of the NIO utility methods that don't work well for ZIO.

@quelgar quelgar pinned this issue Aug 14, 2019
@pshemass
Copy link
Collaborator

do you think we should also include support for sun.misc.Unsafe ? OffHeapMemory might be pretty useful

@jczuchnowski
Copy link
Member

But that arguably goes beyond the zio-nio mission statement A small, unopinionated ZIO interface to NIO.. So perhaps we just don't offer any of the NIO utility methods that don't work well for ZIO.

@quelgar or we could create a subproject with NIO utilities and "unclean" implementations. Could be distributed as a separate dependency and used by those who want it, leaving the ZIO-NIO core unopinionated.

@pshemass
Copy link
Collaborator

pshemass commented Aug 17, 2019

@quelgar should we add to the list wrapper for DatagramChannel?

What is missing in terms of java.nio api?

@quelgar
Copy link
Contributor Author

quelgar commented Aug 17, 2019

do you think we should also include support for sun.misc.Unsafe ? OffHeapMemory might be pretty useful

Definitely seems useful, but perhaps that's something that belongs in interop-java?

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