The hallway track of Clojure Conj 2016 in Austin





The Clojure Barbecue Conj 2016 in Austin:




This year the Conj was held in Austin, which was an excellent venue. It’s warm! I only needed a light jacket and jeans outside. Austin has great eats, especially the barbecue. Everybody was chowing down on some good ol Texas ribs. There were plenty of nearby eating options for quick meals or longer sit ins. The airport is small and easy, as was land transport.


I spoke to about 50 people out of an attendance of about 500. Below are my notes, I hope they provide some insight into what is happening in the Clojure community.







Tomas: Math professor teaching computer science using Firestone (Online fantasy battle card game) in Clojure. Likes using inline tests attached as metadata to the function. Uses a custom macro is= to avoid empty tests.

Len: Using Clojure for military readiness assessment.

Milt: Yet Analytics recently hired some new recruits. Is using Web Workers as the owner of Reframe state. This avoids UI freezes when processing large communications to and from the server. Web Workers from ClojureScript has been quite difficult, but he has some changes to ClojureScript and Figwheel on the boil which will make this very smooth. Web Workers will be very useful to me in a couple of projects. He outlined his approach as follows:
  • Bootstrap: sets up the main <-> worker handlers
  • Sente events -> reframe (transit)
  • Separate build (to not access document which is not present in WebWorkers)
  • Reframe middleware (inteceptor) to check data shape (goes away when using Spec function instrumentation)
  • Interceptor to send back to the main process.
Client <-> Worker <-> Reframe <-> Sente <-> Server
I’m really excited about this… it fits beautifully with ‘the way’... keeps the UI responsive… sweet.

Fashion: Rich was rockin a purple shirt, shades and regulation black dancing shoes. Alex Miller surprised nobody, going with his standard plaid shortsleeve. Beards are still in. Longer beards especially. Also popular are sharp undercuts.

Paula: Building Naga; a rules engine for RDF/Datomic used at Cisco (and other places).

Stu: Datomic ETL - Build a function pipeline. The steps don’t matter. They will change.
Clojure provides system generality. Spec gives specificity when you want it.
Presented a useful conform! helper and halt-when for errors.
DB -> Extractor -> Entities -> Spec -> Transform -> Transactions -> Loader -> Datomic

Sivram: Using Clojure for clinical rules/data

Nick Bailey: Developer happiness, maintainability. Clojure fits our needs, is a recruitment tool, inspires passion, and is picked up quickly. Does Java interop between Jython and Clojure

Vijay - Using ClojureScript for HBO client side work.

Most people I met at this Conj were already using Clojure/ClojureScript professionally.

Schmüdde: Composing a small number of primitive colors (select a pallet) and allow some mixing. What are my constraints? Experiment within the constraints using generative approach. Adjust the constraints.

Jason: Proto REPL is a new Atom Clojure integration. Atom can bring up Chrome dev tools access to the DOM (modifiable for visualizations). Use (save x) to collect values (or Sayid). Reformat data for display. Has chart mappings and graphs (what is the underlying lib? looks slick). Made by bringing data centric components together.

Jacob: Using Clojure for ride share and private car rental in Denmark.

lvh: Use JNR for high speed low level library wrapping. Interface as data to support various type combos. Macro elides repeatitiion.

Bill: Sayid is an omniscient debugger. Tracing that collects the values and net time in the entire call graph. Defined println debugging as “sprinkling”. Requires some thought about what to trace. Inspires us to realize a better debugging story. Looks quite editor/REPL integration heavy, I wonder if there is a more Refresh based approach that works. Might be as easy as having a subordinate ProtoREPL running? You should watch this talk for sure.

Rich: Spec-ulation. This is what we are all here for, and Rich delivered! Absolutely can’t miss this talk, watch it now. Breaking changes are broken. Don’t break!! Don’t! Our community is a positive one. Accret. Spec: you can use it, it’s here to stay. The problem is the code is going to execute against some version, but if you have transitive dependencies on multiple versions you can not control which version it will be running. Dependencies are really call dependencies. Level violation. fns call by name. ns requires. artifact context. MAGIC. Coarse grained false security.
What is required? fn args, ns var names, artifacts ns/package names/paths
Provided? fn returns, ns vars/fns, artifacts ns/packages
Accretion, provide more. Relaxation, require less. Fixation, bash bugs. Flip any => Break. Either grew or broke. Nuance: does not apply to private development). Adding is growth, removing is breakage.
Code for growth. Open specs and data formats. Define what you can do, not what you can’t. Prohibition turns growth into break, so don’t prohibit. Presume you may get more. During development Alpha is O.K. or artifact id. Not an excuse to not promise (release it at some point please).
The only truth is the runtime. Think twice about requiring more or providing less.
Same story for web services.
What if we never broke? Can alway use latest. Spec can help - diff check for removing provides or additional requiring. SHA tested (per fn) Turn what would have been breaking into accretion.
Let’s be the community to make it great.

Sean: Recommended 1st Robotics for children wanting to learn to program, and lego Audrino.

A recurring question that came up (originally in the unsession):
How can programmers help scientists? Lack of basic software engineering prevalent in scientific work (change log, version control, tests, documentation, bus factor). Root cause is a continuation problem.

Scientist/programmer pair matchmaking? Book for scientists?
“You are in the Software business!”

Rich: We can’t really solve the continuation problem for science because we haven’t solved it for software engineering either; we don’t know how to pass software ownership onward (especially true for short time spans). We can build better tooling for scientists (and ourselves).
  • Build better tools for science
  • Clojure and Datomic offer reproducibility [this is huge for science; like git for science]
  • Core.matrix is wonderful and can handle the numeric needs of scientists
  • Scientists tool needs aren’t specific to themselves
  • Can’t fix a cultural problem with tech
  • There are no incentives for good software practices in science
  • Convert PySci to Clojure?
  • Build cool stuff and show scientists! Show them how Clojure can help them
Happy to see so many happy Clojure users.
I don’t make uberjars. For deployment, create 2 artifacts; code and runtime. Use IFS .m2, services all point to the same one. Git repo of company lib-> version which is updated when CI passes. Depend on the name not the version. Depend on code. Services depend on the lib not a specific version. I’d rather have to test that all my company code can go to a new version than have no idea what code is executing in a whole bunch of sub contexts. CI enables this. Test per git SHA can save build times and enable generative testing. AWS CodeDeploy works well for managing the flow of change, test, deploy of the code.
We’ve forgotten how make works, let’s get some of that back. Slow build times are due to getting artifacts you don’t even need, want, and might not even be what your code asked for… and running tests you’ve already run. Stop doing that. [Rich described the build and deploy system that I want consisting of simple and effective tooling choices. I hope someone from Cognitect will blog about their build system soon, it would be a valuable reference path forward along the themes of his talk.]
Simulation of national exit poll has tonnes of data. The whole election runs in one night. Have to do lots of pretend elections. Very bursty data. Was a greenfield rewrite.

Dorian: Making a custom flash cards mobile app in Clojure to learn Clojure while he learns Clojure. Cool idea! I'm going to copy this idea and do the same :)

Jacob: Using Clojure to optimize third party web service access. Measuring the effects of parallelism and chunking. Brainstormed about what sort of problems are good for learning things like core.async. Game min/max, solve the same problem using different tech; make a parachute that doesn’t break the egg.

Benson: The secret to understanding macros is remembering that they happen between the R and E of R^EPL. I found this tip very insightful, thanks for sharing it with me.

Conor: Is building tools for collective intelligence in Clojure. Came to Clojure from Datomic. Runs a research group of people interested in a variety of topics. Found people interested in research groups for different topics like parenting, homeschooling, and writing.
Currently working on a framework for knowledge mapping in Clojure/Datomic. Thinking about how to structure a debate style way to build arguments for and against the truth of statements. Also working on a different approach to time management: schedule your fun time first. Block out time for things that do take time. How much time do you want to allocate to what? Reverse scheduling works better than planning goals.
People in Clojure are self selecting to be helpful enthusiasts. Being helpful trumps skills/knowledge, and our community is brimming with helpfulness. Clojure has core values, a story, a nationhood. People choose to come to the Conj, to be part of a beautiful autocracy. A humble intelligence to choose to remove incidental complexity. Our uniting enemy is mutability. The constitution of nation Clojure is strong. There is trust in libraries, the thought behind them, the language, and ecosystem. This sort of nationalism can dissolve our differences. Recruit how Christians recruit. Put yourself out there, in places you are uncomfortable, work with new people for their strengths.
Eve has shown that you get a more friendly UX when you allow junk in between.

Chris (aka Oakmac): Using ClojureScript for threat detection at Cisco. It’s critical to solve the right problem. You and your team can do a fantastic job, build a polished feature, and it doesn’t mean anything if the user needed bulk load but you build form input validation. Discussed the pros and cons of kata coding interviews.

Adam: Interested in the effect of communication of requirements as teams scale, and how it breaks down as the distance of the programmer from the user grows. Sees much potential in Eve.

Colin: Business is doing great. Sustained growth. Working on many very useful Cursive integrations. Look out for figwheel click through to source soon! Is also taking more interest in refresh based workflows, which I am pleased to hear :) Thinking about how to provide a WallabyJS experience for ClojureScript in Cursive. Interested in taking the Sayid debug/trace approach. life is complicated trying to support clojurescript and spec. Working with Bruce to get figwheel integration (click through line numbers to source, serve out of Cursive, detect dependency changes from the code not the files).

Pretty much everyone was hiring and lots of people were looking. But there wasn’t a recruiting frenzy, quite the opposite. Most people were there for the Conj, to share ideas, build contacts, and enjoy Austin.

Quite a few startups are betting on Clojure: Jack (Ladder), Nikko & Claire (SparkFund), Kim (Reify Health), Rusty (Outpace).

Adam and Matt: Using Datomic to build wormbase.org for curation and query of papers about genome differences in worms. An over abundance of oversight is preventing extension of the solution to wider genomic databases (other animals). Alliance of Genomics is 10k researchers, and they need this tool. They also need to be able to annotate changes online with attribution. Scientists need a social network for collaboration. A gardening tool for building their own content and suggesting edits to others.

Paul: Pamela is a Lisp for space exploration with machine learning capabilities. A modeling language. In space you need to handle the unexpected. ML with real world interfaces. Useful for discovering the real parameters of a system, and handling transitions (bounciness when you stop a car). Learn the bounds of weird stuff.

Chris (aka Chouser): Can we apply Pamela to modeling our software systems to learn the bounds of our timeouts, performance, etc that we log? Working on codename Murkwood; an alternative to Communicating Sequential Processes and Continuation Passing more similar to Sagas… Run the code multiple times idempotently. Identify side-effecty, pausy, errory stuff that has happened or not yet.

Jarret: Pointed me to @adamtanknow sketches of the conj speakers and notes, very cool! I hope to emulate your artistic layouts and flair one day :)

Christophe: Built Powderkeg; a data glue approach to Spark in Clojure.

Eric: You can’t refactor Aristotle into Newton. Recommended reading: Conal Elliot’s Denotational Design. His approach to modeling is physical metaphor (know your domain) -> construct meaning (know your constructs) -> implementation (know your refactoring). Has been making instructional Clojure videos for three years.

Mike: Clara Rules if/then in a declarative fashion. Declared with bindings. Implicit storage of shared intermediate state. Information passing. General. Light weight. Rules have a first class data model. Dispatch is plugable. Can have a durability layer. See Ryan Bush videos. Supporting facts can be chained in metadata.

There were lots of healthcare companies at the Conj this year (Devin - Healthfinch, Kim - Reify Health, Mike - Cerner, Peter - Diligent, Jack - Ladder) and rules were a core competency for most of them.

Devin: Thinking about ways to filter rule information effectively to provide the answer to “Why did you recommend this?” in the context of 5k rules. Need to flag important ones and save the decisions for attribution and explanation.

Great to see and have personal conversations with colleagues past and present… Jeff, Tanya, Chris, Paul, Dan, Rusty, Vincent, Matt, Devin, Alex. I really wish I had spent more time with you instead of mingling. My philosophy on conferences is your there to get ideas and meet new people so I intentionally sit next to someone I've never met/seen before as much as possible. But the downside is I don't get to hang out with the gang, which I regret now. I hope to catch up with you again soon.

Nikko: Wants to make a difference in improving our world. Contracts are crazy, there is no precise meaning, it is just two parties agreeing that they each separately think they know what it means. If there is a dispute it goes to a judge to flip a coin. We can do better! We can make funding better. We can build a better financial foundation for our world. Building SparkFund with Clojure and Datomic.

@apogsasis: Composing music with Clojure Spec. Lots of overlap with Steve’s Juggling. Juggling throws look very much like drum beats. Numeric encoding and rules. Computer assisted constraint and solution space exploration frees us up to focus on more nuanced and skilled tasks.

Gladfly: McDonalds beef patties turned me vegan!

Andrea: Working on bootstrap Clojure (Clojure in Clojure) and it’s many applications such as ClojureScript browser REPLs.

Alex Miller: Was fielding a tonne of spec questions.

Jack: Proud of the build tool Ladder build because it was painfully missing. https://github.com/ladderlife/loonie Solved a real friction point for his team. Making a big bet on Clojure being the best way to run a startup. Pleased with the language and people, but build/deploy was a sore point (so they addressed it).

Chris: Using Clojure at Rackspace. Maintains a Clojure security lib.

Brett: Using Clojure in the mortgage industry (Guaranteed Rate). Found it easy to adapt logic to what a loan  officer would do, but the trick is seeing if the end effect is the desired one. Works remotely (most people I talked to worked remotely). Enjoyed the Austin food.

William: Barliman 4.3 is out! Write the test, generate the code, “prove me wrong”. We’ve seen this concept developing, it is reaching a really exciting stage where it can do quite a lot, and is compelling as a programming tool. Can fill in the last X % of code. Can detect “no function can pass this test with the current structure” on partial code. Proof checking. Find logical flaws before you even code.
Seems perfect for data transformations (and we write many of those reshaping fns in Clojure). I would rather write the spec than the code. Also useful for refactoring (discovering better solutions). I highly recommend you watch this talk.

Kim: Is using Clojure to facilitate Clinical trials (Reify Health). Good groups have Talkers, followers, mediators, leaders. +ve influences, -ve influence. Need a balance. Effect is contextual. Multipliers.

Milli: Teaching bootcamps. Gave me some very helpful insights on group formation techniques she uses. Does a personality test and finds that helpful in giving people some context on how to work with each other.

Riley: Studying, learning functional programming.

Rangel : Building Native ClojureScript app. Looks fantastic and it is fast.

Mark: Lots of Aussies getting into Clojure.

I hope that gives you a peek into the vibe of the conference and some of the hallway conversations going on. Massive thanks to Lynn and all the organizers, I had a tonne of fun.


Below are some fun sketches I made during the talks, I'm still a beginner but thought they might give you a laugh to see some amateur caricaturization:






The main speaking venue:





Disclaimer: I’m working off notes and memory of a whirl-storm of conversations. I may have misheard/misunderstood something you said, if so I am sorry about that; please let me know and I will promptly retract/update. The information herein is provided as a peek into the community activity going on.

Permalink

Article: Getting a Handle on Data Science

In this series we explore ways of making sense of data science - understanding where it’s needed and where it’s not, and how to make it an asset for you, from people who’ve been there and done it.

By Francine Bennett

Permalink

One Weird Trick To Become a Clojure Expert

The Clojurists hate me!

It is sometimes difficult to remember the path you took to reach proficiency. This makes it difficult to help others reach proficiency. I have this problem with Clojure. I’ve been using it for so long that I forget what I did to get better at it, other than just writing lots of code. (This is actually not a bad idea. Reading and writing lots of Clojure code is probably the best way to get better at writing Clojure code. Play golf with yourself. Solve the same problem over and over trying to use the fewest lines of code. Find an open source library and rewrite it from scratch on your own. Reading and writing lots of Clojure code a great way to get better at writing Clojure code, but that’s not my one weird trick.)

However, I do remember one decision I made that had a very positive impact on my Clojure skill. It only takes about an hour or two, and at the end you will accumulate an amazing amount of knowledge about how Clojure works and how you can use it effectively. It is a weird trick, and you have to be brave enough to do the unconventional. Here it is. Are you ready?

READ THE DOCS!

I’m not even joking! Go to this URL http://clojure.github.io/clojure/clojure.core-api.html and start reading from top to bottom. If you did not read through that page, you may not know about amap. If you stopped reading before you get to ‘f’ you wouldn’t know about frequencies. However, if you read all the way through, you will be rewarded with knowledge about vary-meta.

Imagine you had a sequence of data, and you wanted to count the number of occurrences of each unique value. You could spend a lot of time writing code, or you could just use frequencies.

Now I recognize that it may not be immediately clear what a function does by reading its docstring. Here are three ways to fix that:

  1. While you’re reading the docs maintain an open REPL session and try any function that is not clear to you. Call it with a few different arguments. Poke it and try to figure out how it works.
  2. Hop over to ClojureDocs and look up the function. At ClojureDocs you’ll find examples that can provide illumination.
  3. Read the source for the function. If you click the “Source” link under a function it will send you to the GitHub repo and you can see how the function is implemented.

Pick one, or try all three. You can do this while you’re reading through the clojure.core documentation, or you can just make note of functions that are not clear to you, then for 15 minutes every day take a function from your list an conquer it. Eventually that list will be empty! :)

Take the time to invest in yourself. Reading through the docs will give you a great overview of the possibilities of clojure.core, and practicing with those function in the REPL will solidify that knowledge. The next time you are writing Clojure code, you will have easy access to the perfect function, right when you need it.

Permalink

Pimping Gorilla REPL with React and ClojureScript. And Beyond.

React Gorilla REPL

TL;DR: I love the REPL experience. I wanted a ClojureScript 🐩 project. I picked Gorilla REPL. Scope increased all the time. You may find the result useful now.

History & Motivation

I spent a lot of time working with the Alfresco ECM platform. Many solutions require just a few lines of code. The fast feedback provided by a REPL is invaluable. In Alfresco land, the Javascript Console has been a helpful companion over all the years. But it also has limitations it will most likely never overcome. My quest for an alternative brought up Gorilla REPL and I played around with it a while ago. Although embedding of Gorilla was working at that time, I felt things were still too messy and uneasy about releasing something.

A few weeks ago, the desire to play with React came up. Gorilla was my victim of choice. I started writing reagent replacements of the existing JavaScript code. The ClojureScript codebase grew, and I decided to add re-frame to the mix. As time went by, more and more ideas came up and I started experimenting around.

Current State of all the Things

Fast forward to today. At this time, I consider mostly working/ok:

  • ClojureScript migration of application client code
  • Recent versions of dependency libraries
  • Parinfer (optional)
  • Separate, dedicated nREPL middleware stack
  • Figwheel/Devcards/Testing (latter bare bones)
  • Componentized (incl. Tesla-Microservice)
  • Standalone uberjar / Docker image
  • Drop in uberjar capabilities (dropping the uberjar into some WEB-INF/lib should work … sometimes)
  • Standalone uberwar
  • Roll in jar (use as a library)
  • Proxy based loading of remote worksheets (in case CORS is not in place)
  • Pomegranate dependencies for non leiningen based deployments

Work in progress/experimental stage:

  • Remote nREPL delegation
  • Client/Browser REPL (replumb)
  • Heroku
  • Clojail execution
  • Mobile/PWA capabilities
  • Clean up messy places (e.g. nREPL code /Ring handlers)
  • Error handling
  • Node.js backend

On the radar:

  • Implementing tests
  • Better extensibility
  • Interruptable eval
  • Improve composabitly of (ring) handlers
  • Code sharing UI/services
  • Revisit (Clo)Jupyter
  • Peridically save to localStorage
  • Introduce garden

Other than that, some of the open issues have been addressed.

I tried really hard to remain backwards compatible and preserve existing functionality. Given the nature of reagent, this did not seem reasonably possible with regards to persisted html in worksheets. I ended up introducing version 2 persistence (transit based) while still supporting version 1 persistence (shamelessly discarding output).

Given my limited resources and the sheer amount of changes, I am sure I introduced a bunch of new issues.

Quick Demos

Here are a few „new“ sample use cases I have been playing around with. The standard Leiningen based usage (which is hopefully still working) is not covered.

Docker

There are two Docker images. A 200MB 0.3.6-alpine version which should be fine for pretty much anything other than Spark (… all in one process that is due to native library loading issue), and a full blown 400MB 0.3.6 version.

Run

docker run --name gorilla-repl -p 9000:9000 deas/gorilla-repl:0.3.6-alpine

and open a fresh worksheet.  Shift+Enter evaluates the active code segment, Alt+Shift+Enter the whole sheet. Alternatively, if you are into Big Data, you might want to try the sparkling ✨ example instead. Be patient with that one – downloading and launching Spark(ling) takes a moment

Standalone Uberjar

Download the standalone.jar, run

java -jar target/gorilla-repl-ng-standalone.jar

and open a fresh worksheet.  The sparkling link above should work just as well.

This file may also work as an „all-in drop in“ for webapps (try putting it in WEB-INF/lib).

Alfresco

For convenience, I rolled gorilla REPL into lambdalf. Download the repo extension, put it in /opt/alfresco/modules/platform, restart the server and you should find a fresh worksheet here. The MIME type example should work as well.

JEE War File

Download the war file and drop it into the webapps folder of your application server. Assuming the server is running on port 8080, you should be able to find the application here.

I don’t have a lot of sample worksheets to offer. You might want to look at Jony’s test repository over at github for some inspiration.

Future Directions

I had a chat with the Jony Hudson (the original author) and Ben Bailey. At this time, Jony seems fairly busy with other things and I don’t expect him to put a lot of effort into Gorilla REPL in the near future.

Nothing is set in stone. Experiments will be reverted if it turns out they do more harm than good. Using a Node as a backend (working) appears awesome –  just as using Spark on top of Alfresco. Still, I personally don’t have a meaningful use case … yet. :)

For now, the long term goals are to expand use cases while keeping the software stable/compatible and development fun. Short term goal is cleaning things up and adding tests.

If you feel like jumping in, you are welcome! Source along with instructions to get started hacking on it are on Github. Don’t expect things to be perfect. There surely are traces of migration and experimentation.

Finally, I want to thank all the people who built the stuff my work is based on. 🍸

The post Pimping Gorilla REPL with React and ClojureScript. And Beyond. appeared first on CONTENTREICH.

Permalink

So #ClojureX was excellent, now here’s my corrections – @skillsmatter @onyxplatform

My first #ClojureX done and I’ve already spent the morning thinking about what I could possibly talk about in 2017. Hands down one of the best developer conferences I’ve attended. It’s all about the community and the Clojure community gets that 100%, it showed over the two days.

Many many thanks to everyone at SkillsMatter for looking me, the weary traveler, the tea was helpful. Also great to meet some of the folk I regularly talk to on the Clojurians Slack channel.

15267854_10155678189670200_7186480394544666013_n

A couple of things following my talk now I’ve watched it back. If you want to watch then this is the link: https://skillsmatter.com/skillscasts/9153-introducing-streaming-processing-with-kafka-and-the-onyx-platform

Firstly, when you create the Onyx app with lein it does create the docker compose file but it only has the Zookeeper element, not the Kafka one – that has to be added in afterwards.

Secondly, the percentage scheduler adds up to 100, I said zero. Brain detached for a second, thought one thing and something else came out.

Apologies, I don’t like giving out wrong information.

Craig and Darcey would have been proud, kind of, perhaps.

Here’s to 2017.


Permalink

The REPL

The REPL

spec-tacular, macchiato, and deep learning
View this email in your browser

The REPL

Notes.

There were several big pieces of Clojure news this week. First, Datomic announced a change in license to allow unlimited processes and a new client API suited for microservices. I wrote a guide to the licensing changes. Second, Clojure Conj is on as I write this, and has been getting all the videos out in record time. I'll put some of my favourites in the next letter. Finally, Clojars has joined the Software Freedom Conservancy, and announced the Clojars Community Committee to support diversity and open source development in the Clojure and ClojureScript communities.

-main

Libraries & Books.

  • durable-ref: Durable reference types for Clojure, with some excellent docs.
  • alia, a Cassandra client has released 4.0.0-beta1

People are worried about Types. ?

Foundations.

Tools.

Recent Developments.

  • CLJ-1912: Optimised versions of the '<' and '>' functions for arities larger than 2.
  • CLJ-1952: include var->sym in clojure.core

Learning.

Misc.

Copyright © 2016 Daniel Compton, All rights reserved.


Want to change how you receive these emails?
You can update your preferences or unsubscribe from this list

Email Marketing Powered by MailChimp

Permalink

DropWizard vs Ring

I have been blogging here a lot about the new kids on the JVM block, namely Clojure and Scala. I wanted to see how they compared against the more established Java frameworks. When version 1 of DropWizard was released, I decided that was the time to write another news feed micro-service implementation. This blog is about the news feed micro-service implementation using DropWizard.

conceptual level class diagram of dropwizard service

