-
Notifications
You must be signed in to change notification settings - Fork 100
Help Users Navigate User Guide Code #384
Comments
@mslinn Thanks a lot for your improvement suggestions. They completely make sense to me. I'd highly appreciate if you could make a pull request with your proposed changes and to replace
We still need to default to Scala 2.11 because of the dependencies in the Spark Adapter. http://rbmhtechnology.github.io/eventuate/adapters/spark.html. Although we're additionally releasing 2.12 versions of Eventuate without the Spark adapter we can only default to Scala 2.12 when all Spark dependencies support that as well.
We're actually using the C++ version of LevelDB with a JNI wrapper and not a Java port of LevelDB. |
Happy to make a PR when ready. I have a lot to learn!
|
Martin,
Is there a way to produce a formatted link using Sphinx? I would like to
generate:
<a href="http://somewhere.com">*<code>*text*</code>*</a>
It is easy to produce an unformatted link; I know two ways:
Method 1:
Here is some `text <http://somewhere.com>`_.
Method 2:
Here is some `text`_.
.. _text: http://somewhere.com
I've searched and experimented to produce a formatted link using Sphinx,
but failed. The docs would be better if they were properly formatted.
Thanks,
Mike
--
<http://micronauticsresearch.com>
*Michael Slinn*, Principal
Twitter <http://twitter.com/mslinn> • Blog <http://blog.mslinn.com>
• GitHub <https://github.com/mslinn> • LinkedIn
<https://www.linkedin.com/in/mslinn> • Resume
<https://www.micronauticsresearch.com/#people>
Direct: +1-650-560-8771
Cell: +1-650-678-2285
/Get the edge with our online training. Learn Scala today!
<https://www.scalacourses.com>/
|
Making the Sphinx code examples a separate sbt subproject probably won't work as this directory is already an unmanaged source in the settings of the root sbt project. At the moment, Eventuate documentation references code examples at three different kinds of locations:
We could either stay with that pattern or decide to move all examples from
It is referenced by
I think it's completely ok to use Java serialization for the examples together with a
Me too, didn't find a way to generate formatted links. We therefore followed the convention that links are always unformatted. |
Notice that the directory names are short, and form a descriptive relative path name that does not contain redundant use of the word
This last point needs to be done before I can complete my task of updating the user guide, so I have made the directory changes described above and merged my work to date into a new branch ( Update Mar 20/17 11:24am PT: Because I have made changes to the Scala and Java programs, the person/people who assume the task of updating them should extend my work; as of right now the most current version of the sample programs is found in my Eventuate fork in the |
@mslinn thanks for all the effort you put into it so far. Looks good to me at a first glance and would like to make a more detailed review in several smaller pull requests instead of a single large one. For example PRs could cover:
This procedure will allow us to make progress in several smaller steps and easier for others to review and discuss changes. Regarding the code examples and the separate sbt root: we need ensure that the examples still compile when generating the documentation. Not sure if this is possible if the documentation and the examples use different sbt roots (but I'm not an sbt wizard and that's only a minor issue). |
Makes perfect sense.
|
Please do that, thanks! |
I made Akka serializers and deserializers for the Scala versions of VectorTime and Versioned, and wrote tests. This code probably belongs in the main project, since everyone probably would benefit from a simple way to serialize/deserialize these objects. If the code was ported to the main project, the implicit classes would not be required. I also updated the User Guide code in my fork to take advantage of these serializers / deserializers, plus wrote a few more to handle I did not make Java serializers or deserializers for |
I'm not sure if it is helpful to have custom serializers for all the messages/events used in the examples (as it bloats them significantly). As a user I'd find a single/separate example, how to write and configure a custom serializer more helpful, especially if these are protobuf or Avro serializers, as they are needed for supporting event schema evolution. |
Thanks for pointing me to the serialization documentation. I agree that the User Guide code bloats when serialization is added (seems to be at least 2x larger). I did the following on my
When ready, I'll make a new PR for the changes to the Serialization document, where we can address any issues that may exist with the code I wrote, and discuss best practices. For example, I used org.apache.commons.lang3.SerializationUtils for serializing objects that can be cast to BTW, I could not find any reference to Apache Avro in the Eventuate code base. Presumably Avro is merely one serialization option, in addition to Google Protocol Buffers / ScalaPB, Apache Thrift / Scrooge, Pickling, Kryo / Chill, BTW, In a performance benchmark, ScalaPB provided the overall fastest results, which is nice, because it is merely a Scala wrapper around Google Protocol Buffers. |
Sounds good.
Let's only add an example how to write a custom protobuf serializer and remove the serializers that use
Eventuate uses protobuf only. Applications can use whatever they want. |
I updated my newSerializeDocs branch from master and pushed to my
|
@mslinn instead of pointing to changes in other repos, please make one or more PRs and let's discuss things there. Thanks for your understanding |
Users who are just getting started with Eventuate, like me, would find it very helpful to work through the code examples in the User Guide. Following are suggestions to make that experience better:
Following my own suggestions, I made a GitHub repo for
UserGuideDoc.scala
:application.conf
for Akka configuration.In doing the above, I discovered that the mysterious LevelDB mentioned in the docs was actually a Scala port of the Google LevelDB project, originally written in C++. It would be good to tell readers early on that LevelDB is a fast key-value storage, originally developed by Google, which provides ordered mapping from
ByteArray
keys toByteArray
values.When the sample project is ready, it might be a good idea to move the repo over to a subproject under
RBMHTechnology/eventuate
, and replaceUserGuideDoc.scala
, so others can have a quicker start.The text was updated successfully, but these errors were encountered: