Proposal: drop Scala backend implementation in favor of zipkin-java
See original GitHub issueThe zipkin-java project was created out of issues #451 #463. It is now approaching version 1.0, and resulted in questions about the future of the scala implementation. This issue will enumerate opportunities, concerns and any action to take on this topic.
Pro
- zipkin-java has more features
- It has a no-dependency library, for example in instrumentation projects, custom collectors or spark
- fine-grained logging of dependency linking and collection stages
- fine-grained, and tested health check system
- collector-metrics broken out by transport
- integration tests that invoke the packaged exec jar
- elasticsearch storage
- Maintainers can do more, if only supporting one server framework.
- Currently, there’s a lot of distracting work, porting code and tests, and releasing both projects
- Docker and documentation is confusing when there is more than one authoritative process.
- By cutting scala, zipkin’s few maintainers we can progress more with the same time, and cause less confusion.
- The java build is more stable due to less dependencies
- The scala project uses more dependencies including the unreliable
maven.twttr.com
repository which often breaks the build with http 503 errors.
- The scala project uses more dependencies including the unreliable
- Java implementation is made from better understood technology
- the server is based on spring-boot, which is a popular framework and well understood from a configuration POV.
- the scala process is hosted on a relatively rare framework, and literally loads .scala files to configure the process!
- Java implementation can be deployed as a single process
- while not required, you can enable all features including kafka in the same process
- Java implementation has more people participating in difficult topics
- Topics including modularity, dependency management and configuration have had fast progress in the java project.
- elasticsearch was written in <1 week and worked both in the stock server, and one based on Armeria a netty rpc service. This is in contrast to years of requests in scala with no action.
Con
- No precanned profiles like “collector”
- Some may desire a profile like collector includes the ability to receive but not query spans.
- Scala implementation battle-hardened at Twitter. Performance, availability implications.
- A lot of zipkin code isn’t used at twitter (Ex cassandra, kafka), but Finagle + Scribe is.
- Those already using zipkin collectors may have higher confidence in Finagle + Scribe vs FB swift (used in zipkin-java)
Issue Analytics
- State:
- Created 7 years ago
- Reactions:14
- Comments:24 (10 by maintainers)
Top Results From Across the Web
Add http and kafka transports to zipkin-tracer #465 - GitHub
Proposal : drop Scala backend implementation in favor of zipkin-java openzipkin/zipkin#1071. Closed. @codefromthecrypt ...
Read more >Proposal: Main methods (`@main`) - Scala Contributors
Proposal : Main methods (@main) Hello Scala community! This thread is the SIP Committee's request for comments on a proposal to change how ......
Read more >Scala List drop() method with example - GeeksforGeeks
The drop() method belongs to the value member of the class List. It is utilized to select all the elements except the first...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
These are valid concerns, though I’d like to mention a few things that all might not know. They impact the perception of supportability:
The scala+finagle aspect has actually led directly to people not participating in the project, and also delayed features for extreme amounts of time. For example, elasticsearch was requested years ago, and had some false-starts. Elasticsearch was implemented in java in less than a week by someone who formerly had no experience with zipkin. There’s a lot of evidence we can dig up about this, and this was a primary motivation for the java project itself.
While both the scala and java processes can enable a feature like kafka, there’s no reason to believe that either choice means a resilience fail. Before, we had no choice for an all-in-one process: that significantly damaged the ability for people to learn zipkin quickly. IOTW, let’s not mistake choice for a topology mandate. It is already the case that folks have collectors in golang and whatnot. There’s nothing preventing someone from making a zipkin server that is only a collector. in fact, there already is one in spring-cloud-sleuth for rabbit.
zipkin-java had a scribe transport, but it was deleted because scribe is archived and folks involved in zipkin had bad experience with scribe. We can choose to re-enable that feature in java using facebook swift (history lesson: facebook made scribe and thrift, so this choice shouldn’t be scary)
Regardless of whether folks want a scala+finagle thing or not, it is important that zipkin lives. Right now, I spend a great deal of time on undifferentiated work in scala eventhough I get lots of help in java. There is a burden to maintaining zipkin and with the amount of people we have, it surely suffers from having to carry excess weight in relatively unknown frameworks.
Java is a more widely known programming language than Scala, and the Spring framework/stack is more widely known than the Finagle/Twitter framework/stack. The technical complexity is about the same (I think), but more people know Java than Scala.
I think we should add scribe support to zipkin-java. The java port should be a drop-in replacement for the scala implementation, so we don’t need to make any changes to the instrumented applications.
,
This could be solved in the infrastructure, by only sending query traffic to some instances, and only sending collector traffic to other instances. I’m not concerned about query workloads taking down a collector (it’s very low volume), but a collector which is receiving too many spans could possibly crash, and then the query functionality wouldn’t work either. So for extra resiliency, you could deploy one query-only instance that is guaranteed to answer, even when the collectors are flooded. (Unless the storage backend is also kneeling)
We should write a couple of load tests:
and see how many spans per second we can process. Also, measure how latency in the storage backend affects server performance, and how much traffic the collector can take before it crashes.
Given that Zipkin is distributed as a shaded jar, Scala is already an implementation detail from the infrastructure point of view; it’s just a jvm process, or even just a Docker container. But given that Twitter builds Zipkin from source, for Manhattan support (is that still true?) then there would be a rewrite effort, since the APIs would be Java, not Scala.