Skip to content

Protocols as Projects #18

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

Open
benjchristensen opened this issue Mar 20, 2015 · 11 comments
Open

Protocols as Projects #18

benjchristensen opened this issue Mar 20, 2015 · 11 comments
Labels

Comments

@benjchristensen
Copy link
Contributor

As @NiteshKant and I have been playing with code this week it seems that we should separate protocols as projects (repos), not just modules. This would allow them to have different release and versioning cycles, which is important as the coming years will evolve and add things.

We suggest that instead of "reactive-ipc-jvm" being the home of everything, we add top level projects as protocols arrive such as:

  • ripc-tcp

    With submodules as ...

    • ripc-tcp-spi
    • ripc-tcp-transport
      • ripc-tcp-transport-netty4
      • ripc-tcp-transport-netty5
      • ripc-tcp-transport-aeron
      • ripc-tcp-transport-etc...
    • ripc-tcp-apis
      • ripc-tcp-rxjava1
      • ripc-tcp-rxjava2
  • ripc-http

    With submodules as ...

    • ripc-http-spi
    • ripc-http-transport
      • ripc-http-transport-netty4
      • ripc-http-transport-etc...
    • ripc-http-apis
      • ripc-http-rxjava1
      • ripc-http-etc...
  • ripc-udp

  • ripc-kafka

  • ripc-cassandra

  • ripc-dynomite

  • ripc-memcached

  • etc

@benjchristensen
Copy link
Contributor Author

This also makes more sense for transports since there is little to no commonality across protocols. For example, Servlet 3.1 as a transport can only be used for HTTP.

@rstoyanchev
Copy link
Contributor

Considering the disparate protocols, it makes sense to separate. That said would there be no shared code across protocols (working with buffers, connection lifecycle handling, etc) and across transport implementations? Or do you see the TCP module as that lowest common denominator?

Would WebSocket be under ripc-http? A WebSocket connection starts with an HTTP handshake and is likely mapped (and secured) under a shared URL hierarchy within a (single) Web application process. On the other hand beyond that the actual handling of WebSocket is much closer to TCP.

There is nothing to reflect the JVM nature any more with the "-jvm" suffix gone. Perhaps that suffix still makes sense to have on each new proposed repository?

For the "spi" vs "apis" naming, I think the distinction could be confusing depending on who is looking at this and it's also somewhat prescriptive in assuming how reactive-ipc would be used. Perhaps it would be more clear to call what is proposed as ripc-tcp-spi the API of reactive-ipc and anything "-rxjava1" an adapter layer. In other words:
ripc-tcp-spi => ripc-tcp-api
ripc-tcp-apis => ripc-tcp-adapter

@benjchristensen
Copy link
Contributor Author

would there be no shared code across protocols

There probably will be some, such as base implementations of Publisher. Possibly Buffer as well. As we implement 2 or 3 protocols we'll find what is common.

Perhaps an "ripc-core" project could be used for that?

Or do you see the TCP module as that lowest common denominator?

No I don't. HTTP for example should not be based on that as the transports will handle that implementation on top of TCP. UDP also wouldn't work on TCP.

Would WebSocket be under ripc-http?

I think so. My view is that HTTP should be multi-protocol to support HTTP/1.1, HTTP/2, WebSocket, and SSE.

Perhaps that suffix still makes sense to have on each new proposed repository?

Sure, that makes sense.

Perhaps it would be more clear to call what is proposed as ripc-tcp-spi the API of reactive-ipc and anything "-rxjava1" an adapter layer

That seems good to me. I wasn't thrilled with the "spi" naming anyways.

@benjchristensen
Copy link
Contributor Author

Modified names based on discussion above:


  • ripc-core-jvm

    With common elements like Publisher and Buffer

  • ripc-tcp-jvm

    With submodules as ...

    • ripc-tcp-api
    • ripc-tcp-transport
      • ripc-tcp-transport-netty4
      • ripc-tcp-transport-netty5
      • ripc-tcp-transport-aeron
      • ripc-tcp-transport-etc...
    • ripc-tcp-adaptors
      • ripc-tcp-rxjava1
      • ripc-tcp-rxjava2
  • ripc-http-jvm

    Support for HTTP/1.1, HTTP/2, Websockets, SSE, etc and submodules as ...

    • ripc-http-api
    • ripc-http-transport
      • ripc-http-transport-netty4
      • ripc-http-transport-etc...
    • ripc-http-adaptors
      • ripc-http-rxjava1
      • ripc-http-etc...
  • ripc-udp-jvm

  • ripc-kafka-jvm

  • ripc-cassandra-jvm

  • ripc-dynomite-jvm

  • ripc-memcached-jvm

  • etc

@NiteshKant
Copy link
Contributor

Perhaps an "ripc-core" project could be used for that?

Yeah we should have ripc-core where we can have different modules like ripc-buffer, ripc-reactive-streams, etc and we can discuss these modules as and when the need arises.

Re: TCP being the LCD.
I think there are two aspects to it:

  1. The relation appearing in the APIs (HTTP extends TCP)
  2. The relation appearing in an implementation.

I see 2 above to be more meaningful as opposed to 1.

Re: WS, HTTP/2 & HTTP relationship.

I think HTTP/1.1 implementation should provide a Upgrade/Downgrade facility for server and client respectively, as per the generic HTTP upgrade semantics. We can decide then whether HTTP/2, WS exist in the same project or not. I can see HTTP/2 moving faster than HTTP/1.1 implementation from the nature of the protocol maturity itself and us understanding the usecases for it. That may have us separating HTTP/2 from HTTP/1.1 project purely from the perspective of release cycles.

@rstoyanchev
Copy link
Contributor

ripc-tcp-adaptors

Those should be adapter (vs adaptor), right?

We can decide then whether HTTP/2, WS exist in the same project or not.

Perhaps separate modules but they should be the same project. Whatever the split it should be possible to run a single server with HTTP 1.1, HTTP 2 and WebSocket support.

@NiteshKant
Copy link
Contributor

Whatever the split it should be possible to run a single server with HTTP 1.1, HTTP 2 and WebSocket support.

Absolutely, that's a given!

@benjchristensen
Copy link
Contributor Author

@benjchristensen
Copy link
Contributor Author

Whatever the split it should be possible to run a single server with HTTP 1.1, HTTP 2 and WebSocket support.

Absolutely, that's a given!

Yup.

@rstoyanchev
Copy link
Contributor

http://en.wikipedia.org/wiki/Adapter#cite_note-1

Heh, good point. FWIW adapter seems to be preferred in JDK classes at least. Lots of matches on "java.*.Adapter" and none on "java.*.Adaptor".

@benjchristensen
Copy link
Contributor Author

Then "adapter" it is!

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

No branches or pull requests

3 participants