I wrote the feed, ran some load tests, then compared the results to the same load tests for the Clojure version. I documented my findings in the PDF at the bottom of this page. Here are some answers to questions about the document below.

Q: How did you come to the conclusion that Guice is more popular than Spring when it comes to Dependency Injection in DropWizard?
A: It’s been four months since version 1 of DropWizard has been released. The dropwizard-guice integration was available immediately. There still isn’t an integration with Spring yet.
Q: Why did you bother using Swagger?
A: I have been an advocate for MDSD for a long time now. Swagger is fairly popular and I wanted to see just how well the popularity was deserved by using it to generate all the RESTful parts of the service.
Q: Well? What do you think of Swagger?
A: I like the technology. Curiously enough, the web site doesn’t mention MDSD even once. The focus seems to be about onboarding start ups to get to market faster using their pre-existing templates. That’s cool but the real value comes when you adopt and adjust the templates as an expression of your own architecture. One size does not fit all.
Q: What is your “standard load test?”
A: Basically, it is a program that I wrote that simulates news feed load by creating participants, creating friend relationships between the participants, then posting news to participant outbound feeds.
Q: What is the difference between low load and high load?
A: Running the load test program with one thread vs three threads.
Q: You referenced JDBI in the architecture section and then you mentioned Java annotation in the differences section and then you listed Guice and Jersey. Didn’t you also mean to list JDBI in the annotation paragraph too?
A: No. I used the JDBI fluent api instead of the Java annotation approach.
Q: How do you run all these load tests?
A: I used aws for all my load test experiments.
Q: You used to use Solr for the search component. With this implementation of the news feed micro-service, you switched to Elastic Search. Does that mean you now prefer Elastic Search over Solr?
A: I had to switch over to Elastic Search for the DropWizard service due to a version conflict in the downstream dependencies with Jetty. I switched from Solr to Elastic Search for the other news feed apps in order to have a more valid basis for comparison during all the load testing.
Q: Why do you still stand up your own EC2 instances of Elastic Search and Redis when you can just use the AWS PaaS versions of those services?
A: I tried using Amazon Elasticsearch Service and Amazon ElastiCache but I couldn’t get it to work. I think that I had to set up IAM based access for those and I just didn’t want to. I didn’t try very hard because it is pretty easy and quick to stand up those services yourself.
Q: Any interest in switching to Memcached?
A: I already coded those classes and will most probably write a blog in the future comparing news feed performance when using Redis vs Memcached.

DropWizard vs Ring: The Java Framework Strikes Back

Permalink

LED is my new Hello World - Clojure Time

The more I learn Clojure...the more I like it...and I'm liking it so much that I couldn't help myself and start working on my beloved "LED_Numbers" application...

After making the Fibonnaci Generator app work...this one wasn't as hard as I expected...actually I think I'm slowly getting used to Clojure...which is always nice when learning a new language -;)

Here's the source code...

LED_Numbers.clj
(def leds {"0" (list " _  " "| | " "|_| ") "1" (list "  " "| " "| ")
"2" (list " _ " " _| " "|_ ") "3" (list "_ " "_| " "_| ")
"4" (list " " "|_| " " | ") "5" (list " _ " "|_ " " _| ")
"6" (list " _ " "|_ " "|_| ") "7" (list "_ " " | " " | ")
"8" (list " _ " "|_| " "|_| ") "9" (list " _ " "|_| " " _| ")})

(defn toList [number]
(map str(seq(str number))))

(defn get_led [x n num]
(cond
(> (count x) 0)
(concat (nth (get leds (first x)) n) (get_led (rest x) n num))
(and (= (count x) 0) (< n 2))
(concat "" "\n" (get_led (toList num) (+ 1 n) num))
(and (= (count x) 0) (= n 2))
(concat "" "\n")))

(defn showLED [num]
(do (print (apply str (get_led (toList num) 0 num))))(symbol ""))

Wanna see it in action? Of course you want to -:)


Well...let's go back and keep learning -:D

Greetings,

Blag.
Development Culture.

Permalink

Copyright © 2009, Planet Clojure. No rights reserved.
Planet Clojure is maintained by Baishamapayan Ghose.
Clojure and the Clojure logo are Copyright © 2008-2009, Rich Hickey.
Theme by Brajeshwar.